Android :: Which Activity Will On The Front If The Process Was Re-started
Jul 21, 2010
Suppose my application P started Activity A, and A started Activity B, then the activity stack contained A and B, with B at the top.
After that, I opened other apps by pressing Home button. Suppose after a while, the process of application P is killed by the OS. Then, I press Home button to select application P. At this time, which activity will be brought to the front, Activity A or Activity B?
View 1 Replies
Sep 23, 2010
I have a very simple android project. I got the following error message when I try to run it. The emulator is running but the application doesn't come up. I couldn't find any useful information online.
CODE:..................
View 3 Replies
View Related
Aug 25, 2010
CODE:..........
Here is the code where the problem lies....
It doesn't give me an error it says exactly this when I run the android emulator
"[2010-08-25 09:12:42 - doppler_test] ActivityManager: Warning: Activity not started, its current task has been brought to the front"
What I think this means is that the intent of the bluetooth function and the button intent is only operation on a hierarchy system. What I mean by this is that if I were to move the button opperator above the Bluetooth stuff the button will work, but currently when the app is run Bluetooth works but when I press the search button nothing happens.
What else may be helpful is my XML code for the button so here it is......
CODE:..........................
View 1 Replies
View Related
Nov 2, 2010
I want to display a splash screen followed by my trial.class.I am not getting any error but warning as:
Warning: Activity not started, its current task has been brought to the front
I have different-2 approches for this each time this warning is being displayed.
CODE:.....................
View 8 Replies
View Related
Apr 20, 2010
I have an application consisting of two activities (call them Display and Preferences) and one service which listens for incoming phonecalls. When it detects one it launches the Display-activity with a delay of 3sec in order to let the PhoneApp launch first. The Display- activity is transparent so the user can still use the PhoneApp as normal (ie answering the call) even though my Display-activity is "on top". So far so good
Now to my problem. Lets say that the Preferences-activity is active when there is an incoming call. The PhoneApp is launched on top of the Preferences-activity as expected. However when the Display-activity is launched the Preferences-activity pops up as well, hiding the PhoneApp. My question is if it is possible to work around this in some way? Since I do not want my Preferences-activity to block the PhoneApp and hence making it impossible for the user to answer the incoming phone call.
View 3 Replies
View Related
Jul 5, 2010
I have developed an App that launches and works fine on Android 1.5 and 1.6. When I try and use it on version higher then that the app's activity starts, progress dialogs pop up and I can see my Async Task executing and the info being returned via Logcat. No errors or exceptions are shown. But the Activity never displays. All I see is the progress dialog showing over the home screen and then nothing. The process is active and running under the DDMS view.
View 1 Replies
View Related
Nov 2, 2010
I have a TabActivity, and each Tab corresponds to its own Activity. In one of them, in the onCreate method, I use startActivityForResult to show a dialog (specifically, Bump's BumpAPI activity).
code:...............
The problem is that when the screen orientation changes, it tries to create the tab's activity again which makes another BumpAPI dialog, resulting in multiple stacked on top of each other. Do I have a hook into the started activity to cancel the previous one when the orientation changes?
A workaround seems to be to add a button that when clicked, starts the second activity, but that adds an unnecessary step.
Also, I can't fix the screen orientation for the entire tabActivity because some of them require typing and users may want to use their physical keyboards.
View 1 Replies
View Related
May 1, 2010
I have following problem with my application: From my main activity ("activity 1"), there is a menu from which user can launch an action. This action will result in an Intent being received by a BroadcastReceiver, defined in my application. Finally, this BroadcastReceiver will start an activity ("activity 2") to deal with this intent.
The problem is that I have a "quit application" entry in my menu, and I can only finish() currently active activity. ie I am not able to finish "activity 1" from the menu of "activity 2". And I can't use startActivityForResult() as "activity 2" can't be started from "activity 1". Any suggestion would be much appreciated Thank you very much guys, regards.
View 4 Replies
View Related
Aug 2, 2010
Whenever the memory needs to be reclaimed, the process is being killed by Activity Manager Service in killPidsForProcess. I have a back button in my activity window on right corner of the title bar.
I want to kill the activity completely on clicking the close button. Can I reuse the same function and will it have any major effect? Please help me out in this.
View 3 Replies
View Related
Aug 27, 2010
My app is comprised of a set of reusable Activities that other apps can reuse. For various reasons, I would like my Activities to be launched in context of the invoking Activity's process, instead of always being launched in my Activity's process (default behavior on Android). How can I achieve this?
View 1 Replies
View Related
Mar 31, 2010
I just want to get numbers of times to be used for each Activity.
So the very straightforward method I thought is increasing the count for an Activity when it was started. But how can I get the information?
View 3 Replies
View Related
Jun 18, 2009
Is there a way to do this?
Can you access the activity stack in a way to grab what activity came before the one now in view?
I have a situation where an activity needs to know where it was started from, so it knows what data to display in that current activity.
View 7 Replies
View Related
Oct 19, 2010
How can I know what Activity has started the current Activity? Is there any specific method like, i.e. getIntent().getCallerActivity() or the only way is saving some information within the Intent using putExtra()?
View 1 Replies
View Related
Aug 25, 2010
I have a central activity that can be launched from two separate classes. I was hoping that in this central activity I could have an IF statement like
if(this.getIntent() == MainMenu.class)
{
// Do something here
}
But obviously that isn't legal so how could I structure an expression to check from what class an intent was started.
View 2 Replies
View Related
Jun 25, 2010
I have small simple Service and big MainActivity with UI. Service is called periodically from AlarmManager. My Service need to know if MainActivity is on the screen and inform MainActivity about state changing.
View 3 Replies
View Related
Jun 17, 2010
I've a service which listens to user request for ending one activity and starting another activity. For Ex: Say there are activities1,2 ,& 3. Now if there is already activity1 started by someother activity then based on the user request i need to stop activity1 and start activity2 or activity3. If the acitivity1 is started by my service then i can do finishactivity(requestcode) and shall receive a call to onActivityResult() then i can start next activity 2 or 3. But can i stop the activity1 which is started by some other activity from a service?
View 2 Replies
View Related
Mar 19, 2010
I've successfully implemented a BootReceiver, AlarmManager, and Service per the code here: http://github.com/commonsguy/cw-advandroid/tree/master/SystemServices...
Inside the doWakefulWork method of the Service I am instantiating a few classes, but some of them require my Activity to be running. How do I actually start the Activity? The code above only starts the AlarmManager and Service.
There are also times where the Activity *is* already started, like if the user manually opened it. So I also need to start the Activity "only if it's not already running". Hows that work?
And what about the situation where the user first installs your application and may not even reboot their phone for a week. In that case, do you have to start the Service from the Activity? But then the Service will die with the Activity.
View 7 Replies
View Related
Jun 30, 2010
At the beginning Activity is launched by an Intent and something is done with this Intent. When I change orientation of my Activity, it's reloaded again and Intent is passed to the Activity. How can I clear that Intent to prevent Activity from using it again?
View 1 Replies
View Related
Apr 14, 2010
Lets suppose that i have an activity A, that activity is moved to background(function moveTaskToBack is used), and after while i want to bring this activity to front again. This code is used: Activity A = getActivity(); Intent i = new Intent(A, A.getClass()); i.setAction(Intent.ACTION_MAIN); i.addCategory(Intent.CATEGORY_LAUNCHER); i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); A.startActivity(i);
Activity is on screen, but when i invoke later moveTaskToBack on A activity, activity is not moved to backgorund. Does anyone know why?
View 4 Replies
View Related
Apr 11, 2010
I've got an Android application which needs to be woken up sporadically throughout the day.To do this, I'm using the AlarmManager to set up a PendingIntent and have this trigger a BroadcastReceiver. This BroadcastReceiver then starts an Activity to bring the UI to the foreground.All of the above seems to work, in that the Activity launches itself correctly; but I'd like the BroadcastReceiver to notify the Activity that it was started by the alarm (as opposed to being started by the user). To do this I'm trying, from the onReceive() method of the BroadcastReceiver to set a variable in the extras bundle of the intent,Can anyone tell me what's different about passing a bundle from a BroadcastReceiver to an Activity, as opposed to passing the bundle from an Activity to a BroadcastReceiver?
View 2 Replies
View Related
Aug 20, 2010
In my app I want to obtain a gps lock and record the coords. But I do not want to lock the device into looking for the gps. The user is to be free to traverse through the app and the different activities within.
So If I call a locationListener in activity A, can I reference it in activities B C and D?
if is was still in activity A I could say something like
A.this.mlocListener.removeMyUpdates();
When I am in activity B how can I reference the LocationListener I set up in Activity A
View 1 Replies
View Related
Apr 6, 2010
i've developed an android app that's fetches an xml file and displays this data via several markers on the map. This works fine so far. The problem right now is that when i switch the orientation of the phone (portrait->landscape or vice versa) the markers disappear for a small moment, the xml processing is started again and then they reappear. Is there a way to prevent this re-loading of the file? It only takes about 2-3 seconds.
View 2 Replies
View Related
Feb 19, 2010
I want to do some data processing (in a thread) right after my main Activity starts. For that data processing to be started I also need to know a visible size of my main View (which is a LinearLayout currently, but whatever).I wonder how to do that. I.e. I wonder what is the entry point (callback?) I should use to be sure that my main View has been layed out, so i can use view.getWidth/getHeight? Is creating a custom View and reimplementing it's onSizeChanged() - the only way? In this case how should I properly describe it in my xml layout file? (it will contain some child views)
View 1 Replies
View Related
Jul 22, 2009
I have one Activity, that starts one Service and my service will lunch one Activity, i wanna to stop the Activity which one started my my Service after few seconds. Is there any way to achieve. Has anyone experienced this type of scenario.
View 2 Replies
View Related
Aug 13, 2010
In my game when the user completes a stage, I want the main game thread to pause/sleep/wait and a new activity to be launched called StageClear that displays information about points scored etc. After this has been displayed and the user has pressed continue I want the original game thread to resume where it left off. I have tried to implement this but have so far been unsuccessful, probably because I'm new to dealing with multiple threads and also the idea of synchronizing them. I most recently tried to implement a shared package-visible object that could notify after wait was called on itself, but I am getting errors in eclipse so it won't even compile, I think because though the object is declared public in an inner class, it cannot be seen or recognised by my activity elsewhere in a file in the package. I have already built both activities but my issue is getting the main game one to launch the other, and pause whilst it waits for this activity to finish, before the main game thread continues execution.
View 1 Replies
View Related
Mar 17, 2010
I am aware my issue is against the philosophy of Android, but I have no choice, this application will run on a embedded car gps and I need to bring an activity to prevent from car accident, for example, when it's happen around the user. I have to put other activity on the back and bring my alert pop up without user manipulation like notification on the front. Is there a way to bring manually an activity to the front, by resuming it like when you click on the android task switcher?
View 2 Replies
View Related
Jun 28, 2010
I would like to launch an intent when any of my activity is visible, otherwise I will put it up as a notification, and will be fired by the user. To decide this, I need to know if any of my activity is front-most, how do I that?
View 3 Replies
View Related
Aug 5, 2010
I create an application which displays the notification when the service starts. If an user navigates to HOME screen (without exiting the application), the user could still go back to the previous application by pressing on the notification icon. This is very similar case as the track recording service in Google application "My Track".
I want the existing activity as Single Top activity since it has associated service running. However when my application tries to bring the existing activity to front via notification, the existing activity's onDestroy has been called which causes problem. How can I skip this onDestroy method? Here is my current codes:
CODE:............................
View 2 Replies
View Related
Jul 28, 2010
I have one Android application, when it runs a service, I want to show the notification on the status bar. Then the user could navigate to other application by pressing HOME key. However when I try to bring the previous running application back to Front via notification icon, there is some problem with the existing activity. Even I declare it as "Single Top" mode (I want to run the existing activity since there is an associated service running) , somehow that activity's OnDestroy has been called before OnResume. Here is my code of creating the notification object.
CODE:.....................
View 1 Replies
View Related
Jul 29, 2010
In order to keep some native code happy, I need to launch an activity in a new process. Does anyone know how to do this?
I can set the activity's process attribute in the manifest, but this will cause *all* instances of the activity to appear in the *same* process, which I can't have.
I'm willing to use internal APIs for this, and I've found Process.start(), but it's not at all clear how this is supposed to be used.
View 4 Replies
View Related