android

App is not stable

Ive developed some app for Android, the Weirdthing that on the emulator it's pretty stable, but when i tryied on real device of a friend(nexus), it crushes times to times, cant finger on a specific case when exaclly it happens. i realy want to distribute the app asap, but i cant find any leaks in my emulator.. what I should do? how can i...

Notification on new Email with Android...

Hi, is there a way for an app to get notified when a new email has been received? My goal is, to rise an alert (play a sound, vibrate, whatever) if an email with a specific topic gets received (think of it like an "filter" or a "rule"), but I dont want to check the email server by myself. I think I'm searching for something like "andro...

Secure HTTP Post in Android

I have a pretty basic helper class that I'm using to do all my Http Get/Post stuff. I'm using HttpGet, HttpPost, and HttpClient from the org.apache.http library. All of my stuff works fine over HTTP, but as soon as I tried to consume a service that works over HTTPS, I get a ClientProtocolException when executing the request. The only ...

Passing Activity to non-activity object properly

In my app ive got a non-activity object which it's role is being a manager class. many times i need to pass "source activity" to methods as parameter to that manager class in order to make some operations on that activity. for exaple let's assume we have MyActivity which gotta do some toast. so i have this manager class called MyManage...

android Convert phone number in International Format

I'd like to know whether it's possible to have phone numbers converted into international format when a call is outgoing. For instance, if a french user (sorry it's the only format i know i won't make a mistake :-) try to call with the national format : 01.47.12.34.56 then a method will convert it into international format like this : +...

Duplicate Android database from another application?

I have two versions of the same application. When people upgrade from the free version to the paid version I'd like the free database to be copied to the pro database location. Is there a way I can access the database file itself if it belongs to another application? Does the file even belong to the application or is it generally acces...

Is my app in /system ?

Hi! My application can be installed and run on android, in two different places: "/data/MyApplication" and "/system/MyApplication". I need to know where at the moment is my application installed, if it is in "/data/" or if it is in "/system". Can anyone help? Thank you very much ...

Allocation tracker disabled

For some reason the allocation tracker is disabled in my ddms.. i can see the logcat.. also i can see the proccess, but for some weird reason the proccess are shown as '?' in their name. what could be the reason? Thanks, ray. ...

How can I find out the row /column of a view inside table layout

Suppose I have a view inside TableLayout, like this: TableLayout tableLayout; View view = (View)tableLayout.findViewById(R.id.control); How can I find out the view's row/column within the TableLayout? ...

How To setKeepScreenOn()

How can I reference the Activity View from within the onCreate() method so I can use view.setKeepScreenOn(). thanks patrick ...

Android emulator browser detecting

Hey there, I'm developing a mobile version of a website. I'm currently using this Javascript to detect and redirect the user: if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/Android/i)) || (navigator.userAgent.match(/iPod/i))) { window.location = "http://sitena...

How to start a different program?

Hi there, i think a simple question but i did not find anything about doing it right. I want to start a mediaplayer from my app and send that player a file to play(stream). Would be nice to automatically choose the player associated with the mime type of the file i process to the player. The only way to start an app is this one. But...

Round bottom corners on Android Bitmap?

Hey all, what would be best practice for clipping the bottom borders of a Bitmap? Just manipulate the Bitmap itself or overlay an alpha mask drawable or ...? The whole story: I've a Listview which looks like the iPhone's grouped UITableView style. I would like to display a Bitmap in the last row, but for now the Bitmap overlaps my cust...

How can you tell when an Android device has a Geocoder backend service?

According to the Geocoder documentation, the class provides methods into a backend service which may or may not exist on the device. If the geocoder doesn't exist on the device, theoretically a geocode request will return no results. However, how can one differentiate between no results due to there being no backend geocoder service vs...

Specify view to use when ListView is empty?

Hi, I can't find this in the docs - isn't there a way to specify a View to use for a ListView if the adapter is empty? Thanks ...

Context problem in Android example "Google Map View"

I've tried to implement the Google Map View tutorial on the Android developer site, but I keep running into a problem when trying to display an AlertDialog when I click on the overlay image. The problem is that mContext is null when calling AlertDialog.Builder dialog = new AlertDialog.Builder(mContext); in HelloItemizedOverlay's onTa...

Best way to implement Client <-> Server <-> Database architecture in an Android application?

I am making an Android application. Since it is so simple, I first thought I could simply eliminate the need for Java application on the server which acts as a middleware. I tried directly connecting to the database using the JDBC driver for MySQL but my program is crashing so I'm not sure if Android "supports" the JDBC driver for MySQL....

How to use the Parcelable class properly in Android

I have a class (below) that I want to send to a Service Class through an Intent. I have implemented the Parcelable interface but am unsure how to actually send and retrieve the entire object including the current state of the object. In particular @Override public void writeToParcel(Parcel dest, int flags) { //I need this ...

display item of listview

I have a list view having several items and it is multichoice list. I want to display the checked item of list view. how i can do this.can anyone help me??? ...

How to get principal name from HTTPRequest in CXF JAX-RS webservice method called from android app.

How can I get the principal name, session and ideally check if the principal is authenticated with the Spring Security context inside a CXF JAX-RS webservice method receiving a call from an Android client? This is the code I am currently working with. I have commented where and what I am trying to get. Android code to call webservice: ...