Android :: Restoring Active Activity While Resuming Application

Apr 7, 2009

I have two activities running: MainActivity and ChildActivity. Whenever the user clicks in the button in MainActivity, the ChildActivity is launched. What I want to do is this:When the active activity is the ChildActivity and the user clicks the home button then relaunch the application (like opening from the beginning), I want to see the ChildActivity instead of MainActivity that is launched. However; This is happening only when the user clicks from recent activities window. (the window opened when you long press the home button).I had some suggestions actually work arounds and I tried to manipulate onStart, onRestart, onResume, onStop, onDestroy events. But, they didn't fully solve the problem. There should be a smart way out there.

Android :: Restoring active Activity while resuming application


Android :: Restoring Active Activity / While Resuming Application

Apr 7, 2009

I have two activities running: mainActivity and childActivity. Whenever the user clicks in the button in mainActivity, the childActivity is launched. What I want to do is this:When the active activity is the childActivity and the user clicks the home button then relaunch the application, I want to see the childActivity instead of mainActivity that is launched.I had some suggestions actually work arounds. I tried to manipulate onStart, onRestart, onResume, onStop, onDestroy events. But, they didn't fully solve the problem.

View 3 Replies View Related

Android :: Android Intent / Resuming Application Home Activity

Jul 10, 2010

I have an application that I have running a media player and I want to resume the activity from my applications home activity. I can successfully do this by adding the following flags to the startActivity Call:
myIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
I am worried that this is not an ideal way to do things since it took me a long time to find it. It made me think that no one uses it very much. Are there any pitfalls to using this method?

View 1 Replies View Related

Android :: Resuming An Activity From Notification

Mar 5, 2010

I have a notification in the status bar for my app.The problem with this is that when you press the home button from the app (pushing it to the background) then press on the notification in the list accessed from the status bar, it starts a fresh copy of the activity. All I want to do is resume the app (like when you longpress the home button and press on the app's icon). Is there a way of creating an Intent to do this?

View 1 Replies View Related

Android :: Home Button Not Resuming Last Activity

Sep 23, 2010

I am trying to solve an issue sort of similar to what was done here (link text)Except in my case where Activity A, started Activity B, started Activity C, when the user resumes the app after pressing the home button - I want C, the last Activity, to be displayed. Instead what is happening is I am back to A.Also on a side note I have discovered that even when I exit the application, if I hold down the Home button, my app is still listed as an active app even though in the LogCat I can see that it exited OK.Also, in case it matters, I did recently add android:launchMode ="singleTask" in order to make some notification logic work correctly. I was seeing the Home button behavior before that though.

Activity B actually has several Activities that it chooses from (it has a list of Intents) to display based on input it receives but launches them all the same way as Activty A launched B. Once the first Activity is displayed the user swipe the screen to navigate to the left or right screen. When the user swipes left or right, the current activity puts info in its return Intent that Activity B uses to display the next Activity. Also since logic outside of the user's control could prompt a change in the screen displayed, each Activty calls finish on itself in onStop to avoid back-button issues.

View 2 Replies View Related

Android :: Out Of Memory Resuming Application

Feb 22, 2010

My application uses a single activity to switch between different views. I premise I'm loading a good amount of bitmaps in one of this view (say the gamescreen view) constructor but I recycle everything on the onDetachedFromWindow method.All the Bitmaps are static and most of them loaded with BitmapFactory. decodeResource method.Furthermore I'm using a gallery wich content is a simple layout with eight imagebuttons.I know all the complications using this widget and all the risks of using static bitmaps, but, I guess my problem does not entail them because my application is running well if I try to switch between these two view (and I've tried to do it about 30 times without crashes!!!) but when I pause and resume the application two times (pause->resume->pause->resume) I run out of memory, and often without the crash message (it just stays on the actual view).

View 13 Replies View Related

Android :: How To Close Fore Ground Activity From Active Activity?

Sep 28, 2009

I created an application which is asynchronously communicating with the server. When the application makes a server request a new dialog (activity) with "loading" notification is created. The main activity implements methods for handling server responses and I would like to close the foreground activity when the main activity receives the answer from the server.

View 1 Replies View Related

Android :: Keeping Screen On While Activity Active

Jul 14, 2009

I have a map activity for which I would like to have the screen turned on as long it's active (the app consists of one activity only). When the activity is paused or stopped I want to return to normal on/off mode. Keeping the screen on works fine while the app is running but when I exit the app the screen stays on as well. What am I missing?

View 3 Replies View Related

Android :: Notification Bar Open Last Active Activity?

Nov 3, 2010

I am creating like timer application and when I start timer I have option to go to android Home or start any other activity .When I start timer I set a notification bar icon and if i use some other application (mean go from started timer activity) and now I need to go to back to my previously started timer activity by clicking on notification icon?When I click I am starting a new instance timer activity , not the previously started timer activity and if I then click back button it show me a previously timer activity .Question is: How to call previously started activity trough notification bar , not to start new instance of that activity?

View 2 Replies View Related

Android :: Confusion With Activity Stack And Restoring State / Whats Wrong?

Jan 11, 2010

I have a start activity page for my game (which is the root activity for my app) that just lists "Play", "Help", and "About" TextViews on the screen. Each TextView has a click listener which start the appropriate Activity for each. The GameActivity (started with explicit intent from clicking "Play") has onSaveInstanceState implemented to save state of the game. Its onCreate checks for non- null Bundle to restore this state. My problem is this:

1. Turn on Phone/Emulator 2. start my game with icon in launcher 3. Start page is displayed 4. click "Play" to start my GameActivity 5. play game for a few seconds 6. click home 7. state is saved (proven with debugger calling onSaveInstanceState) 8. start my game with the icon in launcher 9. start page is displayed

I was under the impression that by clicking the app icon from the launcher that my existing task activity stack would be restored with my GameActivity being on top and its onCreate being called for me to restore the state I saved. Instead I am getting a brand new instance of my start page. Also, if I long press home and choose my running game icon, then my game comes back exactly as I left it. However, this apparently is NOT using my onCreate restore state logic as onCreate is never called.

All of the documentation seems to say that the entire stack of activities will be restored when clicking the application icon from the launcher, but I just get a fresh instance. What might I be doing wrong?

View 2 Replies View Related

Android :: Determine What's Active Package Or Activity Running?

Aug 16, 2009

I want my background service to determine the active package or activity running.Is this possible?

View 4 Replies View Related

Android :: How To Refresh List View When Activity Still In Active Mode

Jul 24, 2010

I have a ListView that contains some data from sqllite table.the table is updated by some other process, and I would like to refresh it's data.The strange thing is that if I open another activity, then go back -it WILL refresh itself.

View 2 Replies View Related

Android : Get Active Context Dynamically Of An Application?

Sep 11, 2009

How can get the active context of an application?

View 3 Replies View Related

Android : Need Active Context Dynamically Of An Application

Sep 24, 2009

- Hide quoted text -

View 2 Replies View Related

Android :: Follow Up For Active Install Count - Application Updates

Oct 8, 2010

We wanted to follow-up. By now, you should have noticed that the installs metrics for your applications have been restored. We identified the problem as occurring with application updates only, have made some changes recently that should resolve and prevent this problem. Please let us know if this error persists.

If we can assist you further, please let us know. In my case, things have not changed at all. Downloads are increasing (1550) and active installs stabilized at 29% (the value before the drop was 44/45%). So, indeed active installs are increasing again - 29% is stable since three weeks - but the original percentage was not restored. Now, I don't know what to think... Maybe the problem is not solved, maybe in my specific case the active installs really dropped for a while (but it's curious that it only happened for a while...). BTW, I didn't release any new upgrade since then (I have a new one almost ready, but I'm beyond schedule because of personal problems) - and maybe the count would fix itself with new upgrades...

What would you do now? Is there anybody else for which the problem was not solved?

-- Fabrizio Giudici - Java Architect, Project Manager Tidalwave s.a.s. - "We make Java work. Everywhere." java.net/blog/fabriziogiudici - www.tidalwave.it/people Fabrizio.Giud...@tidalwave.it

View 6 Replies View Related

HTC Incredible :: How To Close Application From Active

May 16, 2010

Maybe others already know this or figured this out. Apparently our phones work a lot like a Blackberry. On a Blackberry if you hit the home key or end key to exit an app it will stay running. Same thing happens here. However, if you hit the return key to exit the app it will stop running.

I tested this out on my Incredible and it also works. I used Facebook and a couple other apps as examples. If I go in to the app and then leave the app by hitting the home key it stays as an Active backgrounded app. If I however use the return key to leave the app and return to my home screen then the app is listed as inactive cached. This could help a lot of people with battery life and sleep issues, but I'm not sure. I know the way Android works that background apps aren't supposed to really do anything There does appear to be a difference though. This also works on the Engadget app which I've heard people mention for not closing.

View 2 Replies View Related

General :: How To Change Active Root Application

Sep 22, 2012

So, my ROM comes preloaded with a root app that I've never heard of, and I want to use Superuser (and the Elite I paid for).

The bundled app came with a 'cleanup/uninstall' script, that I ran, that promised to remove itself and it's root-granting abilities.

Now, even though I've got Superuser (Elite) installed, apps are saying I don't have root.

How do I configure Android (or SU) to use SU as my root-granting application?

View 1 Replies View Related

Android :: Difficulty Resuming SurfaceView

Apr 24, 2009

I am stuck.My main activity creates and starts a SurfaceView.My app needs to access a listview via the options menu to change properties of the items shown in the view.Two strange things occur:

1.) When I scroll the listview quickly, the list sometimes gets farklempt.Words overlap each other.

2.) When I select the item and the app returns to the main activity, the thread is no longer alive.

If someone out there can offer help I will post the code.This will take a little effort.My code is loosely based upon LunarLander and the GLSurfaceView examples.If there is a good example (more recent example) someone can point me to, that would be boss.

View 8 Replies View Related

Android :: Suspending And Resuming Threads

Nov 17, 2009

We are developing an application that needs to suspend and resume threads like a debugger (meaning in a non-safe way like Object.wait() and Object.notify()).In the Java SDK the methods Thread.suspend() and Thread.resume() are deprecated but we can still use them. Also there is the Java debugger API which allows one to do that if you connect to the VM as a debugger. Is there some API for android we can use? Is there a published Java Debugger API we can apply for Android?

View 2 Replies View Related

Android :: Pausing And Resuming Tutorial

Apr 7, 2010

I'm having some difficulty figuring out the best ways to pause and resume my application. Is there any comprehensive tutorial or something similar that would help me make sure that I'm not missing any important steps?Mostly I'm just worried about not dealing with the memory being used by my application. There's a few apps I own that when you minimize them slow down the rest of the phone to a stand still and I want to make sure to avoid that.

View 1 Replies View Related

Android :: Resuming Large File Download

Sep 17, 2009

I am trying to implement the functionality to resume a large file download, but have not found how to start downloading from a position that is not at the beginning of an InputStream.I am currently using the InputStream.skip() method to go to the position where I want to resume the download, but have found that this method actually reads all the data over the network and then throws it away.I would appreciate some help in learning the correct way to start reading from the resume offset of the internet file being downloaded, so that I can avoid wasting the phone network bandwidth, and also avoid the extra time delay caused by re-downloading all the data that was already previously downloaded.

View 2 Replies View Related

Android :: Find All Active Alarms Which Currently Active Set To Go "off"?

Jul 3, 2009

Is there a way to find all the alarms which is currently active set to go "off"?

View 2 Replies View Related

Android :: Broken OpenGL Texture Output After Resuming App

Jul 28, 2009

I've run into a very strange problem regarding OpenGL texture outputs, which only occurs when the app is resumed (particularly when leaving after pressing Home, and going back into the app).I'm not sure how or why, but it appears to be that it's reading bitrate of the pixels incorrect, or something else entirely. Furthermore, this issue only occurs on the device itself (testing on my G1/Dream), not on the emulator.Code as well as example screenshots in the zip file show exactly what I'm talking about. And to completely replicate the issue I've included the 2D sprite object framework I've developed for OpenGL so the situation is exactly the same as what I've run across when developing my game, so if it's somehow an issue in my framework you may be able to spot it.

View 6 Replies View Related

Android :: Pausing / Stopping And Starting / Resuming Java TimerTask Continuously?

Jan 20, 2010

I have one simple question regarding Java TimerTask. How do I pause/resume two TimerTask tasks based on a certain condition? For example I have two timers that run between each other. When a certain condition has been met inside the task of first timer, the first timer stops and starts the second timer, and the same thing happens when a certain condition has been met inside the task of second timer.how do I pause timer1 while running timer2 and vice versa while timer2 is running? Performance and timing is my main concern as this needs to be implemented inside another running thread. By the way I am trying to implement these concurrent timers on Android.

View 4 Replies View Related

Android :: Application Menu Rather Than Each Activity In Application?

Jul 27, 2009

Is it possible to attach Menu to an application rather than each activity in the application? I have 20-23 activities in my application and it doesn't make sense me to add same menu to all the activities.

View 5 Replies View Related

Sprint HTC Hero :: Downloads Getting Interrupted And Not Resuming With Dolphin Browser

May 1, 2010

I like to download podcasts to my hero which can take a while because they're pretty big files. If I get an email or text while downloading it pauses my download and says waiting for data connection. The same thing happens sometimes when it bounces from WiFi to Ev. The only way I can get it to start downloading again is to start another download. This is annoying so does anyone know a better way to resume a download or is there some setting I can change?

View 1 Replies View Related

Sony Ericsson Xperia X10 Mini/pro :: App Didn't Auto Install After 100% Downloaded / Resuming It Manually?

Nov 29, 2010

Recently I have experience this problem, I have downloaded some aplication from Market, it's already 100% but it's not installed on my phone, when I click on it, still said downloading, even it's already 100% and I have been waiting 1 hours, is there any way to resuming download manually? If I press cancel download, it will start from 0 and will happen again, getting tired with this :'( but this is not always happen to all application, mostly big size application.

View 1 Replies View Related

Android :: 3 Activity In My Application?

Oct 14, 2010

I have 3 activity in my application. My first activity (Main) has 2 button that starts other activities (One & Two). The One Activity starts a countdown timer on UI. When I click back button Android closes this activity and when I re-open activity, my timer is resetted.

I try also overriding:

CODE:.....

And it's works correctly but when I re-open the Main Activity, Android shows me my timer activity. How can I resolve this problem?

View 1 Replies View Related

Android :: Run Application From Last Activity

Jan 23, 2010

I have an application with several Activities. My A Activity has the Manifest Intent filter parameters: action.MAIN and category.LAUNCHER. after its being loaded I call Activity B and finish() A since I don't use it anymore.

After I run my application, go from Activity A to B and press the Home button, when I relaunch it from the applications menu or from the Market app for ex.(not by a long press on the Home button), it starts from the A Activity and do not save its last Activity B.

I definitely know that this is possible to relaunch an application from its last Activity (some application from the Market do support it) and I think that this can be determined by the Manifest parameters but I don't know which one.

How to implement it so my application can relaunch from its last Activity B?

View 2 Replies View Related

Android :: Launching Another Activity From Application

May 22, 2010

I am trying to launch another application from my Activity. Something weird happens when I am running this code :
Intent myIntent = new Intent( Intent.ACTION_MAIN, null );
myIntent.addCategory( Intent.CATEGORY_LAUNCHER );
myIntent.setFlags( Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED );
ComponentName compName=new ComponentName(myArray[i][0], myArray[i] [1] );
// String[][] myArray myIntent.setComponent( compName ); startActivity( myIntent );

I have this error :
android.content.ActivityNotFoundException: Unable to find explicit activity class { com.android.settings/com.android.settings.Settings};
Have you declared this activity in your AndroidManifest.xml?
But when I replace this line
// myArray[i][0] = "com.android.settings" // myArray[i][1] = "com.android.settings.Settings" ComponentName compName=new ComponentName(myArray[i][0], myArray[i] [1] );
with ComponentName compName=new ComponentName("com.android.settings","com.android.settings.Settings");
And without any modification in my manifest, it works!

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved