Android :: Void Activity Destruction (orientation Or During Incoming Phone Call)

Aug 3, 2009

I have a requirement where I have to read/parse some data from the server(using HTTPConnection) and then display it on to the screen. To avoid ANR issue I used AsyncTask to perform the above. Now in order to avoid application crash in case the activity gets destroyed(either by OS or if orientation changes or say on any incoming call-->where user stays on the phone for long and for some reason OS destroys/recreates the activity). Currently, I hols the reference of AsyncTask in my activity and then provide a callback(the activity itself) to AsyncTask so that I can pos back message to activity(like closing progress dialog box).In order to avoid memory leaks on onPause I nullify this activity reference in AsyncTask.Before onPause I save the AsyncTask instance using onSaveInstanceState method but I have to use putSerializable for that. I have read on the forums that serialization method is slow, so my question is should I use parcelable approach(and whether the converting AsyncTask to parcelable will be same as creating any other object parcelable). or both these approaches are totally wrong i.e...............

Android :: void activity destruction (orientation or during incoming phone call)


Android :: Screen Flip Doesn't Trigger An Orientation Change And Activity Destruction/recreation

Aug 29, 2010

I'm testing an app on a Droid. It's a kind of card matching game. I'd like to keep the cards physically located in the same place on the screen regardless of a screen rotation. For example, I can put my thumb on a card, rotate the phone any way I please and the card stays fixed under my thumb. However, the orientation of the content of the card will change to match the current phone rotation. I handle this by transforming the card grid in onCreate. This works fine for 90 degree rotations, but if I do a fast 180 degree flip from one landscape mode to another the screen simply flips and the Activity is NOT destroyed and recreated.

This seems contrary to the documentation:

http://developer.android.com/reference/android/R.attr.html#configChanges

"public static final int configChanges Since: API Level 1

Specify one or more configuration changes that the activity will handle itself. If not specified, the activity will be restarted if any of these configuration changes happen in the system. Otherwise, the activity will remain running and its Activity.onConfigurationChanged method called with the new configuration. "

I am NOT specifying any configChanges in my AndroidManifest.xml file, so it seems that the activity SHOULD be destroyed and recreated. Why isn't it? Is there some way I specify that it should be destroy/ recreated?

View 7 Replies View Related

Android :: Activity In Case Of Incoming Phone Call?

Mar 12, 2010

I want to know that what will happen to my activity incase of an incoming phone call? Will the state of my activity be saved or I have to explicitly save it? Another question is that will the activity resume after the call is disconnected?

View 3 Replies View Related

Android :: Kill Or Wait Phone Activity (incoming Call) Between Running Application?

Jun 30, 2010

Is it possible if my application is running and that time if any incoming call arrives then i want to kill or wait that call (phone activity). any one achieve this type of work in android. i have a no idea how to do this.

View 2 Replies View Related

Android :: How To Stop Activity Destruction?

Dec 7, 2009

I would like to know if there is a way to stop activity destruction upon physical keyboard slide in/out event.

View 4 Replies View Related

Android : Activity Display Over Incoming Call Screen

Nov 13, 2010

I have problem when i start activity from incoming call broadcastReciever, the problem is :

when call is coming i start activity X with FLAG_ACTIVITY_NEW_TASK flag, and it is work fine when my application is not on the screen.

but if my application on the screen (activity Y) and call come, when activity X called from braodcastReciver Activity Y cover screen over incoming call screen then Activity X display, so 2 activity become over incoming call, although i just want activity X just display.

View 11 Replies View Related

Android : How To Handl Activity Destruction In Multithreaded Droid App?

May 25, 2010

I have a multithreded app where background threads are used to load data over network or from disk/db. Every once in a while user will perform some action e.g. fetch news over network, which will spawn a background AsyncTask, but for some reason user will quit the app (press back button so that activity gets destroyed). In most such scenarios, I make appropriate checks in the background thread after it returns from n/w i/o, so that it won't crash by accessing members of the activity that is destroyed by now. However some corner cases are left where crashes happen, because the background thread would access some member of activity that is now null. Do other Android developers have some generic/recommended framework to handle such scenarios?

View 1 Replies View Related

Android :: Orientation Change - Dialog Above Activity With Fixed Orientation

May 14, 2009

I have created an activity for my game which handles all orientation changes by itself and has a fixed "portrait" layout. Actually it uses the accelerometer and is rendered using 2D canvas methods. If the level has been completed I show up a highscore dialog in which the user can enter his name. The dialog is floating above the underlying level screen which gets blurred out nicely. This generally works.

Problem is that the dialog does not get rotated if the orientation of the phone changes. So even if the keyboard is exposed the dialog is shown in portrait mode instead of landscape. I have tried to use an activity with dialog theme instead but the behavior didn't change. After several tries it seems that I have found the reason for this: Once there's an activity with fixed orientation in the activity stack then all subsequent activities keep this orientation, too. They will not react on orientation changes anymore (e.g. if the keyboard gets exposed).

After upgrading to 1.5 SDK the described behavior changed a little bit. Now at subactivities indead react on orientation changes like expected. However, the need to have an opaque background! That means that neither dialogs nor activities with dialog theme will work. Those will stick with the orientation of the underlaying activity. So my workaround is to first start a sub-activity with an opaque black background. This activity then shows my highscore dialog on top. It looks quite okay but I wonder if there's a better solution? Is it possible to show a dialog above a fixed portrait or landscape activity which automatically adapts to orientation changes?

View 3 Replies View Related

Android :: Retrieve Incoming Call's Phone Number

Dec 5, 2009

I would like to retrieve the incoming call's phonenumber and do something with it.Could you please help me because I can't find any information about this.Where do i start and how do i get hold of the phone number?

View 3 Replies View Related

Android :: Changing Incoming Screen On Phone Call

Jul 21, 2010

can you change the incoming screen on the evo on a phone call.not that i don't think the droid is cute.

View 3 Replies View Related

Android :: Incoming Call Diverted Indicator For Phone?

Aug 18, 2010

I need Android program which will indicate if a call is coming from diverted number.

I have a helpdesk number in my business, which is diverted to my normal number and I have to answer it differently. This is why I need to know with a sign or text or anything that the call is made to this helpdesk number.

I really don't want to carry 2 phones with me.

View 3 Replies View Related

Android :: Phone Mutes On Every Incoming Call / Solution For This?

Aug 25, 2010

My Acer Liquid E keeps Muting every time I answer a call. Its odd because its not disconnecting at all and I can hear the caller perfect. Sometime if I hit the mute, speaker phone, or hold buttons a view times it starts to work normal. All outgoing calls are perfect. Hopefully I can narrow it down to either a phone defect or a OS issue that just needs an update. Has anyone else had this issue?

Firmware version:2.1-update1

View 1 Replies View Related

Android :: Can I Hide Native Phone App GUI When Incoming Call Comes

Aug 18, 2009

I am developing a phone application with my own GUI , I want to receive incoming call event. I am able to receive it using Broadcast receiver ,

But after receiving in My Broadcast receiver. Native phone application GUI comes to foreground and my application GUI goes to background. I do not want native GUI to be displayed on screen , How can i disable native phone application GUI.

Is there any way to disable broadcast intent or any other suggestion for displaying my application GUI instead of native phone app gui.

View 4 Replies View Related

Android :: Handling Phone Ringing - Not Answer Incoming Call

Aug 17, 2009

I'm trying to write an app that will run when the phone rings but NOT answer the incoming call. The app would have an answer button that when pressed would perform the regular call answer action, but this isn't what I need help with. I've searched the internet and haven't been able to find any consensus on this issue. My app only needs to run during the call ringing stage and nothing more. What would I have to listen for to do this and what manifest entries would I need? Forgive my incorrect/nonexistant use of terminology, I haven't worked with Android in close to a year and haven't freshened up fully yet.

View 12 Replies View Related

Android : Run App In Background And Record Incoming Call On Droid Phone?

Oct 8, 2010

Is this possible to run an application in back ground and record incoming call on android phone ? Any body having any link or some thing for learning recording call.

View 2 Replies View Related

Android :: Change Screen Orientation When Call Is Ongoing / Phone Process Will Crash

Jun 15, 2009

I found if change screen orientation continouously when a call is ongoing, that is, portrait -> landscape -> portrait- >landscape.

View 3 Replies View Related

2.1 Update :: Force Close Error For Android Phone On Incoming Call

Nov 19, 2010

I own an xperia mini pro and I can replicate the issue always now. When I get an incoming call while the screen is off, if you slide out the keyboard (without opening the screen lock), immediately I get a Force close error for com.android.phone. I have Lookout Mobile security along with SayMyName installed. I have tried removing both, but the problem does not seem to go off. I am using Zeam as my home screen. On FC, SayMyName continues to call out the caller (or number if its not recognized), but the phone application crashes and on closing the FC pop up, the GSM mobile connection reinitiates (I am not in 3G).

Its just like when you switch on the phone after a shutdown. I have even tried changing home screen (ADW same problem), but seems like this issue persists. The problem is I keep my phone in a pouch attached to my belt and when I get a call, many times while bringing out the phone, the sliding of the keyboard happens and I get an FC. Then, there is no way to make out who had called and its very irritating (the call log does not register the call due to the FC).

View 5 Replies View Related

HTC EVO 4G :: Hard To Unlock Phone With Incoming Call?

Oct 29, 2010

I have no problems doing anything with my touch screen until there is an incoming call. No matter what I do I usually can not drag down the bar to unlock my phone.

View 5 Replies View Related

Samsung Fascinate :: Phone Actually Ringing On Second Incoming Call?

Oct 26, 2010

I looked & was unable to find an answer to this when I searched. My phone is actually RINGING with the ringtone when I get a 2nd call on call waiting. I'd much prefer the beep as it is very disruptive and a friend asked me the other day what that noise was. It was my phone ringing for an incoming call!

View 1 Replies View Related

HTC Incredible :: Phone Occasionally Will Not Ring On Incoming Call

Aug 16, 2010

I have had my Droid Incredible for about two months now. I was really one of the lucky ones!! I usually can fix problems by myself, because I am skilled in Android, but this one I have to turn to my friends in the Android community and ask for some assistance. Next, the phone will randomly change my ringtone. Next, the Sense clock/weather widget displays a location that I don't even live in, and sometimes it will show just a number. How I can fix this, without rooting (waiting for official Froyo).

View 1 Replies View Related

Android :: Orientation Change Crash In Tab Activity With List Activity

Jan 21, 2010

When views with different type have same id and screen orientation changes,

either java.lang.ClassCastException: android.view.AbsSavedState$1 or java.lang.IllegalArgumentException: Wrong state class -- expecting View State will occur. (depends on the view's order)

Because View.dispatchRestoreInstanceState() checks id only.

You may wonder why anyone would make views with different type to have same id.

But it can happen when you use tab activity.

Imagine you have tab activity with two children activity.

Tab1 is ListActivity and Tab2 is ExpandableListActivity.

Both activity have id of "@android:id/list" but the type of view is different.

This means we cannot use ListActivity & ExpandableListActivit at the same in one tab activity.

View 4 Replies View Related

Android :: Handle Screen Orientation Changes With An Activity Started Within A Tab's Activity

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

HTC Desire HD :: Flip To Silence Phone On Incoming Call Feature?

Oct 28, 2010

I had the proximity sensor problem which was fixed after firmware update/blowing on the sensor. However, now neither the flip to silence the phone on an incoming call feature (the setting is on) OR the flip to activate the speakerphone when in a call now works. The flip to silence the phone on an incoming call was working before the firmware update.

View 7 Replies View Related

Samsung Moment :: Phone Start Vibrating At Incoming Call

Oct 14, 2010

On my Samsung Moment, a lot of times when someone is calling me, the phone will start vibrating or ringing as it should but the screen does not turn on showing the caller id until 4 or 5 rings, if at all. It makes answering calls before it goes to voicemail difficult.

Has anyone had this problem or know how to fix it?

View 1 Replies View Related

Sony Ericsson Xperia X1/X2 :: X2 MR2 - Phone Shut Down While Answering Incoming Call

Jul 8, 2010

Just this writing, I was answering an incoming call and the phone just auto shut down and rebooted. This is not the first time thoug, happens 2-3 times with 2-3 weeks inverval.

View 1 Replies View Related

Android :: Conference Call / Adding Incoming Call

Sep 29, 2009

Is it possible to add an incoming call with current call to make it as a conference call programmatically?

View 2 Replies View Related

Android :: How To Disconnect To Call (incoming Call)?

Jan 25, 2010

how to disconnect the call(i.e incoming call) programmatically ?

View 3 Replies View Related

HTC Hero :: Incoming Call Whilst On A Call - Doesn't Ring

Aug 2, 2010

When I'm on a call and a 2nd call comes in, my phone doesn't ring or anything. Is there anyway to change this so that I know when I have a call waiting without having to look at the screen (which is usually pressed up against my ear)?

View 1 Replies View Related

General :: How To Detect Incoming Call Is Forwarded Call

Nov 26, 2012

i need a way to understand that the incoming call is a forwarded call so i can deny it using tasker or another application.If possible i want to auto decline the call using tasker + secure settings or any other plugin

View 3 Replies View Related

Android :: Launch Activity Like Phone Call?

Sep 27, 2009

1. i have a service that will launch an activity. How to make the activity launched like a phone call? i mean when the phone screen is locked, it will awaken.

2. how to start a service right after downloaded and installed from android market?

View 8 Replies View Related







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