[android-developers] Inflating Views in Android

2013-01-19 Thread Arun Kutty
Suppose I have 5 Layout to be inflated at the start of the application . Is it a good practice to inflate the views in aysnc task and onPostExecute of Async task add that inflated view to the parent layout.. -- You received this message because you are subscribed to the Google Groups Android

[android-developers] What is the exception -- WindowManager$BadTokenException

2013-01-19 Thread askl
*Hello friend,* *I've published an android application to google play few days ago. And today i received a message to Crashes ANRs. here is the message* android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@2bf3b048 is not valid; is your activity

[android-developers] Re: help me to link up all of my activities

2013-01-19 Thread Prabu Siabuabu
Hi Bob, thanks for your details explanation.. it give me an insight about my issue.. i'll search more about startActivityForResult method. thanks a lot dude! On Friday, January 18, 2013 5:07:42 AM UTC+7, bob wrote: You probably want to focus on the *startActivityForResult* method: public

[android-developers] Main Activity/Service Communication

2013-01-19 Thread dashman
This topic has been hashed quite a bit - but there doesn't seem to be a clear answer - at least not one that i could find. Background - I'm developing an app and I think some processing can be done in the background - e.g. database and image processing (create bitmaps, rotate etc - i can do that

[android-developers] Proximity Sensors that provide the absolute distance rather than simply binary near|far

2013-01-19 Thread marcpolo
Hi, I'm looking for an Android device that has a proximity sensor that provides a distance measurement. The Android user guide states that some sensors only provide binary values representing near and far and this has been true for all Android phones I have tested, e.g. Samsung GS3, HTC One X.

Re: [android-developers] Main Activity/Service Communication

2013-01-19 Thread Harri Smått
Hi, You could also consider option 3; Start an asynchronous task (native Java Thread or AsyncTask) for your processing needs. -- H On Jan 19, 2013, at 3:15 PM, dashman erjdri...@gmail.com wrote: Option 1 - create a service - that waits and returns status. haven't figured out a way of doing

[android-developers] GCM

2013-01-19 Thread Goutom
Hi I want to build a GCM like service for android of my own.Is there any guideline for building these kind of service? Regards Goutom Roy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

Re: [android-developers] GCM

2013-01-19 Thread Mark Murphy
On Sat, Jan 19, 2013 at 11:23 AM, Goutom goutom.sust@gmail.com wrote: I want to build a GCM like service for android of my own. Please define what a GCM like service is. Also, you might consider explaining what it is that is driving you to create your own, rather than use GCM itself. You

[android-developers] Stop all the threads in ExecutorService

2013-01-19 Thread Red Planet
Hello. I have to stop all the threads from an ExecutorService object. I used the example from http://developer.android.com/reference/java/util/concurrent/ExecutorService.html#awaitTermination(long, java.util.concurrent.TimeUnit) and only 1 out if 15 threads was terminated. Why? Is it a

[android-developers] Stop all the threads from ExecutorService

2013-01-19 Thread Red Planet
Hello. I have to stop all the threads from an ExecutorService object. I used the example from http://developer.android.com/reference/java/util/concurrent/ExecutorService.html#awaitTermination(long, java.util.concurrent.TimeUnit) and only 1 out if 15 threads was terminated. Why? Is it a

Re: [android-developers] Inflating Views in Android

2013-01-19 Thread TreKing
On Sat, Jan 19, 2013 at 4:42 AM, Arun Kutty kutty.n.a...@gmail.com wrote: Suppose I have 5 Layout to be inflated at the start of the application . Is it a good practice to inflate the views in aysnc task and onPostExecute of Async task add that inflated view to the parent layout. Why would

Re: [android-developers] What is the exception -- WindowManager$BadTokenException

2013-01-19 Thread TreKing
On Sat, Jan 19, 2013 at 4:57 AM, askl amal...@gmail.com wrote: Can you help me to fix this issue..? A great help. Do a Google Search for the exception. You will find a lot of info on it. - TreKing

Re: [android-developers] Main Activity/Service Communication

2013-01-19 Thread TreKing
On Sat, Jan 19, 2013 at 7:15 AM, dashman erjdri...@gmail.com wrote: Suggestions? Have your Service send a Broadcast when it's done, then Receive it appropriately. - TreKing

Re: [android-developers] GCM

2013-01-19 Thread Kristopher Micinski
You should look for tutorials on how to implement push notifications. But any technique you will implement will definitely use more battery than using GCM, because GCM can be optimized for the device. Any new service you implemented would essentially need to be a background daemon: not good in

[android-developers] using Paint to draw text with specified locale on pre-API 17

2013-01-19 Thread Latimerius
Hello, I'd like to use Paint to draw test with en_US locale regardless of the default locale set on a device. I'm aware of Paint.setTextLocale(), however that function only exists since API 17 and our minSdkVersion is 7. Is there a way to achieve this on earlier Android version? Thanks in

Re: [android-developers] What is the exception -- WindowManager$BadTokenException

2013-01-19 Thread Lew
TreKing wrote: askl wrote: Can you help me to fix this issue..? A great help. Do a Google Search for the exception. You will find a lot of info on it. Also, askl, while it isn't really necessary this time, in general you should provide a code example that triggers the exception or

Re: [android-developers] using Paint to draw text with specified locale on pre-API 17

2013-01-19 Thread Romain Guy
The text locale on the Paint is used to resolve direction (right to left/left to right.) It won't affect text translations. On Sat, Jan 19, 2013 at 12:38 PM, Latimerius l4t1m3r...@gmail.com wrote: Hello, I'd like to use Paint to draw test with en_US locale regardless of the default locale

Re: [android-developers] Main Activity/Service Communication

2013-01-19 Thread dashman
I'm concerned about the overhead with this mechanism. Also not too sure how to notify the service of a new job. If the foreground activity and service share an object - i assume i can use standard java synchronization - i.e. wait() and notifyall() etc. On Saturday, January 19, 2013 2:03:24 PM

[android-developers] sliding in a new layout

2013-01-19 Thread dashman
i've got a nested layout that takes up the middle of a screen. on user input i'd like to slide a new layout over it - just the portion of the screen that the original layout spans. and then later slide it back up - and make it disappear. i was thinking about using relativelayout - initially

Re: [android-developers] Main Activity/Service Communication

2013-01-19 Thread Kristopher Micinski
You don't want to do that. The traditional Java types of synchronization methods don't really work well here because your process can die, and you shouldn't be passing references across activities anyway. Before being too concerned about the overhead of the mechanism you should profile it.

[android-developers] Not working calendar events query.

2013-01-19 Thread askl
Hello friends, i want to get calendar events using this query. Cursor cursor = getContentResolver().query( Uri.parse(content://com.android.calendar/events), new String[] { _id, title, dtstart, dtend }, null, null, dtstart ASC); *Manifest,xml* uses-sdk android:minSdkVersion=8

[android-developers] Re: sliding in a new layout

2013-01-19 Thread Guy Smith
I have similar functionality. I create a ViewGroup, large enough to hold the outgoing View below the incoming View. I replace the outgoing View with the ViewGroup in the tree, animate a translation, then replace the ViewGroup with the incoming View. It works well for me. Admittedly, I