android

CharSequence VS String in Java ?

Programming in Android, most of the text values are expected in CharSequence. Why is that ? What is the benefit and what are the main impacts of using CharSequence over String ? What are the main differences, and what issues are expected, while using them, and converting from one to another ? ...

Flv to mp4 conversion

Hi All, I want to play the flv files in Android. So what I thought is to convert the flv file to mp4 or 3gp(for which there is a decoder in Android). OpenCore can be used to convert. I have looked into opencore code, there is a class in opencore "/android/external/opencore/fileformats/mp4/composer" to create the mp4 file. It has apis li...

How to get the URL of the captured image

I launch an activity to capture a picture from camera: Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE, null); i.putExtra("return-data", true); startActivityForResult(i, PICK_FROM_CAMERA); Can you please tell me how to get the URI of the capture picture? Thank you. ...

IMAGE_CAPTURE Intent never returns to onActivityResult(int, int, Intent);

Hi, I start an IMAGE_CAPTURE Intent like this, and my activity's onActivityResult() get called: Intent i = new Intent (android.provider.MediaStore.ACTION_IMAGE_CAPTURE, null); i.putExtra("return-data", true); startActivityForResult(i, PICK_ICON_FROM_CAMERA_ID); But, if I start my Intent like this, the Capture Image Intent did get cal...

How to programmatically enable GPS in Android Cupcake

I'm currently writing an app in Android that works with the GPS, at the moment I'm able to work out whether the GPS is enabled, my problem is that I want to enable the GPS on app startup if it is disabled, how can I do this programmaticaly? ...

How to call a .NET Webservice from Android using KSOAP2?

Hai to All,I have a problem while calling the webservice,i have a .NET web service in the server and i am using KSOAP2(ksoap2-j2se-full-2.1.2) in android.While running the program i got an runtime Exception like "org.ksoap2.serialization.SoapPrimitive". I dont know what to do.Here is my code. package projects.ksoap2sample; import org.k...

DDMS won't load (or doesn't parse?) KML file

I can't get DDMS to load any KML files. I have a KML file for example with the following in it: <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"&gt; <Placemark> <name>Simple placemark</name> <description>Attached to the ground. Intelligently places itself at the height of the underlying te...

Can I download an SQLite db on /sdcard and access it from my Android app?

I already found out that there is no way to bundle files in an .apk and have them on /sdcard, the best option so far being to download the large files upon first run. I came accross a tutorial saying how to bundle an sqlite db with the apk and then copy it so that it can be accessed with SQLiteDatabase (thus doubling the space needed, an...

How to Autostart an Android Application?

I'm not sure how to autostart an android application after the android emulator completes its booting. Does anyone have any code snippets that will help me? ...

Android animation

hello, I'm a new programmer , and several months ago I began studying in android. Now I have a question for your help. I use my animation to replace the translateAnimation used when activity enters or exits. The animation is a rotating animation but different from rotateAnimation which is already defined in freamworks. It rotates...

Android Application and Timers

Hello I have an android application which has a service running. After 20 mins from that service and other systems (such as GPS) starting I would like it to automaticly stop. I assume I need to use a Timer for that? Can someone show an example of how I could do it? ...

How to Build a Sensor Simulator for Android?

Hello, I am building a application for the Android platform and I would like to use the accelerometer. Now, I have found a very nice application for sensor simulation (OpenIntents' SensorSimulator) but, for what I want to do, a would like to create my own sensor simulator application. I have not found information on how to do this (I d...

How to launch email intent with an attached image

Hi, I am trying to launch an email intent with an attached jpg. I did: Intent intent4 = new Intent(Intent.ACTION_SENDTO, Uri.fromParts("mailto", "[email protected]", null)); startActivity(intent4); this launches the email activity. But when I try to add DataAndType (my jpeg attachment). It fails with android.content.ActivityN...

Regarding Multitasking in Android application

I want to launch more than one application at the same time.Like one application should run in the background when a new application is started,and i have to switch between those two application.If anyone having the code to do this please help me.Give some website links to know about the multitasking in android and how to achieve it. ...

how to know how many applications are running in the background in android?

I can run an application in background but i want to know how many applications are running in the background.Like in some mobile while pressing the center button a list of currently running applications are displayed.Is this is possible in android.If possible means give some code snippets and steps to achieve this. ...

OnClickListener on Tabs not working

Greetings, I am trying to get the Click - event when clicking on the currently selected tab of my TabActivity. The onTabChangedHandler is only called whenever the tab is changed, not if the currently active Tab is clicked. The debugger tells me i have the onClickListener Registered for the TabWidget within my TabHost. Am i registering...

What kind of OCR java library should i use in Android?

I would like to build an app that OCR a pictures and get text from them. What java library should i use? ...

How to hide an application icon in Android emulator?

I have an application which launch automatically after the booting finished,but the application icon is displayed in the android emulator.Now i want to hide that icon from the user.So that the user cannot know from the application is lanuch and they cannot launch that application manually. ...

How to register listening for any Contact changes on android

Hi, How to register listening for any Contact (add/remove contact, change in email/phone) changes on android? Thank you. ...

Protocol to secure a connection between a mobile device and a web service?

Hi, I'm looking for a protocol to secure a connection between a mobile device and a web service. I want to ensure that only the mobile device can perform actions on the web service and vice versa. Data doesn't need to be encrypted. I know Oauth, but it seems that it's more used to secure connections when you got 3 different entities (...