android

Securing communication from android to a web service

I'm a relative newbie to web and mobile development and especially to security so obvious answers are still appreciated. I want my android app to be able to log in to a simple web service with a username and password. What's the best way to send this information securely and keep the user logged in for an entire session? ...

Does Android UI development lend itself well to a particiular design pattern?

Does the Android platform lend itself well to a particular style of UI programming like MVC or MVP? Most of my UI experience is with spaghetti code on a very old embedded device or in GWT with MVP so I do not know where to start. ...

Detecting which selected item (in a ListView) spawned the ContextMenu (Android)

I have a ListView that will allow the user to long-press an item to get a context menu. The problem I'm having is in determining which ListItem they long-pressed. I've tried doing this: myListView.setOnCreateContextMenuListener(new OnCreateContextMenuListener() { @Override public void onCreateContextMenu(ContextMenu menu, final View v...

Android AsyncTask testing problem with Android Test Framework

I have a very simple AsyncTask implementation example and have problem to test it using Android JUnit framework. It works just fine when I instantiate and execute it in normal application. However when it's executed from any of Android Testing framework classes (i.e. AndroidTestCase, ActivityUnitTestCase, ActivityInstrumentationTestCas...

How to find serial number of Android device?

I need to use a unique ID for an Android app and I thought the serial number for the device would be a good candidate. How do I retrieve the serial number of an Android device in my app ? ...

Android Row becomes Unclickable with Button

I have a listView, where each row has a button in the row layout. However, this seems to make the row itself unclickable. How can I make both the button and row clickable? Thanks. ...

Run a service in the background forever..? Androd

Hi. I am doing a Battery Consuming research on the Android phone. I want to run a Battery Check every 10 min till the battery totally dies. I have been having problems to make it work. At my first try, I use a timer in a service class, and schedule the battery check every 10 mins. But soon I found that the service got paused when the sc...

Update JAR used by Android app in Eclipse

My app uses an API from an external JAR file. This JAR file has been added into my project and added in the build path. My project builds and runs just fine, but now I need to update the JAR file (some code in those classes has changed). I created a new JAR and copied it into my project after removing the old one. Do I need to "re-import...

Correct path to sqlite database used by JAR imported into my Android app ?

My Android app is using a database through an API packaged in an external JAR. Since the JAR is opening/updating/closing the SQLite database file, do I need to make sure it uses its own package name instead of my own? Im getting errors where it fails to open the database file and Im guessing its because the package name Im telling it to ...

where is database file in the device

Hi, iam trying to locate the database files on my nexus device.. is there anyway of doing it without rooting the device? thanks ray. ...

Automatic animation

Hi I have a ImageView that needs to be slide in from the bottom. Remain there for 5 sec. And then slide out. How do I do that? There is no user intervention. Thanks Rajesh Muthu ...

Android HttpPost: how to get the result

I have been trying long to send an HttpPost request and retrieve response but even though I was able to make a connection I don't yet get how to get the string message which is returned by the request-response HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://www.myurl.com/app/page.php"); ...

emmulator-5554 issue

Hi When i try running the simple Hello Android program i get the following message in console emulator-5554 disconnected! Cancelling 'com.android.hello.HelloAndroid As a result the program does not run. Can any one help me out of this... Thanks in Advance.. sandeep ...

Using the Android SDK i'm not seeing any EXIF in my JPEG's

I'm using the android.hardware.Camera class to take pictures and i'm finding that no exif data is stored in the images at all. If i use the camera application on my DROID all of the exif data is being saved. I've tried setting the rotation with Set() and SetRotation() to see if I can get some exif data to show up. When I view the image...

how to add 4 image view to flipper in android?

Hi all,i want to add 4 imageviews to flipper at a time.Please provide some sample code my code is final ImageView imageview=new ImageView(this); imageview.setBackgroundResource(R.drawable.img1); final ImageView imageview1=new ImageView(this); imageview.setBackgroundResource(R.drawable.img2); ...

problems with adding TableRow dynamically vs getMeasuredHeight/getHeight

Hi, I've got a problem. I wish to add rows dynamically to a TableLayout. When adding these rows I need to be able to get the size of the View, so I attempt to perform this during onSizeChanged() but the new rows don't display. So I tried onFinishInflate(), but then I don't have access to the size (getMeasuredHeight returns 0) output...

Variable search hint

In my searchable.xml in my android project, I get to specify a hint that appears in the edittext, when no text is written. Is there any way to dynamically set this? In my action, I have two search buttons, that are calling startSearch passing their own parameters. I would like to set hints that reflect the selected action, based on whic...

Access video, image share feature in android

Hi, is it possible to call a share features of android from our application ?If possible how to access or call this feature? ...

Read data from an Android USB attachment

Is there anyway to read data from an attachment through the USB port on an Android device? In particular, an EKG. Most the work can be done by the hardware of the device to simplify the output to a single number, a voltage reading. If its not possible, what about modifying an accessory that can already communicate with an android device?...

Android - Forced locale resetted on orientation changes

I try to force the locale in my app to one the user specified. As this may be used to demonstrations, I want to change the language/locale in the app and not anytime for the whole device. I looked around SO and tried to use every hint I found here. The result: I can restart my test activity with the new language, but if I change the ori...