Android : Set Result_ok When Activity Exit
Feb 6, 2009
How to set RESULT_OK when activity exit? I am launching list activity from main activity using startActivityForResult, after doing work with list activity; i exit from it from it using "finish()" but it doesn't propagate RESULT_OK to main activity in onActivityResult(), what should I do , so that listact should return RESULT_OK.
View 2 Replies
May 18, 2010
When exiting the activity in a thread in a SurfaceView. This log appears in this situation:.............
View 2 Replies
View Related
Jan 11, 2010
How to animate activity entrance and exit? And activity relaunch after onNewIntent()?I used android:theme in the manifest file but it didn't work for me.
View 2 Replies
View Related
Dec 2, 2009
what puzzle me so much is that i can't destroy a GLSurfaceView while i don't want to exit the activity.
the fact is when i destroy a GLSurfaceView which had show in the screen (that means it has binded to the activity's SurfaceHolder), the activity exits without any prompting. Perhaps ,the Context which provided in the Construction of GLSurfaceView joins the two things together. so my conclusion is that a GLSurfaceView can only be destroyed when exit the activity. is there anyway to destroy a GLSurfaceView without exit activity? is there someone can provide a clue?
View 2 Replies
View Related
Jan 21, 2010
I've been using System.exit to quit the application. Is Activity.finish a better approach? What would be the differences?
View 6 Replies
View Related
Jul 22, 2009
I have requirement that needs to save data to a file. During multiple Activitiy screens, I add different data to a list and finally when user is not using the app (means if user exits app by pressing "home" button or "call" button), just before exiting that app, i want to save that data of the list to a file.
coding before exiting activity screen is simple - by calling onDestory () method, but here I want not one activity but the application exit.
So my question is How do I write a code that will be executed just before application exits ? I tried created one class extends Application, and then I override onTerminate() method, but it's not get called when I exit ( pressing home button on device)
View 2 Replies
View Related
Dec 3, 2009
I'm having this strange issue where upon exiting a subactivity that is translucent (android:theme="@android: style/Theme.Translucent" ) the onStop() method doesn't appear to be called. have a TimerTask that runs and is supposed to be terminated when the subactivity ends in the onStop() method, but I'm instead left with an orphaned thread running in the background. It go particularly bad when I ran the subactivity several times. When I revert to no theme, the onStop() method is called and the activity behaves properly. Is there something I missed about how Translucent activities'lifecycles differ from standard activities?
View 4 Replies
View Related
May 3, 2010
What I am trying to do is emulating the "Home" button which takes one back to Android's homescreen. So here is what causes me problems: I have 3 launcher activities. The first one (which is connected to the homescreen icon) is just a (password protected) configuration activity. It will not be used by the user (just admin) One of the other 2 (both accessed via an app widget) is a questionnaire app. I'm allowing to jump back between questions via the Back button or a GUI back button as well. When the questionnaire is finished I sum up the answers given and provide a "Finish" button which should take the user back to the home screen.
For the questionnaire app I use a single activity (called ItemActivity) which calls itself (is that recursion as well when using intents?) to jump from one question to another:
Questionnaire.serializeToXML();
Intent i = new Intent().setClass(c, ItemActivity.class);
if(Questionnaire.instance.getCurrentItemNo() == Questionnaire.instance.getAmountOfItems()) {
Questionnaire.instance.setCompleted(true);
} else Questionnaire.instance.nextItem();
startActivity(i);
The final screen shows something like "Thank you for participating" as well as the formerly described button which should take one back to the homescreen. But I don't really get how to exit the Activity properly. I've e.g. used this.finish(); but this strangely brings up the "Thank you" screen again. So how can I just exit by jumping back to the homescreen?
View 2 Replies
View Related
Jun 23, 2010
I have faced with issue about startActivityForResult() and onActivityResult(). If child activity started by the startActivityForResult() exit by unexpected exception the onActivityResult() is not called and I have no any ideas how can I handle this to get application working in a fail-safe manner ?
When my code runs child activity with startActivityForResult() it awaits until onActivityResult() will be invoked to get working further, but onActivityResult() is not calling and my code is "hang- up" (logically).
So the question is how can I handle all possible ways the child activity is finished (normally and by unexpected exception) to get fail-safe code ?
I have check the documentation for this issue but have found nothing relating issue.
View 4 Replies
View Related
Feb 13, 2010
I've been trying to show a "Do you want to exit?", type dialog when user attempts to exit an activity. However can't find the appropriate API hooks. Activity.onUserLeaveHint() initially looked promising, but I can't find a way to stop the activity finishing.
View 2 Replies
View Related
May 27, 2009
I am a beginner in android development, wanted to know whether following use case is possible or not Supposing I have 'MyActivity' which starts the in-built SMS application using Intent. In SMS activity, when I Click on 'Send',SMS should be send successfully and it should eixt the application without being inside the SMS application. I mean it should come back to 'MyActivity'.Please, let me know if this usecase works.
View 4 Replies
View Related
Jul 11, 2010
Does anyone know of a way to find out what services are available on up coming interstate exits? I looked around Google Maps and Sprint Navigation and didn't see anything. For example, I would like to have an app tell me, Exit 116 is 20 miles away and it has Shell / Exxon / Texaco gas, McDonald's / Wendy's / Sonic, etc.
View 7 Replies
View Related
Nov 5, 2009
I want to know about How to exit an application.
In my application there is a button called Exit. when i click the button it should end the application. I trie with finish(). It is not working. It is closing only the current scrren. I need to close all the screens.
View 13 Replies
View Related
Oct 17, 2010
I notice that my application continues to run in the background after I hit the home or back button. I tried calling the finish() method and it still says its running. On another note, how do I setup the keyListener to respond to the user hitting the back or home button. I tried implementing OnKeyListener and using findViewById(R.Layout.main).setOnKeyListener(this) to call finish().
View 1 Replies
View Related
Oct 28, 2010
I just used some great app and now I'm done, and... I want to *exit* the app. So I look for the 'exit' button.'quit' button.. nope can't find it.. !? Is there really no 'quit' button for android apps? (like in all other operating systems: the X button at the top right corner of the window) Shurely this can't be true. Only way to quit is to go to the home menu and start up a 2nd application dedicated to killing other apps and then kill app nr 1 from that?? Like buying a car that only has an 'on' switch and when i arrive at my destination, I have to open the hood and disconnect a gas lead or sometning to stop the engine.. (Or press the back button 10 times go through all documents you viewed until you reach the home screen). Isn't this like one of the basic features an OS should provide in its user interface?
View 13 Replies
View Related
Jul 29, 2010
How to exit the current application on a click of any button when I am in the middle of my application? finish() will only finish the current activity not all the activities.
View 1 Replies
View Related
Nov 7, 2010
I've been using Dolphin HD for a long time but lately it's been really slow. I switched to the stock browser and it seems like it's twice as fast as Dolphin. Although I like the bells and whistles on Dolphin, I'll choose a fast browser over that any day.
My question is... what is the correct way to exit the stock browser? I don't want it running in the background. I don't want to get a task killer cause I've heard horror stories about them. I don't want to go into the browser settings each time and erase the cache and whatever every time I want to exit the browser.
Is there an easy way to exit the browser and make sure it's actually closed?
View 8 Replies
View Related
Jul 24, 2009
Is it possible to force the cache of your app to clear when the user exits the app? My app piles up cache data (rightfully so) on each start, which is no longer needed once the user quits the app, so I am trying to find a way to forcibly clear it.
View 12 Replies
View Related
Sep 8, 2010
I need to have a "Exit" menu items in my application,My question here is how can i just exit the app,Please throw some light on this is that possible in android if yes then how.
View 10 Replies
View Related
Mar 1, 2009
i tried to use my popupWindow with some enter/exit animations - it has setAnimationStyle() method for that purpose. after some time i realized i cannot use my own custom animation styles which is ok but a bit limiting. so i tried system ones: R.style.Animation_Toast works ok, but R.style.Animation_Dialog doesn't. looking at xml definition files i found that Toast animation uses simple alpha animation and Dialog animation is a set of alpha combined wit scale animation. is it a problem for WindowManager to deal with complex animations?
View 3 Replies
View Related
Jul 22, 2010
I have started my GPS programmatically by Intent myIntent = new intent(Settings.ACTION_SECURITY_SETTINGS);
mContext.startActivity(myIntent);
How i will turn Off GPS when i exit from my program...
View 3 Replies
View Related
Jan 10, 2010
Im getting this error caused by VM( logcat below from emulator, it also happens on the device) This is a know bug filed at least 3 times with different issues. I am getting it if I close my app and then open it a few times(it happens too often), you can close the app by "back button". I also have a service running in the background which updates my widget( i stop the service when it finishes), which launches an activity through a PendingIntent. Is there any workaround for this error, if I know what causes this exactly i may be able to prevent it, something must be triggering this....................
View 3 Replies
View Related
Dec 27, 2009
I've been getting delays when launching and exiting Handcent...not 100% of the time, but much of the time it takes forever (like >6 seconds) to launch or for my home screen to appear after exiting.
View 7 Replies
View Related
Jul 31, 2010
Is there a way to get Dolphin HD to save your options when you Exit it, rather than have to select Minimize, Exit or Cancel each time?
View 7 Replies
View Related
Nov 24, 2010
the problem is that this button doesn't exit of my app... it simply closes the current intent ant returns to the previous intent (window) of my app.... how i can do a real exit/close button? i tryed with this:
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
but it doesn't works, because when i turn back into my app, the app comes in the last opened window, and not in the first window of the app, how i can do that? i need that when i re-open my app it starts on the first window of my app
View 5 Replies
View Related
Sep 24, 2010
Either exit button or back button only can be implemented in my application. But i want both the implementations in my application
View 1 Replies
View Related
Oct 19, 2010
I'm downsampling an image via BitmapFactory.decode then base64 encoding the bytes to ship to the server. (long story on the latter part of that formula) It seems this process nukes all Exif data in the image data. Am I approaching this the wrong way or is this a fact of life?
View 2 Replies
View Related
Aug 10, 2009
i want to add an exit button to the menu, but didn't see an easy way to close an application or acces all activities of an application and finish them. Is there an easy approach available?
View 11 Replies
View Related
Apr 18, 2010
Is it possible to stop all started services when the user hits the Home Button? I use:
startService(new Intent(ClassName.this, ClassName2.class));
stopService(new Intent(ClassName.this, ClassName2.class));
This means I will have to somehow add the 'stopService()' for 7+ of my app classes
I've researched this topic and I think there's 'onTerminate' but still not sure how this should be implemented.
View 2 Replies
View Related
May 12, 2009
I work on rooted unlocked G1, latest JS firmware ADP1.5 I wrote some application that perform some root actions in the /system of course, when messing up /system requires to remount that partition but that's not my issue.
the code is fairly simple (attached at bottom of this message). however when running a command as root (for example executeAsRoot("su ls -l /system")) I get exit code 255 (i.e. -1 or failure) when running that command as non-root - it runs ok with exit code 0. The strange thing that this happens only in the real G1 . On the emulator, root commands work just fine. if i open a terminal on the G1 and perform su - I get the "allow"/"deny" screen but after that I am able to perform actions as root. How can I debug the reason for the application process failure ?
CODE:..................
View 8 Replies
View Related