Android :: Can't Destroy GLSurfaceView For Exit Activity

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?

Android :: can't destroy GLSurfaceView for exit activity


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 :: Activity Receiving Messages After On Destroy

Apr 28, 2010

I have an Activity with an inner Handler. The problem is that after the activity is destroyed, the Handler is receiving messages for the destroyed activity. This breaks things because the activity is in an inconsistent state. I'm thinking this might be a bug in Android - it should probably delete all the messages in the queue when the activity is destroyed. There doesn't appear to be any way I can manually delete all messages in the queue (except by calling removeMessage(int what) with every possible variation of what, which seems a bit ridiculous). The only other solution I can think of is to create my own is_destroyed instance variable and check it in handleMessage(), but again that seems like a ridiculous hack. Has anyone come across this problem before?

View 5 Replies View Related

Android :: Activity Objects In Memory After On Destroy

Aug 3, 2009

I have a activity MyActivity, which "kills" yourself using the finish () method. The problem is: after the kill operation, method onDestroy is called, but the object of type MyActivity is never garbage-collected (I forced the GC run). It is causing a memory leak, because MyActivity is launched many times, by other activities. Does anyone know when the Activity object is supposed to be garbage- collected, and what can be done to avoid the issue I mentioned?

View 2 Replies View Related

Android :: How To Not Destroy Activity When I Rotate Device

Jul 25, 2010

I have an app that works only in portrait mode, and I have made the changes in my manifest file for every activity the orientation to be portrait. But when I rotate the device, the activity recreates again.
How to not destroy the activity?

View 2 Replies View Related

Android : Avoiding An Activity To Destroy - Just Stopping Or Pausing It When Pushing The Back Button

Mar 19, 2010

I would like to pausing or putting the application on background when pressing the back button, I don't want the application to go through the destroy state. Things are when I override onKeyDown and when I force to pause or stop the application by using onPause, I have some issuees with the wakelock and application crash, but when I press home button I go through onPause method and I have no exception, it's weird!

View 1 Replies View Related

Android :: Static Fields In Activity Classes Guaranteed To Outlive Create / Destroy Cycle?

Oct 28, 2009

I frequently run into the problem that I have to preserve state between several invocations of an activity (i.e. going through several onCreate()/onDelete() cycles). Unfortunately, Android's support for doing that is really poor. As an easy way to preserve state, I thought that since the class is only loaded once by the class loader, that it would be safe to store temporary data that's shared between several instances of an activity in a static Bundle field. However, occasionally, when instance A creates the static bundle and stores data in it, then gets destroyed, and instance B tries to read from it, the static field is suddenly NULL. Doesn't that mean that the class had been removed and reloaded by the classloader while the activity was going through a create/destroy cycle? How else could a static field suddenly become NULL when it was referencing an object before?

View 2 Replies View Related

Android :: How To Exit Activity Using SurfaceView

May 18, 2010

When exiting the activity in a thread in a SurfaceView. This log appears in this situation:.............

View 2 Replies View Related

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 View Related

Android :: How To Animate Activity Entrance And Exit?

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

Android : Activity Finish - X System Exit

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

Android : Program On Application - Not Activity - Exit

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

Android :: Translucent Activity Not Calling OnStop On Exit

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

Android :: Exit Current Activity To Homescreen (without Using Home Button)?

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

Android : Child Activity Exit By Unexpected Exception - OnActivityResult - Is Not Called

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

Android :: Android - Show Dialog To Confirm User Before Exit Activity?

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

Android :: How To Destroy Droid Application

Aug 6, 2010

I have developed an application which is working fine.

In that i have used some static variables and also set Application level variables.
My problem is that even after setting finish() on each activity, application is showing in Running mode.

After closing the application, when i start the application after sometime, it will set the last changes.

How can i destroy my application?

View 4 Replies View Related

Android :: Programmatically Create / Destroy AppWidgets?

Mar 5, 2010

Is it possible to programmatically create and/or destroy AppWidgets?

View 7 Replies View Related

Android : Back Button - Kill/Destroy

Aug 23, 2010

I have one doubt about back button. If one activity is running on foreground and if I press back button then it will destroy the activity. Now my question is is destroy and kill a process is different? cause if I open DDMS I can see same process is running..Only if I stop that process in DDMS then only it disappear. Is that process will take any memory space after pressing back button..

View 6 Replies View Related

Android : Will Carriers Destroy Droid Vision?

Sep 12, 2010

"It's not limited to Android devices, but it seems that increasingly Android more than other platforms is shipping with the worst mobile bloatware. It's a bad trend that's going to lead to consumer backlash and it's destroying the credibility of Google's Android vision."

Entelligence: Will carriers destroy the Android vision? - Engadget

View 5 Replies View Related

Android : Unable To Completely Destroy Application

Apr 7, 2009

I am unable to completely destroy my app. My app is thread based app. Once i exit the app by calling on Destroy method, it is exiting properly. If i try to relaunch the application is says "The application stooped unexpectedly, try again". If i again select my app it is launching. It means in a alternative attempt its launching. as i am guessing, its not making Null for few static objects. once it shows the exception has explained above it is making all the objects null, so that i am able to relaunch. Pls can some one suggest how to overcome this issue. How to completely destroy the application?

View 10 Replies View Related

Android :: What Happens To Thread As On Destroy Is Called When Device Is Rotated

Jun 15, 2010

I would like to know as to what will happen to the thread which has been created by an activity and the device is rotated. I have observed that the onDestroy method is called when this happens. Will the thread be killed too?If the thread is not killed, how can I reassociate the thread with the activity as a new instance of the activity is created on rotation.

View 1 Replies View Related

Android :: Apps Running In Background Destroy Battery?

Nov 26, 2009

Anyone using this? Sure it has a price, but this thing isnt using ANY battery life on my phone... I thought these apps running in the background (chat apps) were supposed to destroy battery? I leave this thing on nearly 8 hours a day, and hardly see any battery drain. The UI could use a few tweaks and themes, but for reliability its awesome!

View 4 Replies View Related

Android :: Force Screen Orientation And Destroy Call

Aug 27, 2009

I want my Activity to be always in portrait mode and I do NOT want the onDestroy() method to be called. There are some interesting articles about that at: http://www.androidguys.com/2008/11/24/rotational-forces-part-four/

The solution seems to be: In AndroidManifest.xml:

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

I've tried it and it seems to work. Is there any other alternative or is it the correct solution?

View 7 Replies View Related

Android :: Stop Counter And Destroy Media Player

Jun 12, 2010

I am working on an app that beeps every second. When I hit the home button I want it to close the program and stop beeping. Right now it closes the program but continues to beep.

What am I doing wrong?
if ((keyCode == KeyEvent.KEYCODE_HOME)) {
isdone = true;
mp.release();
counter.cancel();
finish();
}

View 3 Replies View Related

Android :: Properly Destroy A Thread With Blocked Call?

Aug 6, 2010

Here is a thread example in Android SDK sample (BluetoothChat).code...

In order to destroy this thread, first to close the socket. But this thread is still running at the blocked call mmInStream.read() even mSocket.close is successfully run.

Question: How to properly destroy a thread stuck in blocked call?

View 3 Replies View Related

Android :: Where To Stop / Destroy Threads In Droid Service Class?

Mar 25, 2009

I have created a threaded service the following way. code...

After I close the application the phone works really slow and I guess it is due to thread termination failure.

Does anyone know what is the best way to terminate all threads before terminating the application?

View 3 Replies View Related

Android :: Changing Background Color In Droid Destroy Widget's Appearance?

May 23, 2010

I've noticed that changing the background color of an android widget (f.ex. Button or TextView) by program:

myButton.setBackgroundColor(Color.BLUE);


makes it to loose its 3D shape, border, and shadows effects, and then appears like a ugly flat square. What am I missing?

Sorry for the very naive question but I couldn't get it right although tried for a time.

View 2 Replies View Related

HTC Incredible :: Don't Destroy Old Phone - Will It Blend?

Jul 20, 2010

Like me, many of you are switching to the Incredible from another, older, less awesome phone. Some of you may even be moving to the Inc because you've had it with your current phone. But before you consider taking out your frustrations on your old phone by answering the age-old question, "Will it blend?", consider donating your phone. There are many organizations that will put your old phone to good use. Here in Raleigh, NC, an organization called Interact helps victims of domestic violence and will accept donations of used cell phones. You can also donate your phone to be used by troops overseas. So before you think of just throwing away a piece of technology, consider how it may benefit someone else.

View 17 Replies View Related

General :: How To Destroy A Samsung Stratosphere

Mar 7, 2012

I have a chance to "test" the durability of a brand new Samsung stratosphere. I'm going to record it and post it on YouTube for all to see.

what should I do to see what it can withstand? I have access to vehicles, guns, some heavy equipment and a machinist shop.

This phone feels pretty fragile so I'm sure I'll only be able to test it one way... eager to see everyone's responses. I'll pick one and post video by the weekend

View 9 Replies View Related







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