[android-developers] Activity killed when users leave it every single time

2011-10-19 Thread GregAZ
My app contains 2 activities, one is mine which is not much more than the web browser control. The other is PayPal's for accepting money through the app. Up until recently everything was great. You leave the app, come back and you're right where you left off. But now, you leave the app and w

[android-developers] activity launches with wrong layout orientation

2011-10-07 Thread Simon
Hi, I have an activity that I have two layouts defined for: one for landscape and one for portrait. So in my layout folder I have activity.xml and activity_landscape.xml. When I am switching around orientation on my device the proper layout is loading on orientation change. However, if I am in

[android-developers] activity launches with wrong layout orientation

2011-10-07 Thread Simon
Hi, I have an activity that I have two layouts defined for: one for landscape and one for portrait. So in my layout folder I have activity.xml and activity_landscape.xml. When I am switching around orientation on my device the proper layout is loading on orientation change. However, if I am in

Re: [android-developers] activity running in background problem

2011-10-05 Thread TreKing
On Wed, Oct 5, 2011 at 6:58 AM, Rafael Maas wrote: > activity A starts activity B. > The user press back and activity B goes background. > In this case, activity B does not "go background", it gets destroyed. After ~30 minutes android kill activity B ( This is a normal android behavior... > i k

[android-developers] activity running in background problem

2011-10-05 Thread Rafael Maas
I have a IM client and this is my scenario: activity A starts activity B. The user press back and activity B goes background. After ~30 minutes android kill activity B ( This is a normal android behavior... i know :P) I try to set alwaysRetainTaskState =true and launchMode=singleTask in activity

Re: [android-developers] Activity gets (re)created when device goes to sleep?

2011-10-04 Thread Latimerius
On Mon, Oct 3, 2011 at 10:55 PM, rich friedel wrote: > As more of a band-aid, you could force keeping the device awake while your > app is running Maybe I could, yes, however the behaviour I'm seeing also happens when the user puts the device to sleep explicitly by pressing the power/sleep butto

Re: [android-developers] Activity gets (re)created when device goes to sleep?

2011-10-03 Thread rich friedel
As more of a band-aid, you could force keeping the device awake while your app is running -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this gro

Re: [android-developers] Activity gets (re)created when device goes to sleep?

2011-10-03 Thread Latimerius
On Mon, Oct 3, 2011 at 7:42 PM, Kostya Vasilyev wrote: > As for the activity being recreated, that's not considered a bug, but a > side effect of the top (your) activity's orientation being different from > the lock screen's. > I think I'll have to think about it before I come to terms with the

Re: [android-developers] Activity gets (re)created when device goes to sleep?

2011-10-03 Thread Kostya Vasilyev
No, don't take out screenOrientation if you need it, it is not deprecated, and having it in the manifest is better than forcing it dynamically from code. As for the activity being recreated, that's not considered a bug, but a side effect of the top (your) activity's orientation being different

Re: [android-developers] Activity gets (re)created when device goes to sleep?

2011-10-03 Thread Latimerius
On Mon, Oct 3, 2011 at 7:04 PM, Kostya Vasilyev wrote: > Make sure you didn't accidentally leave an orientation lock in the > manifest, android:screenOrientation="landscape". > Well I have this in my manifest quite intentionally ;-) - it's a game, it depends on landscape and doesn't make any s

Re: [android-developers] Activity gets (re)created when device goes to sleep?

2011-10-03 Thread Kostya Vasilyev
Make sure you didn't accidentally leave an orientation lock in the manifest, android:screenOrientation="landscape". You would also see this sequence if your activity runs in landscape mode just because of how you're holding the device, and the device's lock screen uses portrait mode (or vice v

Re: [android-developers] Activity gets (re)created when device goes to sleep?

2011-10-03 Thread Latimerius
On Mon, Oct 3, 2011 at 6:37 PM, Kostya Vasilyev wrote: > Is your activity locked to a particular orientation? > The actual activity in my program where I first noticed this is locked to landscape. However, the logs I quoted in my previous message are from a (almost) stock SkeletonActivity samp

Re: [android-developers] Activity gets (re)created when device goes to sleep?

2011-10-03 Thread Kostya Vasilyev
Is your activity locked to a particular orientation? 03.10.2011 20:34, Latimerius ?: On Mon, Oct 3, 2011 at 12:35 AM, metin ögtem mailto:android.develope...@gmail.com>> wrote: it could be continue onResume()..You can logging it.. Sorry, I'm not quite sure what you mean by that. W

Re: [android-developers] Activity gets (re)created when device goes to sleep?

2011-10-03 Thread Latimerius
On Mon, Oct 3, 2011 at 12:35 AM, metin ögtem wrote: > it could be continue onResume()..You can logging it.. Sorry, I'm not quite sure what you mean by that. What else do you think I should be logging that could explain the behaviour? -- You received this message because you are subscribed to

Re: [android-developers] Activity gets (re)created when device goes to sleep?

2011-10-02 Thread metin ögtem
it could be continue onResume()..You can logging it.. 2011/10/2, Latimerius : > Hello, > > I'm seeing something about the Activity life-cycle that I don't believe is > covered in the Dev Guide section on Activities. > > I start an activity which causes its onCreate() and onResume() to be called: >

[android-developers] Activity gets (re)created when device goes to sleep?

2011-10-02 Thread Latimerius
Hello, I'm seeing something about the Activity life-cycle that I don't believe is covered in the Dev Guide section on Activities. I start an activity which causes its onCreate() and onResume() to be called: D/SkeletonActivity(19132): onCreate() D/SkeletonActivity(19132): onResume() The Activity

Re: [android-developers] Activity has leaked IntentReceiver - Are you missing a call to unregisterReceiver() - Sprint Samsung Galaxy s2 (Android 2.3.4)

2011-09-26 Thread Glorious Red Leader
Mark thanks for taking the time to help. Going to contact the samsung people. On Mon, Sep 26, 2011 at 4:20 PM, Mark Murphy wrote: > It's probably a device-specific bug, given the rest of your testing. > > On Mon, Sep 26, 2011 at 7:17 PM, Glorious Red Leader > wrote: >> Thanks for the reply, I t

Re: [android-developers] Activity has leaked IntentReceiver - Are you missing a call to unregisterReceiver() - Sprint Samsung Galaxy s2 (Android 2.3.4)

2011-09-26 Thread Mark Murphy
It's probably a device-specific bug, given the rest of your testing. On Mon, Sep 26, 2011 at 7:17 PM, Glorious Red Leader wrote: > Thanks for the reply, I thought you were on to something but the error > still occurs when I use: > > > Intent intent = new Intent(ActivityOne.this, ActivityTwo.class

Re: [android-developers] Activity has leaked IntentReceiver - Are you missing a call to unregisterReceiver() - Sprint Samsung Galaxy s2 (Android 2.3.4)

2011-09-26 Thread Glorious Red Leader
Thanks for the reply, I thought you were on to something but the error still occurs when I use: Intent intent = new Intent(ActivityOne.this, ActivityTwo.class); Or button.setOnclickListener(this); @Override public void onClick(View v) { Intent intent = new Intent(this, ActivityTwo.cla

Re: [android-developers] Activity has leaked IntentReceiver - Are you missing a call to unregisterReceiver() - Sprint Samsung Galaxy s2 (Android 2.3.4)

2011-09-26 Thread Mark Murphy
On Sat, Sep 24, 2011 at 8:05 PM, Glorious Red Leader wrote: > This sample application will throw a "leaked IntentReceiver" error by > following these steps: > > > - Somehow aquire a Sprint Samsung Galaxy s2 Epic Touch 4g (the one > with the 4.52" screen) > - Launch application > - Press "Launch Ac

[android-developers] Activity has leaked IntentReceiver - Are you missing a call to unregisterReceiver() - Sprint Samsung Galaxy s2 (Android 2.3.4)

2011-09-26 Thread Glorious Red Leader
I have not seen this error on the Droid Bionic, Motorola Photon 4g, HTC Evo 3d, or the Thunderbolt - only on the Sprint Samsung Galaxy sII Epic Touch 4G (android 2.3.4). This sample application will throw a "leaked IntentReceiver" error by following these steps: - Somehow aquire a Sprint Samsung

[android-developers] Activity Help

2011-09-21 Thread Derek Winstead
Hello all, I have an issue where my activity has a spinner up top to change the listview below it with data from the sqlite database. Using this activity everything works fine. However, when I click on one of the list items it runs the next activity intent and after this new activity finishes l

Re: [android-developers] Activity issue

2011-09-19 Thread TreKing
On Fri, Sep 16, 2011 at 7:19 AM, vijay pratap wrote: > I have 4 individual activities in my project. One of them i made tabhost > and other three activities are active on its three tab. That's generally a bad idea. Look into fragments. --

[android-developers] Activity issue

2011-09-19 Thread vijay pratap
Hii. I have 4 individual activities in my project. One of them i made tabhost and other three activities are active on its three tab. It all working fine but on pressing device key(Home , Menu, back and search ke) application is forcefully closing. Error message :Runtime classcastexception. it is

Re: [android-developers] Activity GUI updated by thread data: implementation error?

2011-09-08 Thread Miguel Morales
BTW, this line seems strange: Message msg = Message.obtain(hRefresh, 1, i1, i2); The way I do it is by using a bundle with the message and putting whatever data in the bundle. On Thu, Sep 8, 2011 at 10:14 AM, Kostya Vasilyev wrote: > signal 11 is a segmentation fault, probably in native code. >

Re: [android-developers] Activity GUI updated by thread data: implementation error?

2011-09-08 Thread Kostya Vasilyev
signal 11 is a segmentation fault, probably in native code. 08.09.2011 10:52, giangiammy пишет: D/Zygote ( 529): Process 650 terminated by signal (11) -- Kostya Vasilyev -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this gr

Re: [android-developers] Activity GUI updated by thread data: implementation error?

2011-09-08 Thread Miguel Morales
That looks correct, your issue may lie somewhere else. On Thu, Sep 8, 2011 at 9:52 AM, Rafael Maas wrote: > Try using a async thread  to run the "update socket method"  and > update your interface using > > http://developer.android.com/reference/android/app/Activity.html#runOnUiThread(java.lang.R

Re: [android-developers] Activity GUI updated by thread data: implementation error?

2011-09-08 Thread Rafael Maas
Try using a async thread to run the "update socket method" and update your interface using http://developer.android.com/reference/android/app/Activity.html#runOnUiThread(java.lang.Runnable) 2011/9/8 giangiammy : > Hi all, > > I have an activity updating the GUI with data coming from a socket. >

[android-developers] Activity GUI updated by thread data: implementation error?

2011-09-07 Thread giangiammy
Hi all, I have an activity updating the GUI with data coming from a socket. In my activity I implemented an Handler: int REFRESH = 1; final Handler hRefresh = new Handler(){ @Override public void handleMessage(Message msg) { Integer i1; Integer i2; i1 = m

[android-developers] Activity doesnot receive onDismiss event of Custom Dialog

2011-09-05 Thread Kapuddi Liu
hi, Below is the code scratch. After OK button is clicked, the dialog dismisses. But onClick function does not be called. Why? Thanks. ** HelloworldActivity.java public class HelloworldActivity extends Activity{ /** Called when the activity is first created. */ @Override publi

Re: [android-developers] Activity comms

2011-08-29 Thread TreKing
On Sun, Aug 28, 2011 at 11:59 PM, kypriakos wrote: > Now if Activity A is terminated and restarted, is there a way to get a > handler to Activity B again? > What "handler to Activity B" ? > If it calls the above statements again and since the SINGLE_TASK flag is > called I am expecting that A

[android-developers] Activity comms

2011-08-28 Thread kypriakos
Hi all, I start Activity B from Activity A using: Intent intent = new Intent(); intent.setClass(androidContext, org.myActB..class); intent.setFlags(intent.FLAG_ACTIVITY_SINGLE_TASK); intent.putExtra("from act A", "Hello"); androidContext.startActivity(inte

[android-developers] activity transition animations

2011-08-26 Thread hachi
I am trying to make an activity transition for the switch between animations. What I want is that if I go from activity A to activity B, A gets a certain animation. I am adding this statement right after startActivity() : overridePendingTransition(0, R.anim.to_right) the thing is this doesnt work

Re: [android-developers] Activity remains in focus for some time after calling finish()

2011-08-24 Thread Yahor Paulavets
Hello, Try to use this solution, in our corporate blog: http://softteco.blogspot.com/2011/07/how-to-close-activity-and-all-children.html It helps me to solve issue the issue how to "close" entire application. Happy coding (: Best regards, Yahor On Wed, Aug 24, 2011 at 8:35 AM, tushar sahni wro

Re: [android-developers] Activity remains in focus for some time after calling finish()

2011-08-23 Thread tushar sahni
Hi I have to support multiple resolutions for the game that i have to develop,How can i do this,One Resolution is 320*480 and other is 480 x 800 pixels I have added the following lines in the manifest for supporting to multiple screens If anyone has worked on it can he/she have a look on it R

Re: [android-developers] Activity remains in focus for some time after calling finish()

2011-08-23 Thread Dianne Hackborn
onStop is not called until the other activity has been displayed and is idle. If it is taking a long time to show, run the profiler on your code to see what you are doing that is so slow. On Tue, Aug 23, 2011 at 11:42 AM, Amit wrote: > Hi, > > I am stuck here. I have an activity (say Activity 1

[android-developers] Activity remains in focus for some time after calling finish()

2011-08-23 Thread Amit
Hi, I am stuck here. I have an activity (say Activity 1) with a button. On click of the button I am starting a new activity (say Activity 2 )and then calling finish(). But what I see is, before starting Activity2, Activity1 remains in the focus for a while (5-7 secs approximately) and then it desa

[android-developers] Activity test fails on getActivity()

2011-08-18 Thread Ab Caballero
I am unit testing the activities in an application. The first activity test runs fine and everything passes. The second test fails at getActivity() returning a NPE. I am assuming that since this is unit testing that getActivity() should launch the activity even if this activity is reliant on a prev

Re: [android-developers] Activity onPause and onResume Question

2011-08-13 Thread TreKing
On Fri, Aug 12, 2011 at 1:32 PM, TheWanz wrote: > 1. How do I keep my global class from being destroyed when the onPause is > called? Every time I rotate the phone or enter the preferences activity, > the object is trashed. > Without knowing what you mean by "global" or what kind of object this

[android-developers] Activity onPause and onResume Question

2011-08-12 Thread TheWanz
I would like to know the best practice approach to accomplishing this in Android: Main Activity: Contains 1 textview, 1 opens menu and 1 global thread- based class. The global thread-based class that opens a socket and reads in data via TCP/IP, and sends thread-safe notification to the main acti

Re: [android-developers] Activity Lifecycle question

2011-08-12 Thread Mark Murphy
On Fri, Aug 12, 2011 at 1:02 PM, hectordu...@yahoo.com wrote: > Hi guys, > My app has two activities with a parcelable object going forward and > back between them, which works fine. The problem comes when user goes > back (from activity 2 to main activity) by using the hardware > keyboard. In tha

[android-developers] Activity Lifecycle question

2011-08-12 Thread hectordu...@yahoo.com
Hi guys, My app has two activities with a parcelable object going forward and back between them, which works fine. The problem comes when user goes back (from activity 2 to main activity) by using the hardware keyboard. In that moment the method onStop suppose to be called and the activity must lau

[android-developers] Activity Start Performance Improvement - how to dealt with loading the data while the UI continues to be displayed

2011-08-12 Thread gml
Hi guys, I have simple application that loading the data needed upon the Activity starts which it consume about 2-3 minutes. Then, the UI displayed after that long process. Present Scenario: 1) click the app to start. 2) progress bar pop-up while doing the data loading in my localDB (about 2-3min

[android-developers] Activity Flow Brain Teaser

2011-08-10 Thread Neal Sanche
Hi All, I have been learning about the complex problem of Activities, launch flags, Intent flags, tasks and the Activity stack. I've been trying to solve what I thought would be a simple problem. Our application has a Search Activity that can possible be entered through two paths: 1) ServerListA

[android-developers] Activity Starter Help

2011-08-02 Thread Gustav Axmyren
Hi I am developing a flashlight app to android and need the activity starter class and package and so on. For HTC Desire or just plane android -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-deve

Re: [android-developers] Activity question

2011-07-29 Thread TreKing
On Fri, Jul 29, 2011 at 2:13 PM, b_t wrote: > I have an app A and an app B. B has an activity called C. > > C can be displayed in two ways: > > - launch B which displays C > - launch A and from A I start activity C > How are you launching Activity C that belongs to App B from App A? ---

[android-developers] Activity question

2011-07-29 Thread b_t
Hi, I have an app A and an app B. B has an activity called C. C can be displayed in two ways: - launch B which displays C - launch A and from A I start activity C Now C activity is displayed in two different task. What flag should I use when I start C from app A if I would like that C belongs

Re: [android-developers] Activity finish() not working properly

2011-07-14 Thread Kostya Vasilyev
I'm thinking that activity B crashes somewhere in onCreate / onStart / onResume, and Android restarts the last known good activity A. Check the logcat for crash messages. -- Kostya 14.07.2011 18:46, Jalal пишет: Dear Android Community, I'm having a strage problem and have no idea what might

[android-developers] Activity finish() not working properly

2011-07-14 Thread Jalal
Dear Android Community, I'm having a strage problem and have no idea what might be wrong. I have an option menu in an Activity, let's call it A, in which one of the options needs to start a new Activity, B, and close A. The problem is that the caller activity, B, is not closing. Instead Activity B

[android-developers] Activity behind a floating window does not update but receives touch events

2011-06-23 Thread jgaribay
Hi, I am launching a floating activity to be displayed on top of the screen when a call is placed or received and I want this activity do not interfere with the call, the user should be able to answer a call and hang up. With the following code I almost accomplish this, the only problem is that a

[android-developers] Activity and Method

2011-06-13 Thread Andrei
Good afternoon. I have work with Google maps. I want to boot card (when the user presses the call menu)determined by its location. As well I have a database with addresses and there is a button to see the map. I want to be when you click on this button, the user gets it to the address that he chos

[android-developers] Activity gets Terminated using AssetManager list() on 2.1 - 2.2

2011-06-11 Thread Ender
Hello I am creating an app that gets 600 HTML files from the assets file when I try to get a the list of files using the AssetManager list() the the application terminates. When I debug and I try to step threw it The application just stops I don't get no errors in the LogCat. I also noticed that w

Re: [android-developers] Activity/Service in separate process

2011-05-15 Thread Mark Murphy
On Sun, May 15, 2011 at 5:15 PM, Mark Cz wrote: > Is it possible for two apks to SHARE one service that runs in one of > the apks process or runs in a different process ? Yes. > Meaning, > I have two apks running in two different processes (the normal way), > for simplicity each apk has only one

[android-developers] Activity/Service in separate process

2011-05-15 Thread Mark Cz
Hi, Is it possible for two apks to SHARE one service that runs in one of the apks process or runs in a different process ? Meaning, I have two apks running in two different processes (the normal way), for simplicity each apk has only one activity. In addition each apk has one , can I share this s

Ang.: Re: Ang.: Re: Ang.: Re: Ang.: Re: [android-developers] Activity is destroyed than instantly created when pushing the sleep/lock-screen button

2011-05-13 Thread Jump
Yes, that's what I was referring to. I also saw the Handling Runtime Changes post. Thx! (Regarding the header. If you mean the "Ang:". I am responding directly from google groups webgui which defaults to my local languag

Re: Ang.: Re: Ang.: Re: Ang.: Re: [android-developers] Activity is destroyed than instantly created when pushing the sleep/lock-screen button

2011-05-13 Thread Dianne Hackborn
It would be nice if you could set up your e-mail app to retain the same header. The correct way to do this is to use things like: http://developer.android.com/reference/android/app/Activity.html#onRetainNonConfigurationInstance() On Fri, May 13, 2011 at 5:31 PM, Jump wrote: > There's nothing wr

Ang.: Re: Ang.: Re: Ang.: Re: [android-developers] Activity is destroyed than instantly created when pushing the sleep/lock-screen button

2011-05-13 Thread Jump
There's nothing wrong with my app. I just want to prevent it from restarting unnecessarily since it loads textures n' stuff. If i need it, I will handle configuration changes at runtime. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To

Re: Ang.: Re: Ang.: Re: [android-developers] Activity is destroyed than instantly created when pushing the sleep/lock-screen button

2011-05-13 Thread Dianne Hackborn
Um. You totally missed my point. Don't throw a bunch of stuff in to config changes. FIX YOUR APP. I said, throwing things into config changes does NOT fix the problem. You need to make sure your app correctly deals with config changes, because they CAN and WILL happen. Once you do that, then

Ang.: Re: Ang.: Re: [android-developers] Activity is destroyed than instantly created when pushing the sleep/lock-screen button

2011-05-13 Thread Jump
Wow, your assumption was correct! :D I am forcing landscape mode since it's a game. I just added android:configChanges="orientation" and this was the solution to my problem. I see the importance of configChanges. I will probably add keyboard and keyboardHidden as well. Locale is ok if it destro

Re: Ang.: Re: [android-developers] Activity is destroyed than instantly created when pushing the sleep/lock-screen button

2011-05-13 Thread Dianne Hackborn
The reason an activity is destroyed and re-created is to run it with a new configuration. You haven't said all that much about what you are doing so it is hard to know what is going on, but I would assume that you have forced an orientation for your activity, and the lock screen has a different or

Re: Ang.: Re: [android-developers] Activity is destroyed than instantly created when pushing the sleep/lock-screen button

2011-05-13 Thread Justin Anderson
*> I am familiar with the activity lifecycle. To make myself clear. I am finding the behavior strange in this case.* My point still stands... You can't control the Activity Lifecycle. I think it is strange as well. But that doesn't mean I have any control over it. If you feel it is a bug then f

Ang.: Re: [android-developers] Activity is destroyed than instantly created when pushing the sleep/lock-screen button

2011-05-13 Thread Jump
I am familiar with the activity lifecycle. To make myself clear. I am finding the behavior strange in this case. 1. Running the app then bringing it to the background by pressing home and then pushing the lock button does not destroy my activity. 2. Running the app then pushing the lock button d

Re: [android-developers] Activity is destroyed than instantly created when pushing the sleep/lock-screen button

2011-05-12 Thread Justin Anderson
*> When I run my game app and then push the sleep/lock-screen button my activity is destroyed (onDestroy is called) and then directly after, onCreate is called.* * * Welcome to the Android Activity Lifecycle... You have no control over it... * * *> Angry Birds actually keeps the music running when

[android-developers] Activity lifecycle: invoking finish

2011-05-11 Thread Vikram
I have two activities A and B. A is in the stopped mode and B is running. When I invoke finish() on B, A.onStart() and A.onResume() are being invoked before B.onStop() and B.onDestroy(). Is this normal behavior? I find this a little strange! I want to cleanup stuff before I hand over control to B.

[android-developers] Activity is destroyed than instantly created when pushing the sleep/lock-screen button

2011-05-10 Thread Jump
Hello When I run my game app and then push the sleep/lock-screen button my activity is destroyed (onDestroy is called) and then directly after, onCreate is called. However, if I first put my app in the background then push the sleep/lock-screen button the activity is not destroyed. Can anyone

Re: [android-developers] Activity accidentally re-loading with AdMob

2011-05-09 Thread Richard Marsh
Nope. there's nothing strange that I can notice. My only guess is that if the ad isn't finished loading and the user goes to another activity, the AdView gets "refocused" if that makes any sense. You have to be quick for this to happen or the ad has to take a long time. On Mon, May 9, 2011 at 6:1

Re: [android-developers] Activity accidentally re-loading with AdMob

2011-05-09 Thread TreKing
On Mon, May 9, 2011 at 5:14 AM, Richard Marsh wrote: > I have the following issue, where I load an ad with AdMob on my home > screen. While it is busy loading the user can navigate away to another > activity. If the ad didn't finish loading before then, it automatically > takes the user back to th

[android-developers] Activity accidentally re-loading with AdMob

2011-05-09 Thread Richard Marsh
I have the following issue, where I load an ad with AdMob on my home screen. While it is busy loading the user can navigate away to another activity. If the ad didn't finish loading before then, it automatically takes the user back to the home screen from it's current activity. So how do I

Re: [android-developers] Activity with launchMode = singleTop is created again

2011-05-02 Thread Dianne Hackborn
A singleTop activity won't be re-created in this situation. You can use "adb shell dumpsys activity" to look at what is going on with the activity stack, and look at the log to see what messages are printed. That said, I *strongly* recommend you to not use singleTop for an activity that is intend

[android-developers] Activity with launchMode = singleTop is created again

2011-05-02 Thread Akshay Goel
Hello, I have an application with a single activity, whose launchMode is set to "singleTop". My application is an image viewer/editor & hence a user can go to the gallery, choose an image & select my application from the share menu to launch my application. Now, I am performing the following step

Re: [android-developers] Activity Lifecycle Documentation Question

2011-04-27 Thread Mark Murphy
On Wed, Apr 27, 2011 at 3:38 PM, Eric wrote: > http://developer.android.com/guide/topics/fundamentals/activities.html > > Why does the doc say this, "For example, if your activity has a thread > running in the background to download data from the network, it might > create that thread in onCreate(

[android-developers] Activity Lifecycle Documentation Question

2011-04-27 Thread Eric
Regarding this: http://developer.android.com/guide/topics/fundamentals/activities.html Why does the doc say this, "For example, if your activity has a thread running in the background to download data from the network, it might create that thread in onCreate() and then stop the thread in onDestro

Re: [android-developers] Activity Restart On Rotate Phone

2011-04-20 Thread Me
Dear Anik Ralhan; Add below lines to your menifest file android:configChanges="orientation" and one of activty method need to override . . public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); } If still

Re: [android-developers] Activity#onRetainNonConfigurationInstance vs Fragment#setRetainInstance

2011-04-15 Thread Dianne Hackborn
This doesn't work. It is still associated with the original context/activity, so at the very least you are now leaking that object and worse it may be trying to do stuff with it (such as use the WindowManager service) that is now on a context that is no longer live. On Fri, Apr 15, 2011 at 4:54 P

Re: [android-developers] Activity#onRetainNonConfigurationInstance vs Fragment#setRetainInstance

2011-04-15 Thread Shri Borde
It actually worked with Fragment#setRetainInstance. I just had to call ((ViewGroup) fragmentLayout.getParent()).removeView(fragmentLayout) before I could reuse the views. I got crashes in native code when I tried doing the same with Activity#onRetainNonConfigurationInstance. On Fri, Apr 15, 2011

Re: [android-developers] Activity#onRetainNonConfigurationInstance vs Fragment#setRetainInstance

2011-04-15 Thread Dianne Hackborn
Sorry, you just can't re-use a WebView across config changes -- a view is instantiated with a Context it runs in, which is the Activity that created it. You can't change this context later, when you have a new Activity instance. On Fri, Apr 15, 2011 at 8:33 AM, Shri wrote: > I have a WebView in

[android-developers] Activity#onRetainNonConfigurationInstance vs Fragment#setRetainInstance

2011-04-15 Thread Shri
I have a WebView in my Activity which I want to reuse across config changes so that the webpage does not get reloaded after every orientation change. I can use Activity#onRetainNonConfigurationInstance/getLastConfigurationInstance for this. However, I have heard that Fragment#setRetainInstance is b

Re: [android-developers] Activity Restart On Rotate Phone

2011-04-11 Thread anik ralhan
hey can you please send me the steps that you followed,actually m also facing the same problem On Sun, Apr 10, 2011 at 2:56 PM, Me wrote: > Hi thanks group > I solved this one > > > > On Mon, Apr 11, 2011 at 1:34 AM, TreKing wrote: > >> On Sun, Apr 10, 2011 at 1:12 AM, Jons Jean wrote: >>

Re: [android-developers] Activity Restart On Rotate Phone

2011-04-10 Thread Me
Hi thanks group > I solved this one On Mon, Apr 11, 2011 at 1:34 AM, TreKing wrote: > On Sun, Apr 10, 2011 at 1:12 AM, Jons Jean wrote: > >> problem is this when I rotate phone its activity got restart , How I can >> handle it ? >> > > Read the documentation. This is covered extensively

Re: [android-developers] Activity Restart On Rotate Phone

2011-04-10 Thread TreKing
On Sun, Apr 10, 2011 at 1:12 AM, Jons Jean wrote: > problem is this when I rotate phone its activity got restart , How I can > handle it ? > Read the documentation. This is covered extensively in the life cycle documentation. >From google I find the way to handle this to add below line in menif

[android-developers] Activity Restart On Rotate Phone

2011-04-10 Thread Jons Jean
Hi community ; I am facing a problem , I am working on an application where I am creating dynamic UI ,I install this application in my android phone > problem is this when I rotate phone its activity got restart , How I can handle it ? >From google I find the way to handle thi

Re: [android-developers] Activity Life cycle question

2011-04-05 Thread lbendlin
I use "start activity for result" and then signal the "take me all the way back" as one of the results. This is then cascaded through all the items on the stack. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send

Re: [android-developers] Activity Life cycle question

2011-04-05 Thread Gergely Juhász
Please read first the documentation: http://developer.android.com/guide/topics/fundamentals/tasks-and-back-stack.html http://developer.android.com/guide/practices/ui_guidelines/activity_task_design.html There are more solutions for your problem. For example when the user presses the "Back A button

[android-developers] Activity Life cycle question

2011-04-05 Thread Serdel
Maybe the title of this topic is not quite proper but it considers the life cycle of android activities. I looked through many open source project and saw that usually when an activity is opened form a basic one the main screen is not closed. When the user presses the 'back' button the new activity

[android-developers] Activity without GUI - Activity

2011-04-05 Thread Gorka
Hi, I want to deploy an application that reads a NFC tag and shows the text on the screen with a Toast and reads it using a texttospeach class. So, I don´t want to start an activity because I don´t need any GUI. Is that possible? I have tried to remove the activity tags from the manifest but that

Re: [android-developers] Activity lifecycle

2011-04-02 Thread Mark Murphy
On Sat, Apr 2, 2011 at 3:58 AM, b_t wrote: > When activity A launches activity B then it is possible that A > destroyes before the user navigates > back from B? Yes. > So A will be recreated and don't remain object state? A will be recreated and will be passed a Bundle (to onCreate() and onRest

[android-developers] Activity lifecycle

2011-04-02 Thread b_t
Hi, Maybe an easy question. When activity A launches activity B then it is possible that A destroyes before the user navigates back from B? So A will be recreated and don't remain object state? T. -- You received this message because you are subscribed to the Google Groups "Android Developers"

Re: [android-developers] Activity lifecycle... still a mystery to me

2011-03-12 Thread Kostya Vasilyev
See below: 12.03.2011 23:55, DulcetTone пишет: 1. The phrasing on the legs into and out of onPause() are vague. Does "another activity comes in front of the activity" pertain to the case where my activity is simply going away because finish() was called? It means just what it says - one case

Re: [android-developers] Activity lifecycle... still a mystery to me

2011-03-12 Thread TreKing
On Sat, Mar 12, 2011 at 2:55 PM, DulcetTone wrote: > I want to perform certain actions when the BACK or HOME keys are pressed, > and ignore cases where a third-party activity simply pops up on part of the > screen and then goes away. > You can override the back key and do whatever you need to do

Re: [android-developers] Activity lifecycle... still a mystery to me

2011-03-12 Thread Mark Murphy
On Sat, Mar 12, 2011 at 3:55 PM, DulcetTone wrote: > I want to perform certain actions when the BACK or HOME keys are > pressed, and ignore cases where a third-party activity simply pops up > on part of the screen and then goes away. Why? -- Mark Murphy (a Commons Guy) http://commonsware.com |

[android-developers] Activity lifecycle... still a mystery to me

2011-03-12 Thread DulcetTone
I find the flowchart of Activity lifecycle pretty ambiguous. In a perfect world, it would receive a little more work to resolve the gray, but I'll throw out some example issues. 1. The phrasing on the legs into and out of onPause() are vague. Does "another activity comes in front of the activity

[android-developers] Activity touch event leading to EPIPE in ginger bread !!

2011-03-01 Thread Pink
Hi, I am working on ginger bread. Some times i am getting error no 32 for touch event. I did as follows. Started activty A. From activity A i am trying launch activity B bad finishing A. After B is displayed i am closing B also. This i am repeating for multiple times and

Re: [android-developers] Activity without UI

2011-02-24 Thread Marcin Orlowski
On 24 February 2011 11:11, Dudero wrote: > I have heard that an Activity must not contain UI - so is in some > cases an Activity a better solution than a Service? That's quite misunderstanding of basics. Is wheel better than bucket? > Can anybody give me an example for a useful case of an Activ

[android-developers] Activity without UI

2011-02-24 Thread Dudero
Hello, I have heard that an Activity must not contain UI - so is in some cases an Activity a better solution than a Service? Can anybody give me an example for a useful case of an Activity without UI? Greetz dudero -- You received this message because you are subscribed to the Google Groups "

[android-developers] Activity inside TabActivity doesn't work properly

2011-02-19 Thread Edwin
Hi All, I have an activity named A which has TTS and service functions. It works well if it is a single activity, but TTS and service are not working if I put A into a TabActivity. I am not sure which part of the program has problem. Maybe TabActivity have some effect for the onActivityResult in A

Re: [android-developers] activity and service as a package

2011-01-26 Thread TreKing
On Wed, Jan 26, 2011 at 12:27 PM, Titus wrote: > I am making a service which is having its own package name while > an activity has a diff package name? > That's not a question? > is it possible to have a single manifest file which will do the job ? > Not only is this possible, it's what you

[android-developers] activity and service as a package

2011-01-26 Thread Titus
Hello, I am making a service which is having its own package name while an activity has a diff package name? is it possible to have a single manifest file which will do the job ? The reason why i wanted in one install was that I didn't want the user to have the trouble of multiple installations.

[android-developers] Activity / Live Wallpaper communication in Android

2011-01-10 Thread Josh
I've got a live wallpaper that I'd like to communicate with from an Activity in the same package. I've never done any work with services. Would I be able to use the Local Service pattern, or am I restricted because my service is a live wallpaper, and need to use Intents or AIDL? I think the flow w

[android-developers] Activity state

2010-11-22 Thread pedr0
Hi at all, I want see the state of my activity (Pause Stop Resume etc etc) without override each methods like this: onPause(){ super(); Log.d(TAG, "this activity"+name+"will come in Pause state"); } There is a way to see that using an Android tools ?DDMS allow to see this, I think not but I ask

[android-developers] Activity won't display on Motorola Milestone

2010-11-17 Thread Omer Gilad
Hi, I've encountered a weird situation on Motorola Milestone where an activity (started from background) doesn't get displayed visually on the screen, although it thinks it does (onCreate() gets called, ActivityManager logs "Displayed activity XXX..."). It doesn't happen on other devices so I know

<    1   2   3   4   >