Profile cover photo
Profile photo
Vykintas Valkaitis
Vykintas's posts

Post has attachment
Parduodu dviratį. Aš jau per senas jau offroadui, tai neišnaudoju pagal paskirtį :)
12 Photos - View album

Post has attachment

Post has attachment

Post has attachment

Post has attachment

Post has shared content
Testing Your Android GCM Broadcast Receiver without GCM Messages

So depending on your environment it's kind of a pain-in-the-butt to test Google Cloud Messaging on an actual device.

Wouldn't it be nice if you could just test the code locally that would receive those magical GCM messages?  *You can*.

adb shell is a magical place - a place where you can construct intents and fire them off into the system.

Step 1:  Open your AndroidManifest.xml, locate your GCM Broadcast Receiver (let's say ours is and our package name is

   android:permission="" >
       <action android:name=""/> 
       <action android:name=""/> 

       <category android:name=""/> 

Step 2:  Temporarily remove the following attribute from its declaration:


Step 3:  Open a terminal / command prompt where you can access ADB.

Step 4:  Enter the shell.

adb shell

Step 5:  Paste the following (replacing the appropriate values) and hit enter:

am broadcast -a -n --es "data.alert" "foo"

If you did everything correctly you should get some output like:

Broadcasting: Intent { (has extras) }
Broadcast completed: result=-1

... and your GCM BroadcastReceiver should fire up and build a notification (or whatever you have your GCM BroadcastReceiver doing.)

Step 6: Finish your testing and undo Step #2.


Post has attachment

Android animation tutorial, skip first few pages for advanced users.

Post has shared content
The Google+ team will be sharing a few updates. Bookmark this event page to watch the broadcast live.

Post has attachment
Wait while more posts are being loaded