Re: [android-developers] GCMBroadcast Receiver Enable/Disable

2012-11-30 Thread TreKing
On Wed, Nov 28, 2012 at 10:53 AM, Παύλος-Πέτρος Τουρνάρης 
p.tourna...@gmail.com wrote:

 Although at first it worked like a charm, in the Preferences Screen, when
 i restarted the App it stopped working.


You should clarify stopped working.


 Is there any appropriate way to enable/disable such a Receiver across the
 Application?


Don't know a ton about Receivers, but maybe instead of registering it in
the manifest, you enable it in code if your preference is set?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] GCMBroadcast Receiver Enable/Disable

2012-11-30 Thread Παύλος-Πέτρος Τουρνάρης
Stopped working = stopped receiving notifications even though the GCM
Receiver was enabled.

I have to register the receiver class in the Manifest in order to work.


On Fri, Nov 30, 2012 at 7:58 PM, TreKing treking...@gmail.com wrote:

 On Wed, Nov 28, 2012 at 10:53 AM, Παύλος-Πέτρος Τουρνάρης 
 p.tourna...@gmail.com wrote:

 Although at first it worked like a charm, in the Preferences Screen, when
 i restarted the App it stopped working.


 You should clarify stopped working.


 Is there any appropriate way to enable/disable such a Receiver across the
 Application?


 Don't know a ton about Receivers, but maybe instead of registering it in
 the manifest, you enable it in code if your preference is set?


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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


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

Re: [android-developers] GCMBroadcast Receiver Enable/Disable

2012-11-29 Thread Παύλος-Πέτρος Τουρνάρης
/BUMP

Anyone Please???


On Wed, Nov 28, 2012 at 7:53 PM, Paul-Peter Tournaris p.tourna...@gmail.com
 wrote:

 Hello guys. In my application i have a gcmbroadcast receiver registered,
 so that i can receive PushNotifications.

 It is the Basic GCMReceiver Class provided by Google and i have an element
 receiver in my Manifest for it.

 I added a CheckBox in my Preferences Screen in order to enable/disable it
 but i had issues with it. The behaviour i want is to enable and disable the
 Receiver based on the value of the CheckBox.

 So when the App starts i added a new method to check the value and trigger
 it as needed using the ComponentName object and its methods.

 Although at first it worked like a charm, in the Preferences Screen, when
 i restarted the App it stopped working.

 Is there any appropriate way to enable/disable such a Receiver across the
 Application?

 Thank you in advance.

 receiver android:name=com.**google.android.gcm.**GCMBroadcastReceiver
  android:**permission=com.google.**android.c2dm.permission.SEND **
 android:enabled=true

 Receivers registration inside Manifest.

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

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

[android-developers] GCMBroadcast Receiver Enable/Disable

2012-11-28 Thread Παύλος-Πέτρος Τουρνάρης
Hello guys. In my application i have a gcmbroadcast receiver registered, so
that i can receive PushNotifications.

It is the Basic GCMReceiver Class provided by Google and i have an element
receiver in my Manifest for it.

I added a CheckBox in my Preferences Screen in order to enable/disable it
but i had issues with it. The behaviour i want is to enable and disable the
Receiver based on the value of the CheckBox.

So when the App starts i added a new method to check the value and trigger
it as needed using the ComponentName object and its methods.

Although at first it worked like a charm, in the Preferences Screen, when i
restarted the App it stopped working.

Is there any appropriate way to enable/disable such a Receiver across the
Application?

Thank you in advance.

receiver android:name=com.google.android.gcm.GCMBroadcastReceiver
android:permission=com.google.android.c2dm.permission.SEND android:enabled
=true

Receivers registration inside Manifest.

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

[android-developers] GCMBroadcast Receiver Enable/Disable

2012-11-28 Thread Paul-Peter Tournaris
Hello guys. In my application i have a gcmbroadcast receiver registered, so 
that i can receive PushNotifications.
 
It is the Basic GCMReceiver Class provided by Google and i have an element 
receiver in my Manifest for it. 

I added a CheckBox in my Preferences Screen in order to enable/disable it 
but i had issues with it. The behaviour i want is to enable and disable the 
Receiver based on the value of the CheckBox.

So when the App starts i added a new method to check the value and trigger 
it as needed using the ComponentName object and its methods.

Although at first it worked like a charm, in the Preferences Screen, when i 
restarted the App it stopped working.

Is there any appropriate way to enable/disable such a Receiver across the 
Application?

Thank you in advance.

receiver android:name=com.google.android.gcm.GCMBroadcastReceiver
 android:permission=com.google.android.c2dm.permission.SEND
 android:enabled=true

Receivers registration inside Manifest.

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