Android :: Droid Instrumentaion : Go Back To A Previously Launched Activity?

Feb 19, 2010

Is there anyway to go back to a previously launched Activity while running an Instrumentation test? Currently, when I use sendKeyDownUpSync( KeyEvent.KEYCODE_BACK);, this forces my test to exit, rather than go back to the previous Activity.

Android :: Droid Instrumentaion : Go back to a previously launched Activity?


Android :: Switch Back To Previously Selected Tab After Activity Is Recreated?

Jun 13, 2010

In my TabActivity the user may be asked to switch to browser activity for OAuth phase, and if the phase takes too much time, my activity will be killed. After the user switches back to my activity, its onCreate() method is invoked again and tabs are recreated.

So I would like to know if there is any simple way to switch back to previous tab, and keep the tab as what it was. For example, one of the tab views contains a ViewSwitcher child, and I want to switch back to the switched view after recreating the activity.

View 3 Replies View Related

Android :: AsyncTask To Run On Activity Start Fails After Previously Getting Cancelled

Sep 10, 2010

I am using an AsyncTask to fetch the ring tone for a contact when my application starts, it works fine until after my Activity closes a couple of times during the AsyncTask, after this happens the AsyncTask will only ever get to onPreExecute() and never doInBackground, so I can never fetch the ringtone then until either a force stop or device restart.

Why this might be happening? Why the AsyncTask would get to onPreExecute but then never run doInBackground()?

Here is my code: (Following the Shelves source code)

CODE:.....................

And onAddRingtone() is used in onCreate and onCancelRingTone() is used in onDestroy() as well as where you can see if in the code above. I have spent 3 days on this and I haven't been able to find a solution? Am I taking the wrong approach? Using cancel wrong? Is there a bug?

View 1 Replies View Related

Android :: Get Instance Of The Launched Activity

Jul 19, 2010

Is there any way to get the instance of a launched activity(or any view in that activity )of a application in another application.

View 1 Replies View Related

Android :: Recieveing A Notification When An Activity Is Launched

Jun 30, 2010

Is there a way of recieving a notification of some sort when a activity is launched. I'd like to monitor which applications are used and how often. Is is possible to register for some broadcast telling me when an application is launched, installed, unistalled etc? I believe I found a discussion or solution to this yesterday when I was looking for something else, but I'm not able to find it today.

View 3 Replies View Related

Android :: BroadcastReceiver To Listen For Activity Being Launched

Jun 22, 2010

I am wondering whether is possible to use a BroadcastReceiver to listen for an Activity being launched. I have no control of the Activity I need to know about as it is from the Android platform.

View 3 Replies View Related

Android :: Determine If A Specific Activity In An Application Can Be Launched

Jun 9, 2010

Applications can have any number of launchable activities. I know how to get the list of these activities via PackageManager.

Is there a way to determine which activities can be launched via startActivity?

For example, the Documents To Go app has different activities that will start Word, Excel, Powerpoint, PDF, etc... I am able to launch all o these just fine.

However, it also contains some activities that I am not able to launch with startActivity... If I attempt to do this I get a SecurityException.

I want to be able to determine which activities I can safely launch and which I cannot so I only present the user with a list of activities that I can safely launch from within my application...

View 1 Replies View Related

Android :: Detect When Another Activity Is Launched Or Loses Focus

Dec 3, 2009

Like the title says, I need to detect when my app loses focus because another app is launched (Phone call comes in, or user hits Home etc.).
Overriding Activity.OnStop does not work because that is called even when switching activities within my app.

View 3 Replies View Related

Android :: Task Activity Stack Always Reset When Launched From Home

Mar 24, 2009

I am just starting on an Android app and I am puzzled about why my Task activity stack is being reset any time the application is launched from the Home screen. I used the ADT tools to create the application in Eclipse. The main activity is ".UserLaunch" and it starts the activity ".About" when the user presses a button. If the user then presses HOME and then relaunches the app, .UserLaunch is displayed and is the only thing on the stack.

.UserLaunch has the launchMode singleTask. .About is standard. According to the documentation at http://developer.android.com/guide/topics/fundamentals.html#lmodes: "However, a "singleTask" activity may or may not have other activities above it in the stack. If it does, it is not in position to handle the intent, and the intent is dropped. (Even though the intent is dropped, its arrival would have caused the task to come to the foreground, where it would remain.) "The Task stack should be brought to the foreground and .About should still be displayed. I added Logging to all of the lifecycle events (edited to remove timestamps and shorten DEBUG/ and INFO/ to D/ and I/) and you can see that when HOME is pressed, .About cycles through onPause and onStop (as expected). Then when the app is again launched, .About is destroyed and .UserLaunch is restarted D/UserLaunch:(670): onCreate() D/UserLaunch:(670): onStart() D/UserLaunch:(670): onResume() I/ActivityManager(52): Displayed activity com.cequint.cityid/.UserLaunch: 4910 ms I/ActivityManager(52): Starting activity: Intent { comp= {com.cequint.cityid/com.cequint.cityid.About} } D/UserLaunch:(670): onPause() D/About(670): onCreate() D/About(670): onStart() D/About(670): onResume() I/ActivityManager(52): Displayed activity com.cequint.cityid/.About: 1031 ms D/UserLaunch:(670): onStop() I/ActivityManager(52): Starting activity: Intent { action=android.intent.action.MAIN categories= {android.intent.category.HOME} flags=0x10200000 comp= {com.android.launcher/com.android.launcher.Launcher} } D/About(670): onPause() D/About(670): onStop() D/dalvikvm(670): GC freed 413 objects / 34128 bytes in 72ms I/ActivityManager(52): Starting activity: Intent { action=android.intent.action.MAIN categories= {android.intent.category.LAUNCHER} flags=0x10200000 comp= {com.cequint.cityid/com.cequint.cityid.UserLaunch} } D/About(670): onDestroy() D/UserLaunch:(670): onRestart() D/UserLaunch:(670): onStart() D/UserLaunch:(670): onResume() Here is the relevant section of the Manifest: <application android:icon="@drawable/icon" android:label="@string/ app_name"> <activity android:name=".UserLaunch" android:label="@string/app_name" android:launchMode="singleTask" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".About" android:launchMode="standard"> </activity> </application> Anyone have any ideas why this is always resetting the Activity Stack?

View 11 Replies View Related

Recovery State Of First Activity Launched?

Jan 15, 2010

I have an application that launch a thread when a ToggleButton is pressed, but if I press the home button, a new activity is started (I can return to the first activity if I press the back button), but I want to recovery the first activity launched state, which have the reference of the initial thread.

This is my code:

org.test.test.java:

////////////////////////////////////////
package org.test;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import android.widget.ToggleButton;

[code]....

View 5 Replies View Related

General :: App That Run Shortcut (activity) When Launched

Jul 21, 2012

Various parts of the Android system or Android apps are designed to launch a program, but aren't capable of launching an application shortcut. For example, they're willing to run a timer application, but they aren't willing to run its "start timer now" shortcut. One example is the samsung ICS lock screen, which is neat in other respects but suffers from this really lame limitation.

Is there an app that can be configured to run another app's shortcut? For example, I could configure the lock screen to launch "Fast Shortcut Helper", and fast shortcut helper will have already been configured to run the "start timer now" shortcut.

View 2 Replies View Related

Android : Multiple Activity Instances Launched By Same Intent. Bring One Uniquely To Foreground?

Nov 12, 2010

I'm struggling with my app that launches multiple instances of the same Activity using the same intent. My main activity is of class type A and it does a startActivity() of two children that are of the same class type B. So we have B1 and B2 launched. If B1 and B2 are both paused (by pushing back button and making sure finish() is not invoked on them so they are truly paused), how can A uniquely bring either B1 or B2 to the foreground again? I do want to launch a new B activity. I want to uniquely bring B1 or B2 to the foreground.

so both B1 and B2 were created like this... Intent intent = new Intent(context, B.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent);

Now I want A to bring B1 (or B2) to the foreground/front so I use the below code, but how do I distinguish B1 or B2 when starting the activity? This only brings the last instance of B that was on top to the foreground.

Intent intent = new Intent(context, B.class); intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); startActivity(intent);

I've tried keeping around references to B1 and B2 and doing something like this, but this also only goes to the last instance of activity class B that was on top...

Intent intent = new Intent(B1context, B.class); intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); B1context.startActivity(intent);

I even tried this, but it still doesnt get me my unique B1 or B2... Intent intent = B1.getIntent(); // i.e. the original intent that started me startActivity(intent); // still only brings to front the last B that was on top.

View 3 Replies View Related

Android :: Start An Activity And Return Back To Original Activity

Jan 26, 2009

I have an application with contains multiple activities. The main activity will start the others ( use startActivity() ) depends on user event, when an activity close, it calls finish() and return back to main activity. It appears to behavior like that.

However, the "problem" I see is main activity's onCreate function is called every time. I think the the main activity should be placed in the activity stack and simply push to front when others exit, therefore only onResume, onStart are called. Is there some flag I need to set or I misunderstand the activity behaviro?

In child activity, besides calling finish() or startActivity for main activity, what is other way to move main activity to front?

View 2 Replies View Related

Android :: How To Clear Activity From Second Activity Going Back To Home Screen?

Mar 3, 2010

example scenario is: from login screen - main screen - then when i clicked a hide button the app will go to home screen, and when im going to click the app again the main screen would be called.

View 2 Replies View Related

HTC Droid Eris :: Android System Recovery Not Launched

Aug 8, 2010

I am trying to root my phone, but I can't get the system recovery to come up. I'm following the Universal Eris Root for Dummies thread here and it said to power off and then power up while pressing the volume up key. This does not launch the system recovery for me, just boots up like normal.

View 4 Replies View Related

HTC Droid Eris :: Apps Launched Automatically

May 18, 2010

I use Taskiller to "kill" or end active programs that I'm not using, so as to reduce battery drain. I notice with 2.1 that every time I power up, lots of apps are launched automatically. This wasn't the case with 1.9. Anybody know if there's a way to prevent this?

View 11 Replies View Related

Android :: What About Previously Purchased Applications - New Phone

Jun 8, 2009

With the purchased apps, what happens when you upgrade to a newer android phone? Are these apps bound to you by your google user or by phone? Is it maybe done through the cellular carrier?

View 4 Replies View Related

Android :: Can I Recover Applications Previously Downloaded?

Aug 17, 2010

I lost my Incredible and just received my replacement. Is there any way to recover the applications that were on my old phone, or do I have to remember what I had and re-download everything?

View 4 Replies View Related

Android :: Retrieving Previously Purchased Apps

Nov 28, 2009

I just bought the app Avanced Task Killer for my moto cliq, great app by the way. But I'm going to return and exchange the phone for a new cliq or a mytouch because of some touchscreen issues. I was just wondering if I get a new phone will I be able to retrieve my purchased apps even if I change my phone to a mytouch?

View 3 Replies View Related

Motorola Droid :: Gmail Password Authentication Each Time Application Is Launched?

Nov 8, 2009

I am using the standard gmail app that comes with the motorola droid. However password authentication is only required the first time the application is launched. This means anyone who picks up your phone can see your email with one touch. Is there a way to require password authentication each time the application is launched?

View 5 Replies View Related

Android :: Back To Activity When Call Is Done

Nov 24, 2010

I am launching an activity to make a phone call, but when I pressed the 'End Call' button, it does not go back to my activity. Can you please tell me how can I launch a call activity which comes back to me when 'End Call' button is pressed?

View 5 Replies View Related

Android :: Back Button Activity

Aug 25, 2010

I was wondering how or if it is possible to exclude activities from the back buttons history list? For example not letting the user back into the Splash Screen?

View 2 Replies View Related

Android :: Back To Activity After WebView?

Nov 14, 2009

I've been searching and looking for this answer for quite some time now. I want to display a little HTML in a webView.

When the User read the HTML, he's supposed to use the back button to go back to the previous activity. However, it closes the App.

How can I make it go back to the last Activity? It would also be ok to display a soft back button or something. Here my code...

View 2 Replies View Related

Android : Activity And Back Button

Nov 2, 2010

on the ui i am having a back button displayed. there are three activities say A,B,C. Activity A is splash screen. Activity B is home screen. Activity C is edit screen. on edit screen only i am having a back button. when the user press that i open the activity B which also contains some sort of http request and response. i want that the previous activity from stack should get displayed? how can i achieve that? i am able to open previous activity on pressing the back button of device? when i press back button on device there doesnt goes any http request? i want to achieve this behaviour when i press the ui back button.

View 2 Replies View Related

Android : Back Button And Last Activity

Aug 17, 2010

My app chains some activities.

if you press the back button, you go back through old activities then you suddenly quit the application !

so I need to show a message like "do you really want to exit" if it's the last activity on stack

I know how to override the back button but i can't figure how to know how many activity are in history

CODE:..................

View 1 Replies View Related

Android : Back Key Destroy An Activity

Jul 14, 2010

I have an activity defined as below:

CODE:............

A strange thing is that, when running on emulator, and the back key is pressed, the activity was destroyed (I saw onDestroy() called in log). But when running on my Nexus One phone, and the back key is pressed, the activity is not destroyed (I didn't see onDestroy() called in log).

View 1 Replies View Related

Android : Need To Get Result Back From Activity?

Mar 10, 2010

I'm doing some network job in AsyncTask. Sometimes it requires communication with user. (connection is dropped, session is expired and so on). I want to pop up a dialog or launch an Activity, and then, depending on user's input, stop the job or redo it. I can launch any Activity from AsyncTask, but how to get result back? It seems to be possible only if I launch new Activity from another Activity. What are possible solutions?

View 5 Replies View Related

Motorola Droid X : Back Button Functionality - Cannot Simply Go Back One Menu Using The Back Key

Jul 15, 2010

This is my first android device and i'm loving it... but one thing that irks me is the use, or lack thereof, of the back button.

As I am navigating menus and options in the Settings, I cannot simply go back one menu using the back key. For example, if I go to Settings->Battery Manager->Battery Profile Options and want to go back to the Settings screen, I cannot.

Pushing the back button does nothing and I can only go back to the Settings menu by going Home, then re-entering.

Another quirk regarding the back button is when reading emails. Using a regular email account such as Hotmail, I cannot simply read an email and go back to the inbox using the button.

It makes navigating the phone very tedious.

View 5 Replies View Related

HTC Desire :: Way Of Removing The Previously Installed Apps

Sep 2, 2010

I've been meaning to ask this for a while but haven't got around to it.When you uninstall an app from your phone, via the market, that is the app entirely removed from your phone, isn't it?Is there any way of removing the previously installed apps from your downloads list on your market? Or are they there for your reference?

View 5 Replies View Related

General :: How To Access Previously Viewed Downloads

Feb 7, 2012

How do I access previously viewed downloads?

I know how to do it initially, but if I want to access that file again where is it?

I need specifics as I am new to the smartphone scene.

View 1 Replies View Related







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