android

Error in Android application

I have an Android application, a JNI code which captures images from Camera and sends it to UI. JNI code runs in a separate thread which fills a shared queue which is present in UI class. Randomly I am getting the following error. W/dalvikvm( 360): JNI WARNING: 0x659 is not a valid JNI reference W/dalvikvm( 360): in Ldalv...

How to play an audio from url in a app widget.

Im implementing app widget to play audio from url, I used mediaplayer class to play audio when click on a play button in widget. but im not getting audio output, is there any way to work out on this issue. Please let me know, or give me a reference to follow Thanks in advance ...

Edit List Items in ListView

hello, I have a listview from an SQLDatabase using custom CursorAdaptor. I would like to go back to the activity that i used to create the items when i click on them in the listview.so that i can edit the entries. But nothing happen when i implement the OnItemClick method and the getItemId() on the CursorAdapter even though am not sure i...

Differecnes between ItemizedOverlay and Overlay class

Hi Can someone tell my when to use Overlay or when to use ItemizedOverlay class! What are differences between this two classes? Draw methods do the same thing? Can I use only ItemizedOverlay class in my project or I must use and Overlay as base class! Thanks ...

how to bind the adapter list content of click event.

friend's i have listview with 10 records parsed initially from internet and i have footer at bottom of my listview by using for click more to view,the view getting ok but the problem here is during my click event i have to call the same adapter class with different url it getting parsed well,the problem is click event adapter data ar...

[ANDROID] Showing Dialog after another Dialog: HANGS

Hi! I have a really weird problem, which I am unable to debug so far... Thing is...my app needs to download something to work. So in the beginning of the onCreate() method, I check if that something is already downloaded. If not, I pop a dialog up asking the user to download it. if (!isInstalled) { showDialog(DIALOG_INSTALL)...

adding two numbers from editText in first activity and displaying the answer on a second activity?

Just learning and thought this would be neat to learn. basically getting the value from editText1 and editText2, then by pressing an add button, be able to show the result answer on a second activity. I know this is probably very easy, but I wanted to learn more about how I can do simple math practice while learning the language. Thank ...

bindService not working inside a button click but works in onCreate - android

I have a pretty simple local service that I'm trying to bind to my activity. I worked through this yesterday with CommonsWare and he got me straightened out as I was having a difficult time getting the service to bind. It turns out that the reason I was having so much trouble was that I was trying to bind the service with: bindService...

Android create RSA 1024 .NET compatible keys

I am developing an Android Application and I need to generate some RSA private and public keys to use for secure communication with web services. To do this I need to have the public key in a .NET compatible form. Like: <RSAKeyValue><Modulus>{0}</Modulus><Exponent>{1}</Exponent></RSAKeyValue> So far I managed to to this: keyGen =...

Android SMS Sending Intent filter

Hi I 'm using in an Activity in Android so that It could receive the intent when I try to send SMS. While sending the SMS I want to get a pop up asking me which app I want to use, native sms app or my app. My problem is that it works when I 'm resending those sms which are failed to sent in last attempt i got the pop asking to choose...

An interesting detail about variable name

I have read tutorials all over the web with different kinds of tutorials specified on game (however, this turns out to be pretty general). Are there any reasons to why many developers name their variables like: mContext For me it is default to just name it "context" or something similar. Are there any reasons why the "m" are before?...

Android activity over default lock screen

Similar to: http://stackoverflow.com/questions/3381594/how-to-make-android-activity-show-above-keypad-screen-lock How can I display an Activity or Dialog over visible lock screen? I have already tried displaying my lock activity when screen goes on setting various window type in Activity.onCreate() method: TYPE_PRIORITY_PHONE TYPE_S...

Convert View to bitmap FileNotFoundException problem

I'm trying to convert my LinearLayout to a bitmap so that I can save the current layout content as an image in SD card. First, I create bitmap and canvas and attach the layout to the canvas. Followed steps from http://www.brighthub.com/mobile/google-android/articles/30676.aspx#comments. //code to add child view into layout before creat...

Download large file in Android

I have an app that downloads a very large file (over 50MB). Unfortunately I'm getting reports that the download fails. Below is the logcat of one such failure, which ends with a java.net.SocketException: The operation timed out. In-between it has various messages from the WifiMonitor. I don't know how to interpret these messages. Is ...

Android: trying to understand android:layout_weight

I'm trying to divide a page in three parts. I'd like to do it in percentage values, however that is not supported by Android. Instead I have to use android:layout_weight. But I have a hard time understanding it and getting it right. Especially how the actual size gets calculated. Is there a way to get a percentage value (0..100%) out of ...

Android Bluetooth PBAP

Hi guys! I'm gonna try to introduce briefly what I'm working on, and then present my question... any help will be very much appreciated! I've been trying to connect an Android device to other phones in order to import their phonebook info over bluetooth, using the phonebook access profile. To achieve that, I'm trying to place my device ...

Database Quandry

Been trying to get an answer on what I am doing wrong all over the place. I would like the user to select a button in the calling class, open a called listactivity which displays the contents of a database, let the user click an entry, copy that entry into a new database, send back the rowid from the new database to the calling class and...

How can you set the http proxy programatically?

I'm looking for a programmatic way to set-up http proxy settings for android handsets. I've tried using android.provider.Settings.System.putString() to set System.HTTP_PROXY, but my call fails (I'm using a 2.2 emulator image at the moment). My code looks like: if (System.putString(getContentResolver(), System.HTTP_PROXY, "10.10.2.1:808...

Dealing with drawables for various screens sizes.

I have observed from the HDPI, MDPI and LDPI icons from a new Android project, they are in the ratio of 6:4:3 (72:48:36). So would it be a good idea to scale my other drawables in the same ratio? If not what is the best way to scale drawable resources for an application for deployment? ...

Android: How to use Progress bar on AppWidget?

I like to display a progress bar on my AppWidget as the Widget downloads data from a server. Can someone please post an example or a hint how to implement that? ...