android

how to rotate video in VideoView

Hi friends, How to rotate video in VideoView for 90 degree ? Thanks for advices ...

Default context for AlertDialog.Builder for map view?

Hey, I've been trying to follow this tutorial on using Google Map View in Android. In the second part, they create an mContext member variable and then pass that into AlertDialog.Builder(mContext), but the constructor that they call to create an instance of an HelloItemizedOverlay doesn't instantiate mContext, so it's just left null as ...

Can't get geo fixes to Android emulator

Hi, I'm trying to send geo fixes to the Android Emulator in Eclipse. It has been working on some occations but now it never works. I've tried targeting different platforms, setting the time zone in the correct emulator, changing the locale to English (US), wiping the user data in the emulator, used both telnet geo fix command and the DDM...

Android StartActivityForResult and Finish (with video)

I have a MainActivity class with an "Add Item" button and a listview and a AddItemActivity class with a textbox and a "save" button. The user should click on the "Add Item", go to the AddItemActivity screen, enter an item, click 'save' and then go back to the updated MainActivity screen. (BTW, I'm using MonoDroid, but I don't think thi...

Problem in Listview Custom adapter class

Hi experts, I am explaining my issue straightaway. Please refer the following code snippet. @Override public View getView(int index, View convertView, ViewGroup parent) { Comments comment = comments.get(index); if (convertView == null) { LayoutInflater inflator = (LayoutInflater) context .getSystemService...

How to make a deep copy of an InputStream in Java ?

Hi guys, I would like to know how to make a deep copy of an InputStream? I know that we can do it with IOUtils packages but I would like to avoid it if possible. Does anyone know how to make it please? Thank you ! ...

How to create reflection effect for TextView in android

Hi, I have got a tech problem of implementing the reflection effect for TextView, in order to create a Clock/Timer. I have read many articles about this, but they are all about adding reflection effect for Images. Would anyone please point me to the right direction to do so or simply show me some demo which are already there. one of t...

Adjusting Font Size to Fit, Paint.measureText returns too small a value

I'm using the FontFitTextView that was posted in this other thread, but it isn't working exactly right for me. The measureText() call is returning a number that is obviously too small to display the string. When it runs through to find a font size that will allow the text to fit, the font size it settles on is still too big. I feel like ...

Android: extending PhoneBase?

Hi! I know it is possible to use TelephonyManager to get information like: service state, device ID, Sim Operator, etc... Is it possible to edit some of this information? Couldn't find .set() functions on Android.com documentation but I've found the GSMPhone.java source code which includes functions like .setNumber1Number() (used to se...

Timers and Maps Android

I'm having some troubles with displaying ItemizedOverlay(s) on a map. Here I extracted a simplified example of what I need to do. Here's my Map class: import java.util.Timer; import java.util.TimerTask; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.util.Log; import com.google.android.maps.GeoPoint...

Android SQL query not ordering data.

Hi There, I have written a small android app that grabs some data and displays it in a ListView. I want to have the list sorted in ascending order (no prob). But when I add a new item it stays at the bottom of the list even when the view/app is reloaded. It seems the only data that is being sorted is the entries that were created in th...

Sharp corners for EditText.

The default EditText widget has rounded corners. How do I change them to sharp / edged corners? ...

How to make button that shows a list of options on long click, like on the Soft Keyboard

I want to use/create a button that works like the one on the (HTC Desire) Soft Keyboard. So that when you make a long click, it will show a list of options, and by sliding your finger to the left or right, you select which option you want to choose. Example: When I hold down the "12#" button on the keyboard, it presents the list: [: /...

Toast does not display when used in catch block

I noticed that a toast isn't displayed when it's used inside a catch block. Does anyone know how to show toasts when catching exceptions? An Example: try { // try to open a file } catch (FileNotFoundException e) { Toast.makeText(this, R.string.txt_file_not_found, Toast.LENGTH_LONG); return; // cancel processing } ...

I dont want change vertical-horizontal rate...:) Circle becomes ellipse.... HELP!!

I want horizontal-vertical rate unchanged. How can ı Do this?? my picture is rate is 320x70. for example, in my phone(samsung galaxy-s GT-I9000) it looks like 320x100. originally I have a circle but it look ellipse... ı have to fix it, but how can ı do?? its my code.` <?xml version="1.0" encoding="utf-8"?> <LinearLayout an...

How do you save images to Amazon S3 from android camera?

I am making and app on android that takes pictures using your camera, I then want to save this image to S3, but I am not sure how to do this. ...

Using client/server certificates for two way authentication SSL socket on Android

I'm working on an Android app that requires both client and server certificate authentication. I have an SSLClient class that I created that works beautifully on regular desktop Java SE 6. I've moved it into my Android project and I'm getting the following error: "KeyStore JKS implementation not found". I've looked online a bit and it l...

How to exclude your own app from the Share menu?

The app has an intent filter to allow it to appear in the share menu in other applications via ACTION_SEND intents. The app itself also has a share menu using ACTION_SEND and createChooser(), and my app appears in the list. Since they are already in my app it seems strange to have them be able to share back to itself. Is there a way ...

android: efficient way to get an approx location

i have a widget that needs an approximate location. this is what i'm doing ... in onUpdate(), get the best provider, set a location listener on it, and return in location listener's onLocationChanged(), update the remote views based on the location, and unregister the listener this works, and on the emulator things wait until i send ...

How to use SharedPreferences as LocalStore, in more generic way?

Being new in Android world and advancing with joy day by day ;) I would like to share examples about common usage. Here comes example about using SharedPreferences with generic LocalStore class. create a common class to be used by your main activity or by any of sub-activity. public class LocalStore { private static final...