Profile

Cover photo
Vykintas Valkaitis
Attends Vilnius University
Lives in Vilnius
149 followers|53,034 views
AboutPostsPhotosVideos

Stream

Vykintas Valkaitis

Shared publicly  - 
 
Parduodu dviratį. Aš jau per senas jau offroadui, tai neišnaudoju pagal paskirtį :)
 ·  Translate
1
1
Egidijus Kusas's profile photoVykintas Valkaitis's profile photoCRONUS Karmalakas's profile photo
2 comments
 
1k
Add a comment...

Vykintas Valkaitis

Shared publicly  - 
 
Android animation tutorial, skip first few pages for advanced users.
http://cogitolearning.co.uk/?p=877
1
Add a comment...

Vykintas Valkaitis

Shared publicly  - 
 
 
The Google+ team will be sharing a few updates. Bookmark this event page to watch the broadcast live.
A Morning with Google+
Tue, October 29, 2013, 12:30 PM

1
Add a comment...
Have him in circles
149 people
Martynas Jurkus's profile photo
Litamin Lt's profile photo
Calavera Catrina's profile photo
Aurelija Lankeliene's profile photo
Mindaugas Jackūnas's profile photo
Dovydas Stepanavičius's profile photo
islam elsaid (alexandrsmsm)'s profile photo
Tadas Jankauskas's profile photo
Miglė Kaltenytė's profile photo

Vykintas Valkaitis

Shared publicly  - 
 
 
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 net.npike.android.gcm.GCMBroadcastReceiver and our package name is net.npike.android)

<receiver
   android:name="net.npike.android.gcm.GCMBroadcastReceiver"
   android:permission="com.google.android.c2dm.permission.SEND" >
   <intent-filter> 
       <action android:name="com.google.android.c2dm.intent.RECEIVE"/> 
       <action android:name="com.google.android.c2dm.intent.REGISTRATION"/> 

       <category android:name="net.npike.android"/> 
   </intent-filter>
</receiver>

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

android:permission="com.google.android.c2dm.permission.SEND"

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 com.google.android.c2dm.intent.RECEIVE -n net.npike.android/net.npike.android.gcm.GCMBroadcastReceiver --es "data.alert" "foo"

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

Broadcasting: Intent { act=com.google.android.c2dm.intent.RECEIVE cmp=net.npike.android/gcm.GCMBroadcastReceiver (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.

#androiddev 
2
Add a comment...

Vykintas Valkaitis

Shared publicly  - 
Why do you partner with one of the most popular confectionery brands in the world to advertise a relatively minor update to your mobile operating system? Especially considering the Android robot is already one of the most recognized logos in the world. Most leaks point to Android 4.4 receiving an iterative visual refresh that further refines Holo and a few under the hood tweaks including a new mobile payment system and location settings...
1
Add a comment...
People
Have him in circles
149 people
Martynas Jurkus's profile photo
Litamin Lt's profile photo
Calavera Catrina's profile photo
Aurelija Lankeliene's profile photo
Mindaugas Jackūnas's profile photo
Dovydas Stepanavičius's profile photo
islam elsaid (alexandrsmsm)'s profile photo
Tadas Jankauskas's profile photo
Miglė Kaltenytė's profile photo
Education
  • Vilnius University
    present
Basic Information
Gender
Male
Other names
Oora
Work
Occupation
Android Developer
Skills
Android, Java, PHP, MySQL, HTML, JavaScript
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Vilnius
Previously
Vilnius
Links