Android :: How To Access Programmatically What Is Displayed In Lock Screen
Feb 15, 2010
Today I am looking for a way to mimic the behavior I know from my HTC Hero's lock screen: the calendar and alarm clock can put text & drawables there to inform about an upcoming event or an expired alarm. The lock screen remains there in that it must be dragged down to dismiss the shown event and there might also be a Snooze button.
But, first question: is this default Android stuff or HTC Sense specific only??
Second question: If it is a common Android thing, why can't I find anything in Google's Android documentation for the topics "lockscreen" or "lock screen" that comes close to my question? Where's the API for it?
My problem is: I want to inform the user immediately - even if I try a standard notification, the user with a locked screen will have to unlock it and drag down the notifications list to see & clear what's going on. sigh Putting an endlessly playing notification sound there is a hassle as it takes at least two swipes down to stop the sound playing!
I have a splash screen/loading screen that has .setVisibility() to GONE right after the draw call of my large bitmap is completed. The problem is the splash screen takes a bit to popup which i believe is due to the main activity booting up and doing CPU intensive applications on first run. Is there a way to get my splash screen displayed ASAP? Would it be ok if i had it in a different thread maybe? The splash screen is just a bitmap with a progressBar right below it. My layout is xml based so i cant see myself using setContentView.
Is it possible to get listed the apps or activity which are actually displayed on the screen of the android mobile. I need to display a text box on some event when no acitivity is displayed, excepting the home screen.
Using Google Maps on Android does anyone have any ideas on how to load only markers that would be displayed on the current screen? I'm thinking about sending a request to a web service that returns the lat/lng for the relevant markers. But what would the parameters be that I could use to calculate if a given lat/lng is within the screen?
We are developing an application that requires a download of a music file (mp3). We are using the Browser Activity for the same.
The Browser Activity is invoked from the application and the download url is passed to it, like: startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(downloadurl)));
However, after downloading, on the download list page, if we press the Back button, a blank white screen is displayed. Only after we press the Back button a second time on this white screen, the application screen is displayed. This happens because the Browser Activity view is displayed before the actual downloading starts.
This is an issue in the application flow. We need to manage the flow in such a way that the 'Back' key press on the download list view will take the control to the application screen instead of the white screen.
I was wondering if anyone understood how to make your application be displayed when you unlock the screen. I have an application where the user turns on a Bluetooth device, it connects to the phone, and the user should be presented with a UI. Having them hunt for the app or using the notification menu is not a workable option (too much work and not the obvious behavior).
The problem is that: When the screen is unlocked: - you can popup the activity from the background service when Bluetooth connects to a device - User is happy because the UI is right there
When the screen is locked: - The application gets started but is destroyed - User unlocks the phone and nothing is there but the homescreen
One work around would be to disable the keyguard when the application gets woken up but the nuclear option is a pretty bad option. I know the standard Android assumption is that you shouldn't do this. In the normal case this behavior is fine, but in this case I explicitly did something I want the phone to respond without adding more work for the user to do. As per Google's guidelines if you don't like this behavior there can be an option for you to turn this off or you can not use the application.
A few more details, so after looking at this a bit more the problem isn't necessarily that you can't have an activity running when the screen is locked, unlock and expect it to be waiting. That does work if you do something like the following: lock your device run an app through Eclipse while the phone is locked/off unlock and it will be waiting for you.
But in the case the Activity is already running and I'm brining up a new window (which happens to be a transparent one, saying you're connected and asking what they want to do).
The problem is that it gets killed
The setup here is as follows:
MyBackgroundService is a serivce that handles Bluetooth state (waits for connections, turns on Bluetooth if the user starts the app, etc.). It triggers a popup BackgroundPOPUP activity that runs a ViewFlipper.
MyBackgroundService starts BackgroundPOPUP through an intent.
BackgroundPOPUP is an activity with a Translucent theme (Theme.Translucent to be precise), it shows a ViewFlipper with some instructions and presents some options.
As known, when using the setContentView() method, a view can be displayed on screen.
My question is whether there is a way to receive an event when the view is actually displayed on screen (since it takes some time for the view actually being displayed after the setContentView() method has been called).
Step 1: I am subclassing WebView and rendering html content properly. The intial content is very small with a div and image /link This is displayed in a LInear Layout along with a TextView and ListView. That is my first screen/activity of the application.
Step 2: When I click on a link on this webview, it goes through the webViewclient and expands to full screen to fit the content of the requested page.
After Step 2, I am not able to go back to my activity screen once the content is displayed. When I click on the back button to getback to my activity screen close my activity and goes to the phone's applications desktop. (i.e goes out of my application).
Step 3: In order to fix this issue, I stopped setting my own subclasssed WebViewClient. After doing this, the it seems to render the clicked page in a webView as subactivity. Now When I click on backbutton, it goes back to the activity screen. But, the issue now is, I am not catch event when a link is clicked. How can I catch click events in this case.
I have a samsung vibrant. Every time i plug it in its charger, the lock screen will not lock amd if m doing something, the sensitivity of the screen will be thrown of. It doesn't do that if i plug,it,in a computer usb, it doesn't,do that and charges normally. Is that a wide spread issue.
I am plan B and AVG security installed, both don't always work, I have pattern lock on the phone but even in pattern lock mode when i press and hold power button the phone gives me option to shutdown.
If someone steals my phone they will be able to shut it off without unlocking it since holding down power button still works. So is there a way to lock the power button from shutting off phone when the phone is in pattern unlock mode?
The face-detection example (from the opencv 2.4.2) is working perfectly. But now, I would like to create a custom layout and actually work with just the data extracted from face detection and build a game on it. Not necessarily having the FdView surface taking the entire screen.
I have done these modifications below, but just a black screen is displayed. Nothing appears on the screen.
For those of you who would like to spice up their lock screen, I have created an image of a master lock, that stretches as you slide across the screen!I have included a screen shot of this in action, as well as a link to the .9.png - which needs to be installed using NinjaMorph.I'm loving it, let me know what you think!MultiUpload Download Master Lock .9.PNG
I've a two month old Haier W910 with stock ROM. The other day, when switching on the phone, the device displayed white snow. The device function normally - touch screen, audio, wireless and cellular (accept calls) but the screen continue to show white snow (like old analog TV).
I found a youtube video showing the same symptom and one of the comments suggested that the phone need to re-flash ROM and it will solve the problem. The youtube video posted confirmed that it did. Since then and for the past 3-4 days I've been trying to flash my phone but it doesn't work. I'm able to put the phone in "Download mode" and use fastboot to flash a recovery boot, oem unlock works but I can't seems to reflash full ROM: I can't use the "update.zip" method as a I can't see the screen and when I try to flash different ROMs under www.needrom.dom using 'fastboot update' it keep saying:
archive does not contain 'android-info.txt'
archive does not contain 'android-product.txt'
error: update package has no android-info.txt or android-product.txt
I can't flash the rom in "recovery mode" as I can't see the menu and select the proper option.
I guess I also need to replace the bootloader as the screen is white snow from the very beginning..
So the question is: how can I do a device full reflash WITHOUT using the screen (preferably in fastboot)
i have here a 7'' tablet that i would like to insert in a acessorie in my car. the problem is that once inserted, i cannot seed the entire screen. i have to reduce the screen displayed in the tablet to match the accesorie size. is any app or mod to do it?
About custom Power Management... Is it allow for my app to dim the screen programmatically??, the goal would be to send the phone sleeping when a Intent.ACTION_BATTERY_CHANGED event is handled by a BroadcastReceiver, just like its done automatically by the OS (if so configured) after x time of inactivity.