Android :: Don't Want Activity To Be Destroyed/created When Phone Is Rotated.

Apr 18, 2010

I have tried to freeze orientation: setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

But thought screen stays in portrait orientation, the activity is still recreated.

Android :: Don't want activity to be destroyed/created when phone is rotated.


Android :: AsyncTask Won't Stop Even When Activity Has Destroyed

Mar 27, 2010

I have an AsyncTask object which starts executing when the activity is created and does stuff in the background (downloads upto 100 images). Everything works fine but there is this peculiar behavior which i'm not able to understand.For eg: when the android screen's orientation changes then the activity is destroyed and created again. So I override the onRetainNonConfigurationInstance() method and save all the downloaded data executed in the AsyncTask. My purpose of doing this is to not have AsyncTask run each time activity is destroyed-created during orientation changes, but as i can see in my logs the previous AsynTask is still executing. (The data is saved correctly though)I even tried to cancel the AsynTask in the onDestroy() method of the activity but the logs still show AsynTask as running.This is really strange behavior and would really be thankful if someone can tell me the correct procedure to stop/cancel the AsynTask.

View 1 Replies View Related

Android :: Activity Is Destroyed When Press Home Key

Sep 24, 2009

I press program's icon to start my program,and then open the Settings activity through startActivityForResult(intent, SETTINGS). Now i press the home key and start my program through program's icon, at this time the Settings actitity will run OnDestroy() and be destroyed. I can't understand why Settings activity is be destroyed automatically? How can I make Settings activity still focus when users come back. Code...

View 7 Replies View Related

Android :: GPS Icon Won't Disappear When Activity Destroyed / Fix It?

Sep 19, 2010

Being an Android newbie experimenting with GPS stuff I managed to put together this code and it works just like I expect it to except for one thing, the GPS icon never goes away. How can get the GPS icon to disappear when the activity is destroyed? I have code...

in my onPause() but apparently that's not enough?

The problem exists in the emulator and also on my HTC EVO with 2.2. On my EVO, the icon stays there when the activity is destroyed and only disappears when I uninstall the app. code...

View 1 Replies View Related

Android :: Detect If View's Parent Activity Is Being Destroyed?

Jun 30, 2010

I want to do some cleanup in a view when the activity is being destroyed. Is there any way to get a callback in the View when the activity is being destroyed? I tried using onDetachedFromWindow, but I'm not sure whether it is correct thing to do.

View 1 Replies View Related

Android :: Remote Service Destroyed When Main Activity Closed / How To Fix?

Nov 19, 2010

I wrote an android program that: has a main activity for UI, and it starts a service. The service timely callbacks the UI activity to update views. It works fine except: if the activity is closed (with BACK) and start again, the service will also be started again (The service plays audio file, so there are two overlapped sounds). I use bindService with BIND_AUTO_CREATE flag to start and connect to service. According to the document, it should create service only if it doesn't exist, but obviously it starts another instance when opened second time. All I want is when the activity is closed, the service goes on running, and when the activity opens again, it can reconnect to the service. Is that possible? Or I just misunderstand the usage of service?

View 1 Replies View Related

Development : Calling Activity Get Destroyed / Remain In Pause State?

Mar 19, 2009

When another activity is started from main activity, The main activity get destroyed and created when returned back from second Activity main activity remains in pause state till second activity finish (), on Sart or on Resume from when returned back from second activity? which one these case does happen in And roid application?

View 3 Replies View Related

Android :: Crash When Activity Starts Up And Screen Gets Rotated?

Jun 26, 2009

I am getting a crash intermittently when my Activity starts up either initially or when the screen gets rotated I get several log messages which I have been unable to get any insight from: timeout expired mFreezeDisplay=1 mFreezeCount=0 App freeze timeout expired Force clearing freeze then lots of: Lock_layer timed out (is the CPU pegged?) Key dispatching timed out then I get ANR annotation: keyDispatchingTimedOut the trace has alot of sending signal 3 to alot of PIDs

View 2 Replies View Related

Android :: Activity Which Downloads Data In Background With Service - Doesn't Get Destroyed On Hitting Back Button

Nov 9, 2010

I need to develop an application with downloads the data at the background and update about the progress in the front.

I guess this can be achieved using services and activity and passing data in between the. But, what I need to do is even if I hit back button and then start the activity again. It should check if the service is running or not. If service is not running it should start one else it should display the data from running service.

Something like music player where music is played by a service at a background and activity displays the information. Even on browsing through other activities of the application or hitting back, state of the music player is maintained.

View 1 Replies View Related

Android :: Activity Parent - Created Activity Returns A Nul ?

Apr 7, 2010

Can someone tell if why when starting an activity with startActivity(intent) , calling getParent() in onCreate() of the new created activity returns a nul ?

Also how could I obtain the parent of an activity created in such a way ? Can a reference of the activity below the current activity in the activity stack be obtained ?

View 2 Replies View Related

Android : Can I Pass A File Created In Activity To Another?

Jun 26, 2009

I create a local file in my activity like this: How can I pass the URI of this file to another Activity? And do I need to set any permission (file permission, manifest permission) to allow other Activity to use that file?

View 5 Replies View Related

General :: Accidentally Destroyed My Phone?

Jun 23, 2013

I was flashing the RUU on my HTC Thunderbolt and the phone powered down in the middle of the update process. Now the phone will not boot, I cannot get into recovery/bootloader, and my PC doesn't recognize the device now.

View 12 Replies View Related

Android :: New Activity Instance Created For Every Intent-filter?

Feb 6, 2010

I'm using an intent-filter on URLs for my activity:

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

the launchMode attribute is set to "singleTop", but it looks like a new activity is created every time I click a matching url. I thought that if the activity is already alive somewhere, it would simply be brought to the front of my activity stack?

I tried this on the emulator/device, same behavior, a new activity instance is always created.

View 2 Replies View Related

Android :: Network Connection Lost Every Time An Activity Is Created?

Sep 13, 2010

I am checking to see if my app has a network connection Whenever I rotate my screen between landscape and portrait this method returns false. It makes me wonder if Network connections are getting killed during the rotation?

View 1 Replies View Related

Android :: Apply Animation To View In Application After Created Activity?

Sep 23, 2010

I am trying to apply an animation to a view in my Android app after my activity is created. To do this, I need to determine the current size of the view, and then set up an animation to scale from the current size to the new size. This part must be done at runtime, since the view scales to different sizes depending on input from the user. My layout is defined in XML. This seems like an easy task, and there are lots of SO questions regarding this though none which solved my problem, obviously. So perhaps I am missing something obvious. I get a handle to my view by: ImageView myView = (ImageView)getWindow().findViewById(R.id.MyViewID);

This works fine, but when calling getWidth(), getHeight(), getMeasuredWidth(), getLayoutParams().width, etc., they all return 0. I have also tried manually calling measure() on the view followed by a call to getMeasuredWidth(), but that has no effect. I have tried calling these methods and inspecting the object in the debugger in my activity's onCreate() and in onPostCreate(). How can I figure out the exact dimensions of this view at runtime?

View 4 Replies View Related

Android :: OnPause() - Resume To An Activity Which Has A Bundle Passed To It When Created

Mar 11, 2010

I have an application where I navigate from Activity A to Activity B and back to A and then B. I want to resume the activity B (which has a Bundle passed to it ) from Activity A. The documentation says that OnSaveInstance() is called only when the activity is killed, so how do i use OnPause which does not have the Bundle to resume the activity B.

View 13 Replies View Related

Android :: How To Launch VideoCamera Activity And Then Read Tge File Created

Aug 25, 2009

I am launching the VideoCamera activity from my main activity but not able to get a callback to read the file created.

Does anyone have an example on how to do this?

This is what I have:

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

View 2 Replies View Related

Android :: AlerDialog Not Created - Java.lang.IllegalArgumentException - Activity#onCreateDialog

Apr 28, 2010

I want to create a normal AlertDialog. I used the example provided by the android dev docs. I just changed the DIALOG_PAUSED_ID to DIALOG_DELETEDB. If I execute my code and press the button which in return should create the dialog, I get the following error log:............

View 1 Replies View Related

HTC Incredible :: Phone Does Not Switch To Landscape When Rotated Horizonally?

May 10, 2010

Not sure if this is a problem or if it has always been like this-I was out on Friday night and had my phone laying flat horizontally-I tried to get it into landscape mode by rotating-it wouldn't work. The only way I could get it to flip into landscape mode was to hold it vertically. Is there something wrong with my phone or am I imagining things?

View 4 Replies View Related

Sony Ericsson Xperia X10 :: Home Screen Won't Flip When Phone Rotated

Sep 21, 2010

Just a minor problem that maybe I just have a setting out of wack. I have ADW launcher installed, which may or may not be an issue. But the home screen(s) won't flip to the wide screen look when the phone is rotated sideways. All the other views i.e. settings, browsers, etc do this no problem, but the home screen(s) them selves are stuck in a portrait view.

View 4 Replies View Related

Android :: Phone Trace File Created But Zero Bytes Long

Feb 1, 2010

I am trying to follow the instructions on this page to create a trace file. I can see the file in File Explorer in DDMS and can pull it onto my PC but it is zero bytes long.

Any suggestions as to what I might be doing wrong, please?

View 1 Replies View Related

Android :: Distinguish When App Is Being Finalized Vs Destroyed For Screen Orientation Change

Mar 20, 2010

I am relatively new to the Android world and am having some difficultly understanding how the whole screen orientation cycle works. I understand that when the orientation changes from portrait to landscape or vice versa the activity is destroyed and then re-created. Thus all the code in the onCreate function will run again. So here's my situation: I have an app that I am working on where it logs into a website, retrieves data, and displays it to the user. While this is all done in background threads, the code that starts these threads is in the onCreate function. Now, the problem lies in that whenever the user changes the screen orientation, the app will log in, retrieve the data, and display it to the user again. What I would like to do is set a boolean that tells the app if it is logged in or not so it knows whether or not it must log in when the onCreate function is called. So long as the app is in memory the HttpClient will exist and contain the cookies from logging the user in but when the app is killed by the system those will go away. So I would assume that I need to do something like setting the logged in boolean to false when the app is killed but since onDestroy is called when the screen is rotated how is this possible? I also looked into the finalize function and isFinishing() but those seem to not be working.

Shorter version: How can I distinguish between when an app is being killed from memory from when an activity is being rotated and different code for each event?

View 2 Replies View Related

HTC EVO 4G :: Recovery Tool Destroyed After BakedSnack Rom

Sep 22, 2010

I installed BakedSnack rom, and now my Amun Ra recovery tool won't boot. Stuck at the loading screen. Any guide to flash just amun ra onto the phone, and then I can just do a nandroid restore?

View 5 Replies View Related

HTC Desire :: Froyo Destroyed Battery Life

Aug 5, 2010

Well as the title says froyo has destroyed my battery life , i have 2 batterys and have tryed factory wipe , neither of my batterys since upgrade will last longer then 8 / 9 hours before i was getting 36 hours gutted wish i dident bother with upgrade ...... feel like my phones been ruined as 8 / 9 hours is just pathetic , i was curious if anyone else has experiance this ?

View 5 Replies View Related

Samsung Captivate :: Where User Created Content On Phone?

Aug 19, 2010

Where the heck are my pictures and videos that I've snapped/recorded in the internal storage when looking for them on my computer? What folders are they hiding under, etc?

View 1 Replies View Related

Android :: Rotated Image In ImageView

May 9, 2010

I want to show an arrow that indicates the direction towards a goal, using the orientation sensor and current GPS position. Everything works well, except that I want to rotate the arrow image in my ImageView.

View 2 Replies View Related

Android :: Put Rotated Text On An Imageview

Nov 24, 2010

I need to put some text over an imageview.

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

But this doesnt displays the text only the picture. And also I have to rotated this text. Is this even possible with TextView?

View 1 Replies View Related

HTC Desire :: Phone Created A Thumbnail Of Video In Photo Album

May 1, 2010

I just recorded a video clip which had a strange effect. When in photo albums, instead of a thumbnail of the video in question, the phone created a thumbnail of a video I have recorded previously and then deleted. Does anyone know how to make the phone recreate all thumbnails for the media files? I am leaning towards deleting all the files in /sdcard/DCIM/.thumbnails/ but not sure this is the way to do it?

View 10 Replies View Related

HTC Hero :: Google Sync Deleted Contacts Created On The Phone

Nov 22, 2010

I've lived with this problem long enough and searched for solutions to no avail, I hope someone here can help.

1. I create a new contact on my phone and select my googlemail.com when asked "create contact under account"?
2. I save the newly added contact details
3. I then synchronise the phone
4. The newly created account gets deleted from the phone.

For clarification I'm not saving it to the SIM nor to the phone memory, just to my googlemail account.I've read elsewhere that there might be a problem since google added gmail.com accounts in the UK. I now have 2 google accounts (gmail and googlemail) but in practice both seem identical, if I try to sign in to my googlemail account I end up in my gmail account so I doubt if this is the issue. I've tried deleting my googlemail account from my phone with the intention of replacing it with my new gmail account but I get the message that other applications rely on this account and that the only way to remove the account is to do a factory reset. If I create contacts in my gmail account off-line and synchronise my phone then these contacts appear on my phone as expected. It seems strange that this application should delete a newly added contact on the phone but that is exactly what happens. I know I'm not the only one whose experienced this but I've never seen a conclusive resolution, anyone here know how to solve this?

View 3 Replies View Related

Motorola Droid : New Contacts Created On Phone Disappear / Need Back

Dec 27, 2009

I've had this happen three or four times now...two types of occurrences:

1. Edit an existing contact...when I select "Done" the screen says "Saving" and then returns to the contact list - and the contact I edited is gone.

2. Create a new contact - enter name, address, phone, select Done, "Saving" message appears, return to contact list, and the contact is not in the list.

Looked under all variants of the name (first, last, etc.) and it's just not there.

I'm creating the contacts on my primary account.

I'm on 2.01, no rooting, using the built-in contact manager.

View 7 Replies View Related







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