On 11 Lug, 10:15, Federico Paolinelli <[email protected]> wrote:
> So, I added the receiver (contained in application) in the manifest
>
> <receiver android:name="mypkg.IncomingCallReceiver">
>                 <intent-filter><action
> android:name="android.telephony.TelephonyManager.ACTION_PHONE_STATE_CHANGED"/>
>  </intent-filter>
>
> </receiver>
>
> I gave the readphone state permission
>
>     <uses-permission
> android:name="android.permission.READ_PHONE_STATE"/>
>
> But the onReceive method of my receiver is never called, using a real
> device (hero) or the emulator.
>
> Am I missing something? This is driving me mad.
>

Just to add more info, if I register the receiver in the onCreate of
the main activity of my application, it works correctly.
However, I need to register it in the manifest since I want it to get
fired even if the app is not running.

Federico

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to