Thứ Năm, 28 tháng 5, 2015

[Puzzle][Android Wear] Math Wear - Let's Go Math for Android Wear

Current version: 1.0.3.
Status: Production.

The game is easy to catch up with and has a nice, simplistic design, it is worth a place on your smartwatch.

So you has defeated the dragon, survived a zombies apocalypse, you seem so invincible and are looking for a worthy enemy?

Remember the one who makes you cry like a little wimpy kid at school? Like, everyday?

His name is Math, and now he is on the back of your hand (more like your wrist, but, just, ok?)

How far can you go before he drives you crazy, again? Challenge him, challenge your friends, or your 7 year old kid who knows calculus better than you.



 


 



The rule:
There are 4 numbers appearing on the screen. One of them is the sum of the other three, and your "mission" is to find this number.

Get it now on Google Play Store: https://play.google.com/store/apps/details?id=shop.hqsmp.mathwear2
Amazon Appstore: http://www.amazon.com/gp/aw/d/B00YFDHXMG/ref=mp_s_a_1_1?qid=1432859098&sr=1-1&pi=AC_SX110_SY165&keywords=math+wear

Please donate to keep up the good work of the team: Paypal: tunglxx226@gmail.com. Thank you for your support!

Thứ Sáu, 20 tháng 2, 2015

[A Dev Time Diary] Google Cloud Messaging GCM for Android and Push Notification Tutorial by JavaPapers

First off, you can find the tutorial here:
http://javapapers.com/android/google-cloud-messaging-gcm-for-android-and-push-notifications/

All credit for Joe, great job :).

The thing is I used Joe's post as a guide to take my first steps with GCM, but the source code provided just didn't work at first. I have been searching all across the internet looking for solution but almost no clue. Now I get it, hope it helps :)

1. When you use the server (PHP or Java), you might run into this:
{“multicast_id”:5760807111590163335,”success”:0,”failure”:1,”canonical_ids”:0,”results”:[{“error”:”MismatchSenderId”}]}

There are several workaround of this error:
- The GOOGLE_API_KEY (in your server-side code) or the GOOGLE_PROJECT_ID (in your Config.java of the client code) is incorrect, or they are not from the same Google Cloud Project. Note that the GOOGLE_PROJECT_ID is the Project Number: on Google Developers Page, not the Project ID (I know, right?).
- In my case, and I don't know why, after making sure both the GOOGLE_API_KEY and the GOOGLE_PROJECT_ID are correct and still running into the same problem, I created a new Google Cloud Project, obtained the new keys and Id. Problem solved! If anyone has a clue about this, please let me know :).

2. You can successfully send a message from the server, but the app is forced closed everytime a notification comes. The logcat says the Receiver cannot be instantiated. Check if your AndroidManifest.xml has this:
<meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version"
            />

3. Your message content is returned null. In your PHP, check this line:
$message = array("m" => $pushMessage);
It should be "message" instead of "m". No biggie, just correct the name of the field in the JSON.

If you have any other problems/ workaround/ explaination, please share in the comment down below.

Thanks and best regards :)