Android :: Can't Register To Receive Screen Off Intents From Manifest

Aug 24, 2010

I have an application that listens for screen off, and user present intents. Since you cant register to receive screen off intents from the manifest, I am registering them in a service. Do I really need to have a whole service to ensure that I always get notified of when the screen shuts off, and the user unlocks the phone? Seems really wasteful :-(

The code I use in my service:

@Override
public void onCreate() {
super.onCreate();
Log.d(TAG, "Service created.");
// register receiver that handles user unlock and screen off logic
IntentFilter filter = new IntentFilter(Intent.ACTION_USER_PRESENT);
filter.addAction(Intent.ACTION_SCREEN_OFF);
BroadcastReceiver mReceiver = new ScreenReceiver();
registerReceiver(mReceiver, filter);
}

Android :: can't register to receive screen off intents from manifest


Android :: Register Application Class In Manifest?

May 28, 2010

I have one Application class to keep the global state of my application. But I'm unable to register it in Manifest file? Any idea how to do this?

View 1 Replies View Related

Android :: To Unregister A Broadcast Receiver Register Registered In Manifest File

Mar 19, 2010

I have been able to register and unregister a broadcast receiver from the java code and know that a broadcast receiver is unregistered (even if it is not done explicitly) on its own as the process that registered it is killed. Now I have a broadcast receiver which has been registered through manifest file and not through the java code, and need to unregister the broadcast receiver from the java code. Since this, i think would need a reference to System context that instantiates the broadcast receiver.

View 4 Replies View Related

Android :: Intents - Register To Be Alerted For Incoming Emails?

Mar 13, 2010

Extreme Android developer newbie here...well, new to Android development, not development in general.

I want to write an application that gets notified when emails come into the device, and takes various actions based on data in the email (subject, sender, to, etc). I think what I have to do is create a BroadcastReceiver with an IntentFilter. The problem I'm having is figuring out what Intent(s) I need to "listen" for. Can anyone point me in the right direction?

View 1 Replies View Related

Android :: Register Application To Receive Sms

Nov 24, 2010

how can I register my application so that when I receive a sms my app appears in dialog Complete action using. I have put in an intent code

<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.intent.action.SENDTO"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="sms"/>
</intent-filter>

but it's not working... should I use receiver? Note that the activity in which I've inserted this code is not main activity.

View 2 Replies View Related

Android :: Cannot Receive Broadcasts For Package Intents

Oct 20, 2009

I am trying to register a Broadcast Receiver to receive broadcast events for the package events. Following is the code and my receiver in the manifest file. The log statment never happens, but I can clearly see the same broadcast firing for "HomeLoaders" (the Launcher) debug statements.

public class IntentListener extends BroadcastReceiver {
@Override public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
Log.i("INTENT LISTNER:", intent.getAction()); } }

<receiver android:name="IntentListener" android:enabled="true" android:exported="true">
<intent-filter> <data android:scheme="package"></data>
<action android:name="android.intent.action.PACKAGE_ADDED"></action>
<action android:name="android.intent.action.PACKAGE_ADDED"></action>
<action android:name="android.intent.action.PACKAGE_CHANGED"></action>
</intent-filter> </receiver>

View 1 Replies View Related

Android : What Intents Do I Use To Pass / Receive Variable To Another Class?

Feb 17, 2009

What intents do I use to pass a variable to another class? And also which intent do I use to receive it?

View 3 Replies View Related

Android :: Possible Bug With Intents / Pending Intents

Nov 7, 2009

I have some code that is creating and removing alarms, and which works great in Android 1.5 and 1.6 but breaks on the Android 2.0 AVD.The code that's giving this exception is: Code...

View 3 Replies View Related

HTC Hero :: Keyboard - Slow And Keys On Right Edge Of Screen Especially Delete Don't Register At All Sometimes

Nov 30, 2009

I have a problem with my keyboard that only seems to have started since I installed the Hero firmware update (which has sped up the phone considerably).

When I first got the phone I was really impressed by the Keyboard and the speed at which I could type. But since the update it is really slow and keys on the right edge of the screen (especially delete) don't register at all sometimes.

I have calibrated the keyboard but it doesn't seem to make any difference.

View 22 Replies View Related

Android :: App That Makes Screen Light Up When You Receive A SMS?

Nov 15, 2009

Pretty much what the title says. Is there any app out there that lights up the screen when you receive a sms /txt message?

View 9 Replies View Related

Android :: Instant Email Receive When Screen Is Turned Off

Mar 24, 2010

Is there any possibility to setup Android 2.1 to check for new emails when the screen is turned off? Everything works great when it's on, but I really like to let my phone act as instant mail reader/notifier when the phone is unused.

View 5 Replies View Related

Android : Receive Event When View Is Actually Displayed On Screen?

Jan 19, 2010

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).

View 2 Replies View Related

HTC Droid Eris : Getting A Lag On Screen When You Receive A Call?

Mar 4, 2010

Has anyone else been getting a lag on the screen when you receive a call? My phone starts ringing and freaking out until finally it answers the call... (I have been pressing the Green hard button bottom left) The regular answer and decline buttons dont come up until i'm already talking

View 2 Replies View Related

General :: Galaxy S4 - How To Receive Notifications On Lock Screen

Nov 2, 2013

I recently just switched from my iphone to a galaxy s4. I love it except for how I receive notifications. Is there anyway to receive notifications on the lock screen like you would for an iphone? All I see on my lock screen is text messages, I don't receive any notifications from instagram, games, etc..

View 6 Replies View Related

Sony Ericsson Xperia X10 :: Screen Lock - Can't Receive Calls?

Jul 14, 2010

Sometimes when I have my screen locked (either by pressing the screen lock button at the top of the phone, or automatically after the time-out) people are unable to call me, they get a 'busy' tone.

I have tried phoning my mobile from a land-line and I usually get through and from that point on the other person can also get through to my mobile

Have I done something wrong or have a setting set incorrectly?

I'm missing calls as people cannot get through to me.

View 1 Replies View Related

HTC Hero : Make - Receive A Call Screen Going Balck / Setup?

Dec 18, 2009

This is very irritating. How can you stop the screen from going black after you make or receive a call?

View 1 Replies View Related

Samsung Captivate :: Lock Screen When Receive Missed Call Or Message

Oct 7, 2010

1. My friend just got a Droid phone for Verizon and he has the PUZZLE lock screen All the time (not just when theres a missed Message or Call <mine only does that). Can this ben changed?

2. Is there an App for a Screen Tap turn on, I dont enjoy pressing the button on the side everytime?

3. Are there any other Screen lock Apps other than LockBot free?

View 9 Replies View Related

Sprint HTC Hero :: MMS Settings - Screen Light Up When Receive Text Message?

Dec 5, 2009

The only thing that I've found that I dislike about this phone is the way it alerts you about new text messages. Is there a way to make your phones screen light up when you receive a text message? Also is there a way to set a reminder like every few minutes that you have a text message? Say if you receive a text message while you're away from the phone then two minutes later the phone vibrates or sounds to remind you that you have a new text.

View 1 Replies View Related

HTC Hero :: Send / Receive Mms On Phone - App To Snap A Picture Of My Current Screen?

Mar 13, 2010

I am wondering if you guys have found a way to send or receive mms on your heroes and what version of android yours is running. Mine is running 1.5 and is the round hero, not the newest one. I also cannot find a place anywhere to send mms. Also, how do I snap a picture of my current screen, or do I need an app for that?

View 10 Replies View Related

HTC Droid Eris :: Turn Off Mobile Network And Connected To Wi-fi Can Receive Texts - Send/Receive Pics

Feb 22, 2010

If i turn this off while I am home or in my dorm and connected to wi-fi

can I
1) Receive Texts
2)Send/Receive Pics
3)Make Calls?

View 26 Replies View Related

Android :: Start Activity Without Manifest

Jan 22, 2009

I create my Network provider and I want to start Activity from it. Is it necessary to create separate Activity with Manifest and then launch it using startActivity? Can I launch unregistered Activity directly from my provider?

View 5 Replies View Related

Android :: Getting Manifest.xml Of Applications From Market?

May 20, 2009

is there some way to retrieve the manifest.xml of an application from the market, without installing the application? I think the official Market Application somehow get this file (or at least parts of it) to show needed permissions, etc. before installing. I'd be interested in seeing the IntentFilters defined by applications and their activities and processing this information in my application.

View 6 Replies View Related

Android :: Two Applications In One Manifest File?

Mar 12, 2009

Is it possible to have two application tags (<application>)in the same AndroidManifest.xml file ?If yes - is there anything special that needs to be done, I am trying it, the syntax is accepted by the XML parser but when I install my second application is not available.

View 4 Replies View Related

Android :: Modifying Manifest On Runtime

Nov 3, 2010

I am writing an application that will run on 2.0 and above. Now, I am thinking of adding the Data backup feature to the application. Is there anyway to modify the manifest file to include the metadata only if the phone is using Froyo(2.2). Ideally, i would like to avoid creating a separate application for just Froyo.

View 3 Replies View Related

Android :: Get Manifest Versionname By Code?

Jun 5, 2009

How can i request the versionName stored in manifext.xml from within my Code?

>manifest.xml

View 2 Replies View Related

Android :: Getting Package String From Manifest?

Sep 14, 2010

This should be simple but I can't find any info on this...

I simply want to read the package value in the android manifest...

CODE:......

The reason is simple I have to call context.getResources().getIdentifier(...)and I need the package.

Since this code will be reused in other apps I want to make it fool proof when I export it and therefore not have to change the value each time.

View 2 Replies View Related

Android : Indicate In Manifest Multiple Packages?

Oct 22, 2009

How do I indicate in the manifest multiple packages

View 4 Replies View Related

Android :: Add Permissions To App Manifest Programatically?

Nov 19, 2010

I am trying to add permissions to my application manifest, so it can access other apps that the user installs at runtime. I thought the way to do this was to define a permission-tree in the manifest, and then use PackageManager.addPermission() to add permissions under that tree. However, I can't get this to work and the documentation I found wasn't conclusive. Could anybody show me how to do this by means of a simple example?

View 3 Replies View Related

Android :: Added Broadcast Receiver In Manifest

Jul 11, 2010

So, I added the receiver (contained in application) in the manifest. Broadcast doesn't fire my broadcast receive.

<receiver android:name="mypkg.IncomingCallReceiver">
<intent-filter>
<action android:name="android.telephony.TelephonyManager.ACTION_PHONE_STATE_CHANGED"/ >
</intent-filter>

View 4 Replies View Related

Android :: Permission Enforcement In Application And Manifest

Jan 10, 2010

I have two applications A and B (in different packages). A can send an explicit intent to B to perform some kind of action. Then,I enforced a permission in application B called "my.permissions.B_PERMISSION ". The A application can still call B despite the fact that it doesn't have the appropriate <uses-permission> in its manifest. Have I understood something wrong?

View 7 Replies View Related







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