Android :: How To Disable Keyguard And Display An Activity To User?

Nov 20, 2010

How can I disable the keyguard when a broadcast receiver is activated by screen_on, so that when it occurs the user sees an activity that I have started behind it?(The activity is running already)I have been trying the following code from a broadcast receiver triggered by screen off.It doesn't seem to be working though as it is. When I turn the screen on, I still have to manually unlock the keyguard on the phone to reveal the activity behind it.

Android :: How to Disable Keyguard and display an activity to user?


Android :: Notification Bar Stuck After Disable Keyguard

Nov 12, 2009

I am working on a lock screen application and am disabling the keyguard using the following code snippet which I call from a service on receiving the ACTION_SCREEN_OFF broadcast: KeyguardManager keyguardManager = KeyguardManager)getSystemService (KEYGUARD_SERVICE); KeyguardLock keyguardLock = keyguardManager.newKeyguardLock (getPackageName()); keyguardLock.disableKeyguard(); This seems to work fine, but when I return to the home screen the notification bar does not respond to touch/drag events. It's stuck and I can't drag it down until I hit the Home button. Has anyone seen this behavior? As far as I know there is no way to disable the dragging of the notification bar programatically. Perhaps something I'm doing is triggering a bug? Any ideas?

View 2 Replies View Related

Android :: Pop Up Dialog Or Activity From Service Running In Background When Keyguard Locked?

Nov 19, 2010

I have an application in which there will be a service continuously running in background and on certain conditions service should call an activity or pop-up a dialog. I think this is possible. The question is, in case device keyguard gets on say after 2 minutes of idle time then will the service continue running in background. And what will happen when the condition of opening pop-up or Activity is reached.

View 1 Replies View Related

General :: Keyguard Test Activity Has Stopped

May 20, 2014

I'm editing a stock rom retail BR 4.4.2 of Moto X. I needed edit the SystemUI.apk for add a feature, and for this i should add a line in the AndroidManifest.xml, when i did all the modifications and install the rom, i get this message "KeyguardTestActivity has stopped". I have identified that the problem stay in the modification in the AndroidManifest.xml, and the "KeyguardTestActivity" is the app Keyguard.apk that is the lockscreen. I don't know why this don't work! I'm using the last apktool, i have installed the framework-res.apk of the stock rom!

View 1 Replies View Related

Android :: Disable The Keyguard And Screen Locking In Android

Jul 30, 2009

i am porting android to our custom board. When android first time boots up, it is proper, i able to go into apps window and able to work. But, if i boot the android for next time, the andorid boots up and goes to main screen, where the screen gets locked displaying "Press Menu to unlock". If i press Menu key to unlock, its reporting error,...........

View 2 Replies View Related

Android :: Disable Activity Slide-in Animation When Launching New Activity?

Feb 18, 2010

have an activity which launches another activity, via a button click. By default, on newer OS versions of android, the OS will animate the new activity sliding in from right to left.Is there a way to disable this animation? I just want the new activity to appear without any sort of animation.

View 5 Replies View Related

Android :: Can An End User Disable 2G Data / Or GSM Function?

Aug 9, 2009

Is there a way for end users to disable 2G data services (e.g. make the phone just a phone)?Or disable the GSM function as well (say, for a device used on a hiking trip as a GPS tracker, where there is no coverage)?
Is there enough control in the SDK to pursue writing an app with a control screen like: [x] Enable Voice (GSM) Enable 2G Data / Enable 3G Data (uses more battery than 2G) [ ] Enable Data When Roaming (may result in extra charges) [x] Enable WiFi [x] Enable WiFi even if device is sleeping [x] Enable Bluetooth [x] Enable GPS [ ] Airplane mode (disable all radios)

View 7 Replies View Related

Android :: Way To Display TextFile To User Through An App

Jan 20, 2010

Suppose I have a text file in /data folder, is there any way I can display the textfile to user through an app?

View 4 Replies View Related

Android : Want App To Display Description Corresponding To User's Responses

Oct 5, 2010

Okay, so I'm writing my first Android app and am basically stuck. The app is a short 4 question quiz with two choices per question. This creates 16 possible results, which I've created descriptions for. I want the app to display the description corresponding to the user's responses on each of the questions after the 4th question is answered. Right now I am storing the values in a string, which is supposed to build upon the previous string answer, after each question. So the first answer is t1, the second answer is t2, and so on. Here is the code for the second question: My problem is that the strings won't hold the values I assign them in the previous question. I have a textview that briefly displays the values returned by the question's answer string (t2 for Question2) and it displays null alpha or nullbeta, depending on the user's response. How do I retain the t1's previously assigned value into Question2 so I can add to it? For instance, if T = "alpha" from Question1, and the user selects button b1 in Question2 how do I make t2 actually equal "alphagamma" instead of "nullgamma"? Is this even possible with strings?

View 1 Replies View Related

Android :: Display Date And Time In User Locale

Jun 6, 2010

I know I can use android.text.format.DateFormat.getDateFormat() to format my dates, and android.text.format.DateFormat.getTimeFormat to format my times, but how do I format a datetime? Similar to the getDateTimeInstance method from java.text.DateFormat. I'm currently just concatenating the result of both the getDateFormat and getTimeFormat's formatters, but I don't know which way around the user prefers to have their dates and times shown.

View 1 Replies View Related

Android :: Display Menu Programatically Without User Having To Press Its Key?

Feb 2, 2009

Is there a way to programmatically display the menu, w/o the user having to press the Menu key?

View 2 Replies View Related

Android :: How To Disable User Interaction Arising From Long Press To EditText?

Jan 19, 2010

A long press on an EditText brings up a menu of options that the user can select. The only messages or options that I want users of my apps to get, I want to come from me via the app. How do you disable this so that nothing happens when you long press the EditText? What other situations like this should I be aware of?

View 2 Replies View Related

Android :: WakeLock And KeyGuard

Jun 7, 2010

I'm just wondering if I do this correctly; I'm programming a notification app which can display a notification when the phone is sleeping

Disable keyguard lock. Aquire a wake lock. show notification. Set alarm for timeout and reenabling keyguard and release wakelock is the user dont touches the screen. 4.1 User touches the screen, and I disable the timer. Do nothing more. Done and done 4.2 User dont touch the screen, so reenable keyguard and release wakelock. Phone sleeps again

Basically I'm wondering about point 4.1 the most. cancel the pendingintent for the alarm, and do nothing more? or should the keyguard and wakelock that are set be dealt with in some way?

View 1 Replies View Related

HTC EVO 4G :: Display Auto Dim - Can Disable?

Oct 22, 2010

When the Evo screen is on for a bit I notice the screen dims, I guess to save on battery life. Is there a way to stop the auto dimming and just have it go straight to a locked/black screen from full brightness?

View 10 Replies View Related

Android :: Display Simple Text Label / Description Bubble When User Taps On OverlayItem In MapView?

Dec 29, 2009

I would like to further annotate the custom markers I have placed on a MapView (using ItemizedOverlay) by displaying a simple text label that appears for a particular item when the onTap event is fired.

This is a trivial exercise in the Google Maps JavaScript API and in MapKit on iPhone, but it is not obvious to me what the best or easiest way to do this is on Android.

View 1 Replies View Related

Android :: Activity Block User Interactions

Apr 26, 2010

How can I temporarily block all user interactions with the views of an activity ?(Other than calling the setEnabled method on each view)

View 2 Replies View Related

Android :: What Is Best Way To Stop Activity And Alert User?

Sep 2, 2010

I have an application that must create a database and if that fails, then no sense moving forward. I've built an AlertDialog and show() it but it never displays. The logic falls through and then barfs because of the missing database.What is the right/best way to throw up a message and halt the activity? The code below executes fine (meaning the show() occurs while debugging and it falls to the next line) but the UI never displays this alert.BTW I realize the throw might not be the most graceful but I'm not even getting that far so.

View 2 Replies View Related

Android :: Waking Phone & Safely Disabling Keyguard

Feb 23, 2009

Does anyone know how to do this correctly? I can't find any examples & the API documentation is pretty hard to follow.I am guessing I need to use the KeyGuardManager and PowerManager... but can't figure out how to bring my activity up past the keyguard and re-enable the keyguard so my activity doesn't let someone get past the lock when my activity awakens.

View 9 Replies View Related

Conditionally Display Image Based On Whether Or Not User Is Connected To Internet

May 17, 2012

I want to conditionally display a image based on whether or not the user is connected to the internet.

I know how to check if the user is connected to the internet or not, what I can't figure out is the conditional image display ?

I want something like:

if( connected )
display(green.jpg)
else
display(red.jpg)

How to do it ?

View 3 Replies View Related

Android :: Detect User Pressing Home Key In Activity

Feb 5, 2010

Can you please tell me how can my activity detect user pressing HOME key?

View 2 Replies View Related

Android :: Re-Prompt To User To Choose Default Activity

Oct 19, 2010

Is there a way to reprompt the user to choose a default activity for an intent? For example, user selects his default home apk and I want him to reconsider his choice once again. I know how to do that on 2.1 and before, but is there a way to do that now on 2.2? Famous Home Switcher, which did similar thing, does not work on 2.2 anymore thanks to google team.

View 1 Replies View Related

Android :: Call Another Activity When User Clicks Hyperlink

Sep 27, 2010

I want to call another activity when the user clicks an hyperlink. Can anybody suggest me how to use Intent in this case?

View 6 Replies View Related

Android :: Detect If Activity Front Most And Visible To User?

Jun 28, 2010

I would like to launch an intent when any of my activity is visible, otherwise I will put it up as a notification, and will be fired by the user. To decide this, I need to know if any of my activity is front-most, how do I that?

View 3 Replies View Related

Android :: Redirect User To HomeScreen After Activity Finishes

May 12, 2010

I'm trying to implement similar behavior as the native phone app. When a User is in the applications menu/drawer (place that lists all applications) and receives and incoming call, after the call has ended the User is returned to the Android Homescreen. How do I redirect activity to the android homescreen like the phone app for that specific case.

View 2 Replies View Related

Android :: Activity Is Displayed After User Unlocks The Screen

Mar 31, 2010

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

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

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.

View 1 Replies View Related

Android :: Start An Activity When User Clicks On A ListItem?

Nov 19, 2010

Here is my code. I'd like to pass a boolean to the activity i want to start.code...

View 1 Replies View Related

Android : How To Allow User To Remove An Activity Form Launcher?

Nov 22, 2009

I am creating an alternative keyboard. In order to help users understand how to set up the IME after it is installed I have added a simple Main Activity that appears in the Application Launcher with set up and usage instructions. I also have a preferences Activity and I want the user to have an option to hide or show the setup instructions Activity if they don't want to see it any more. My question is how best I can do this? I am assuming if it is possible it would require overriding the IntentFilter for the setup instruction Activity. I have experimented with this and read through the Intents and IntentFilter documentation but I can't see how to do this.

View 2 Replies View Related

Android :: How To Close An Activity When User Clicks On Home Button

Feb 19, 2010

I understand that trying to capture home button clicks is a hack, but I need to atleast close my current activity when the user clicks on home button. Is there anyway I can tell the system to close this activity is the user clicks on home button? If so how can I do that? I need to do it as I am listening for location updates and I want to stop the updates and also need to trash any location that was available to me previously. I need to do this just in case any user while in that activity clicks on home button and changes the location settings.

View 7 Replies View Related

Android :: How Do I Return To Calling Activity If User Presses Back?

Aug 4, 2010

My MAIN activity is spawning a child activity that contains a ListView. While this ListView is being populated (through an AsyncTask), an indeterminate progress bar is shown.However, assuming that I am an impatient user and I press the BACK button, the progress bar is cancelled but I am left with a blank screen. I have to press BACK one more time to go back to the MAIN activity.I would like the app to go back directly to the MAIN activity by pressing BACK only once. Can somebody point me in the right direction? I am thinking I should call finish() somewhere but I don't know where to put it.

View 3 Replies View Related

Android :: Retrieve User-Agent Programatically Without Having A WebView In Activity?

Sep 2, 2010

Is there a way to retrieve Browser's user-agent without having a WebView in activity?

I know it is possible to get it via WebView:

WebView view = (WebView) findViewById(R.id.someview);
String ua = view.getSettings().getUserAgentString() ;

But in my case I don't have/need a webview object and I don't want to create it just for retrieving user-agent string.

View 1 Replies View Related







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