Profile cover photo
Profile photo
Martin Sandström
12 followers -
Developer by day, developer by night.
Developer by day, developer by night.

12 followers
About
Posts

Post has attachment
Add a comment...

Post has attachment
Released a static blog generator called AtomicPress. Built in the awesome Flask framework. http://www.marteinn.se/blog/hello-atomicpress/ #python   #flask   #wordpress  
Add a comment...

Post has attachment
I also forgot to mention that I updated the http://madeinstockholm.se website yesterday, looks even better now. For anyone interested in how it was built, the code is on github. https://github.com/marteinn/Madeinstockholm.se---Website #flask   #python  
Made In Stockholm
Made In Stockholm
madeinstockholm.se
Add a comment...

Post has attachment
Just released a small python library called Genres. What it does is basically to go though chunks of music texts (such as reviews) and tries to figure out which genre that music would belong to. https://github.com/marteinn/genres #python  
marteinn/genres
marteinn/genres
github.com
Add a comment...

Post has shared content
Just shipped another music service I've been working on, something that should make it easier to listen through new music releases. Enjoy!
Happy to announce our latest service, Mute Parrot. Stream the latest music based on the best reviews. 

http://muteparrot.com
Add a comment...

Post has attachment
Released another Android utility library yesterday, this one aims to make custom font handling easier. #android 
Add a comment...

Post has shared content
Nice hint on how to debug GCM locally
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 
Add a comment...

Post has shared content
Say hello to our latest Android update. Plenty of new social features such as a activity feed, follow/follower functionality and the ability to get inspired by browsing your friends collections. Enjoy! https://play.google.com/store/apps/details?id=net.vinylwall.app
#vinylwal   #musiccollection   #vinyl  
Add a comment...

Post has attachment

Post has attachment
Nice Volley presentation. #android  
Add a comment...
Wait while more posts are being loaded