Android :: How To Know When App Enters Or Background Mode?
Jul 20, 2010
I am trying to achieve the following with Android : when the app is in background, a thread polls a server every now and then to retrieve data and notifies the user if new data is available. I am using a Service for that, fine. When the app is in "active" use, i.e. one of its activities is visible, the polling should stop as it might interfere with other user actions. I don't understand how to detect the transition between the "active" or "background" use of the app. The onResume() activity methods does not seem to help, as an activity can be hidden or visible during "active" use anyway. My understanding is that the app itself doesn't make the difference between the 2 states.Can it be related when the HOME button is pressed ? Is there another way to do the distinction? I am thinking of an equivalent of iPhone's app delegate method application DidEnterBackground. Is it the right way to think with Android ? Or shall I use another approach?
View 1 Replies
Jun 22, 2010
i just got a htc desire 5days ago i moved over from a iPhone 3G. I have a big problem with it. Battery lasts for about 4-5h i have read forums and googeld for 2 days now.So far i changed my Background to a black one i made wifi turn off after 15min no Bluetooth etc.I think the problem is that my phone never goes in to sleep mode.when i go setting > about phone > battery the up time and awake time is the same.I downloaded advance task killer but the only program i can see running is Smart Keyboard Pro and Amazon. I kill amazon and it stays dead for sometime i cant kill smart keyboard pro it restarts it self straight away.I have had the phone on charge for about 6h now and the battery seams stuck half way and don't relay increase or its increasing very slowly.
View 13 Replies
View Related
Nov 5, 2009
I purchased this phone 2 days ago and since returned it for full refund. It would enter airplane mode and the only way to get out of the mode was to remove battery and then restart. That always didn't work either. This was unacceptable for 200 dollars. The battery was also a big ? It seemed that the battery life was non-existant. I give this phone an E on a grading scale. "E" for effort. Will wait for next Sprint Android phone. That might be a while.
View 49 Replies
View Related
Oct 19, 2009
Buster is now available in the Android Market.When is my bus? Start Buster, and you'll instantly know just when your bus will arrive at your stop. Uses your phone's location sense to find your stop and your buses.Currently in free Beta, Buster supports the metropolitan transportation networks of Austin, Denver, and Sacramento. More cities and features coming soon. We'd love your feedback here or at support-at-n9works.com. Also, we're trying to get a sense which cities to roll out into following the beta cities.
View 5 Replies
View Related
Jun 22, 2009
I'm facing a connectivity problem in my IM-client for a long time already, but still can't find out how to fix it. Found a similar bug report here: http://code.google.com/p/android/issues/detail?id=2059 except PowerManager.SCREEN_DIM_WAKE_LOCK didn't work for me :(
So here is the problem: when device goes idle, wifi is being kept connected for some unpredictable time(1-20 min), but then established connection brakes and here is what i see on the ddms console:
CODE:...............
And "-1" is coming on read() from input stream or SocketException is raised. Then my app is trying to reconnect and sometimes it's successful almost immediately, but sometimes it takes more than 2-3 tries to reconnect(WifiMonitor logs reconnects again and again) with 10 seconds timeout.
Preventing some advices - yes, there is a PARTIAL_WAKE_LOCK and wifilock held by my app, but as i can see this is not enough.
View 2 Replies
View Related
Jul 9, 2010
I'm implementing the onBackPressed() method in my activity. It's crucial to my app that I have this functionality. But, the control never enters this function. It enters onPause() instead, when I press the back button. But the problem is I can't have the same logic in onPause() because when I call another activity, the current activity calls onPause() and I don't want it to execute what should be in onBackPressed().
public void onBackPresed(){
Log.d(TAG,"inside onBackPressed()");
if(STATE == PREVIEW){
} }
View 3 Replies
View Related
Aug 17, 2010
I have 2 EditText widgets ,one takes username and other takes password.When the user enters username in First EditText,the text should be validated (It should accept only characters no digits) when the focus is on the first EditText. How to achieve this. It needs to display error message using setError() method in EditText when the user enters wrong data.
View 1 Replies
View Related
May 11, 2014
I am using a rooted verizon LG G2. I rooted the device with ioroot 25 and installed TWRP 2.7.0.0 using AutoRec. (AutoRec - KitKat Recovery Installer - xda-developers, Here's a forum if you're unfamiliar with AutoRec)
Whenever I try to flash Cyanogenmod 11, TWRP says the flash is successful. I then go to reboot the device and I'm stuck in a boot loop of LG's logo. During the flash, TWRP mentioned that no MD5 file was found, which may or may not be related to the issue I'm having. During the bootloop, I booted back into recovery using the keys on the back of the phone and restored Stock LG KitKat. I've tried using multiple versions of CM 11, nightlies and snapshots. I'm stuck using TWRP 2.7.0.0 because AutoRec is one of the only methods I've had success with when installing a custom recovery.
View 2 Replies
View Related
Nov 18, 2010
How to add a background theme and/or background wallpaper to my app? Right now my app background is plane.
View 2 Replies
View Related
Mar 26, 2012
there are those of us, who due to whatever reason (helmet cams, preference for posture, etc) want to record videos in portrait mode.
What happens (on my sgs2) is that the video records just fine in whatever resolution I pick... but it records it 90 degrees rotated to the right.
The solution that is usually offered is that "you can rotate it after!" yes... but then you have to CROP part of the image and lower the resolution. 1920 x 1080 recordings end up having to be cropped so that half of the view is cut out , or even more if you are maintaining a real aspect ratio.
The questions about "why not just hold it sideways", are just as pointless as the statement by steve jobs telling iphone4 users that they were holding their phones wrong.
is this something that can be remedied ? or has google decided that people should only record videos when their phones are in landscape mode?
i understand that we cant see landscape resolution in portrait mode; but can't we just have a viewport into the camera, but record in properly oriented landscape mode? so that playback on a computer will show the full resolution, even though we will only see part of it on the phone..
View 1 Replies
View Related
Dec 1, 2013
dialer in kitkat is always in landscape mode when call is ongoing....how can we set it in portrait mode
View 1 Replies
View Related
Aug 28, 2010
Just FYI in case anyone wants to know: For download mode, with the phone turned off, fold the number 1 key on the QWERTY keyboard and the power button simultaneously For recovery mode, with the phone turned off, hold Volume Down, CAmera, and Power simultaneously. You navigate with volume UP/DOWN, select with HOME, Menu toggles to "Manual Mode", whatever that it.
View 3 Replies
View Related
Apr 3, 2014
Friends of Jupiter Huawei g525-u00and have been asked Ram Kastvm able but Alanmshkl. Already green screen after power ... not that fast boot mode will not go into recovery mode and not the original ROM using loam bottom half Vbala White gets going
View 5 Replies
View Related
Sep 23, 2013
I have a tablet and I want to set the portrait mode as the default orientation mode instead of landscape mode.
View 2 Replies
View Related
Oct 19, 2013
Trying to root my Trekstor Ventos 8 and follow the instructions by pressing volume - and power on button. Keep getting into safe mode instead of CWM mode. If i press volume + and power butten I get into recovery mode. How or why do/dont I get into CWM mode? Android 4.1.1 is installed.
View 2 Replies
View Related
Jan 5, 2010
I apologize if these topics were already covered in previous threads.I wasn't able to find anything related in my searches. Auto-rotation for keyboard when answering a text message received in sleep mode does not work. If I actively send a text when phone is already awake, keyboard rotates with no problem but when I go to reply to a text that I received while phone is in sleep mode, the keyboard does not rotate. Is this the norm?I am also experiencing a delay when the I wake the phone. After unlocking the phone, I used to go straight to my home page, now I get a "loading" message which takes several seconds. Is this due to the number of apps I have loaded? Is it possibly due to number of photo frames I have on my home screen or the complexity of the wallpaper?
View 5 Replies
View Related
Jun 24, 2010
How can i make the background 50% transparent? Let's say the background of an AbsoluteLayout so it's dark but you can still see through it?
View 1 Replies
View Related
Aug 8, 2010
why does the background becomes low quality in the emulator?
View 3 Replies
View Related
Nov 11, 2009
I define a setBackgroundDrawable with a png resource that's 2px wide and 50px high. Android fills the background with this resource. The question I have: Does Android replicate the resource to fill the width of the screen or does it stretch it? The png is not 9-patch.
View 3 Replies
View Related
Jul 27, 2010
Is it possible to set a background image on a PreferenceScreen? I have tried the tag android: background= "@ drawable/some_background" which can be set in for example a LinearLayout XML, but it doesn't work in the PreferenceScreen.
View 4 Replies
View Related
Jul 22, 2010
I am working on key capturing events in background. i used Service to send my application back. When the application is in forground i can capture the keys and logged in a file.But when i sent it to background i am not able to get. i am aware of onKey() and onKeyDown(). and also i feel these can only capture the keys when application is foreground.
can anyone please suggest how to capture the keys while application is in background. and also without DDMS how can we capture the screen .Is there any API's
View 2 Replies
View Related
Apr 23, 2010
I am working in a Gps app. the Gps is working fine, but i don't know when i am doing other operations in device the Gps is keep tracking or not.
so, how to run the specified Gps class in background,so that what ever i do with my device or nothing the Gps should always keep running(keep tracking).
View 3 Replies
View Related
Nov 21, 2009
I have some requirement as given below:
I have to write an email app that should send a mail to the particular mail id.
I have written a code like this...
It is working fine, I mean sending the mail to the receiver.
But it is launching another Email app (android default app I guess). But I don't want it to be launched, I want directly send the mail to recipient.
My mail goal is that, the user should not know that the mail is sending. The default Email app (android's) should not be visible to the user. The mail sent process should be done in background.
View 2 Replies
View Related
Nov 19, 2010
Is there a way to 'preload' a user interfaces but to not display it until I am ready?
I have a service which has a receiver to listen for action_screen_on to occur. When that occurs, I would like to load an activity. However, as it is now, it takes about 1 second to load. I would like to preload the layout in advance so that when the screen is turned on the layout loads as soon as possible.
View 2 Replies
View Related
Jan 6, 2010
I want to develop an application in which if SIM card is changed then the application should sent SMS to a predefined number from the new SIM. User should not know that SMS are being send from his/ her mobile. For this application needs to run in background. How can I achieve it?
View 5 Replies
View Related
Jan 5, 2010
I am new to Android, and I need some advices for start up. I want to build an application, which will show up, when the user gets into some hot situation. How to get started? How do I make sure my app won't be shut down?
View 2 Replies
View Related
Apr 2, 2010
I am in the process of creating an app that is similar to the build-in SMS app. What I have tried: - running a regular service which worked just fine until android kills the service - using the AlarmManager the make the 5 min. interval call to a service. But I was not able to make this work.
View 2 Replies
View Related
Nov 27, 2009
Is there a way to get webkit running in the background , or even small enough for the user not to know that the webkit browser is running? Basically i want to use this to have java and javascript integration while using the android UI.
View 1 Replies
View Related
Nov 6, 2009
I was wondering if I was doing something wrong or if there is a way to get the NFL Mobile App to playu gameday radio in the background. It seems when I hit the red button it kills it. Anyone else getting this to work?
View 3 Replies
View Related
Apr 4, 2010
In a feeble attempt to learn some Android development am I stuck at graphics. My aim here is pretty simple:Take n small images and build a random image, larger than the screen with possibility to scroll around.Have an animated object move around on it.I have looked at the SDK examples, Lunar Lander especially but there are a few things I utterly fail to wrap my head around. I've got a birds view plan (which in my head seems reasonably sane):How do I merge the tiles into one large image?t each onDraw redraw the background of the previous spot of the moving object, and the moving object at its new location
The problem is the hands on things. I load the small images with "Bitmap img1 = BitmapFactory.decodeResource (res, R.drawable.img1)", but then what? Should I make a canvas and draw the images on it with "canvas.drawBitmap (img1, x, y, null);"? If so how to get a Drawable/Bitmap from that?I'm totally lost here, and would really appreciate some hands on help (I would of course be grateful for general hints as well, but I'm primarily trying to understand the Graphics objects).
View 1 Replies
View Related