android

Can I parse uri from resource?

// startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.donate_url)))); startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"))); when I use the first,app will crash in emulator but the second run well, how can I fix the first? thanks for help ...

Android:How to avoid XML verification failed error and Upgrading to 2.x SDK successfully?

Hi, I have setup for Android development with 1.5 SDK on Mac O.S X - Eclipse 3.5. I want to upgrade the SDK, so as i followed to choose Window->Android SDK and AVD Manager from Eclipse. But it throws error as follows: XML verification failed for https://dl-ssl.google.com/android/repository/repository.xml. Error: cvc-elt.1: Canno...

DH Keypair generation time on Android

This is the code that I'm using to generate a DH keypair: KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DH"); keyGen.initialize(1024, new SecureRandom()); KeyPair ackp = keyGen.generateKeyPair(); (without the needed try/catch, of course). I've done some tests running such code iteratively and varying the key size (in partic...

Which data will be deleted, if a user uninstalls an android application

If a user uninstalls an app from his phone, which data is explicitly deleted? I know that preferences are deleted. What about files on the sd card and about databases created by this app? If the data on the sd card is not deleted how can I avoid cluttering the users phone if I write larger amounts of data, like images on the sd card? ...

Convert SDP data from byte[] into Object?

I am currently sending and receiving SIP messages across a network. When I want to add SDP data to a SIP message I use the SessionDescription object in jrtp. This object is then added to the SIP message. But when I get a SIP message from the server its SDP is in a byte[] array. So I'm wondering is there anyway to convert the byte[] b...

running an android app on the device instead of on the emulator.

hi, I've installed the usb driver, i'm running win7. I can see that the driver is installed in the window->android SDK and AVD manager->installed packages but when i'm writing "adb devices" in the cmd it doesnt show like the phone is connected (it is - it has the orange led on..) I'm using the HTC G1. I also did the "Turn on "USB Debuggi...

Refreshing a LinearLayout after adding a view

Hi I'm trying to add views dynamically to a linearlayout. I see through getChildCount() that the views are added to the layout, but even calling invalidate() on the layout doesn't give me the childs showed up. Am I missing something? ...

Circular gradient in android

Im trying to make a gradient that emits from the middle of the screen in white, and turns to black as it moves toward the edges of the screen. As I make a "normal" gradient like this, I have been experimenting with different shapes: <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gr...

i want to display this listview on scrolling

I'm completely stumped on this one. I have three different lists that need to be displayed on the screen. I've tried using a ScrollView with a LinearLayout child, and putting my ListViews in the LinearView, but all of the ListViews lock to a fixed height with scroll bars. Using other kinds of Layouts means no scrolling. ...

got IOException in android?

03-18 19:31:55.883: VERBOSE/HttpSample_View(298): java.io.IOException: SSL handshake failure: Failure in SSL library, usually a protocol error 03-18 19:31:55.883: VERBOSE/HttpSample_View(298): error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol (external/openssl/ssl/s23_clnt.c:585 0xaf586674:0x00000000) why i got it? ...

Passing class instances between applications in Android.

Hi I have an application App1 which defines class A and uses instances of this class. What I want to achieve is - after App1 is installed on the device to be able to load App2 which defines and implements class B which is subclass of class A (imported from App1 package); and be able to get an instance of class B in the App1. Class B doe...

AVD is located over UNC path and cannot start.

How does one tell it where to put the AVD? by default it is creating it in my windows home directory under a .android folder. i cannot start my avd if its located over a \unc path\to\avd. our sys admins put all of your home directories on another shared server. Thanks in advance, Kirby ...

Force application to restart on first activity android

Hi, For an unknown reason, I can't get my application leaving properly so that when I push the home button and the app icon again I resume where I was in the app.... But I would like to force the application to restart at the first activity... I suppose this has something to do with onDestroy() or maybe onPause() but I don't know what t...

how to continuously send data without blocking?

I am trying to send rtp audio data from my Android application. I currently can send 1 RTP packet with the code below and I also have another class that extends Thread that listens to and receives RTP packets. My question is how do I continuously send my updated buffer through the packet payload without blocking the receiving thread? ...

getting maps to accept a dynamically generated KML file?

Hi. I have a button that launches the google maps app on my device via an intent. I want to be able to pass it a php page that generates a KML file. I have done this on a website before using the googlemaps api in JS - but it doesn't seem to work on Android. My php file is as follows; <?php echo '<kml xmlns="http://www.google.com/ear...

Turn Bluetooth On and Off in Android 1.5 (SDK level 3)?

There are tons of pay and free bluetooth toggles on the market that work with Android 1.5 (SDK level 3). The problem is there is no visible API for this! Does anyone have any working code snippits on how to enable and disable bluetooth that works on Android 1.5? I assume you must have to use some kind of reflection for it. There are ...

Does switching activities in Android start a fresh JVM

Does switching activities in Android start a fresh JVM? It seems like each activity is meant to run as its own "main" method. If I have a singleton (via Guice, not an actual singleton in this case) should I expect to be re-creating it every time I switch activities? ...

Embedding ads on Android app?

I would like to make a free version of the Android app I have, but would like to embed ad on it. I am not sure where I should start? Is there a well known mobile ad company out there that is specialized in mobile advertising? ...

How can I write a Broadcast Receiver that will be invoked when user clicks on any application icon?

How can I write a Broadcast Receiver that will be invoked when user clicks on any application icon? I tried by writing: <receiver android:name = "myreceiver"> <intent-filter> <action android:name = "android.intent.action.MAIN"> </intent-filter> </receiver> But it is not called. I tried, by using Packagemanager...

Any GUI libaray for iPhone & Android based on OpenGL ES?

Since both iPhone and Android support OpenGL ES, is there any open source or commercial GUI library we can use for these two platforms? Or is it doable (or how difficult) to port an application from one to another platform? As I know, for iPhone only, libNUI (http://www.libnui.net) is a good choice (dynamic layout & mature), but it only...