Showing posts with label Google App Engine. Show all posts
Showing posts with label Google App Engine. Show all posts

Monday, August 30, 2010

Our First Android Project Is a Game!!

snapshot #1 of All Lights Up in Android Market

snapshot #2 of All Lights Up in Android Market

Friend's son - Jonathan who's still in college wanted to learn some programming during his summer vacation, I gave him a Droid and Android SDK to play around. He never wrote Java before, and now.. after two months hard work, our first Android baby comes to the world! If you have an Android please don't forget to download it and give him some comments, just remember this came from a boy who didn't know how to write program two months ago! The challenges of the project was not only to get to know the UI of Android but to find a good algorithm to help player to solve the game if they click at "Hint" key. 
the opening screen
the menu screen
one of the 5x5 game screenshot
high-scores listing


The game can play on any Android device without internet connection, however, if you want to download more games, or see the high scores or upload your high scores then the internet connection is required. I have managed to implement the service from Google App Engine(GAE), it handles the service calls from the Android devices and keep all upload games and users' uploaded high scores. A web-based administration portal is offered to manage all games contents, upload activities and users preferences, this is done by GAE and Dojo JavaScript library.
activities management page


games management page


Tuesday, July 13, 2010

411Square - Your FourSquare Checkins History Map

FourSquare.com has become one of the fast growing location-based social networking service, its web and mobile application allow registered users to connect with friends and update their location by checking in existing venues, and users can leave tips comments on every check-in to earn badges and mayorships. I am a big fan of Foursquare, I just earned my World Cup 2010 badge couple days ago -

FourSquare offers an API which supports OAuth Authentication and allow developers to retrieve users' check-in history and venues information. Since Google is encouraging developers to upgrade the applications using Google Maps API to upgrade from V2 to V3, I have decided to rewrite my old PHP-based FourSquare History Map application to a GAE-based(Google App Engine) application with the new Google Maps V3 API, and change the authentication method from user id/password to OAuth.

The application is hosted at 411square.appspot.com which requests a Google account to login, since it is used to save users' OAuth credibility -
click at "LOG on" to log in your Google account -
If this is your first time login, the user preferences page will be displayed and you will required to update your profile data before going to get OAuth authentication.

Click at "Update" button and then click at "Get Authorization" link to allow this application to access your Foursquare information.





Once you finish the OAuth process, by clicking at "History" you can see all your check-ins history up to 1000 records (can be changed by the preferences setting). The upper part showing the detail listing of the check-ins history and the data can be sorted by clicking at the header of the table. If you click at the row of the listing you can see the marker information pop-out on the map below.
The lower part is the map showing all the check-ins' venues, you can click at the marker to get more detail and by clicking at the icon you can open the venue page at Foursquare.com.


This application also offers the friends' current locations on map, click at "Friends" link you can see list of your friends' latest check-in venues, a Google Map under will show their Foursquare icons on the locations.

Friday, April 30, 2010

ezSHOP - A PayPal Shopping Cart For Your Google Site


On my previous posting, I have demoed using the Google Spreadsheet to manage the PayPal shopping cart on Google Site. However, the back-end server was an Amazon EC-based PHP agent. Now I have ported the server to Google App Engine which users can just use their Google authentication  login to finish the setup without giving away their passwords.

To begin the store setup you need to prepare your items on the Google Spreadsheet, you can see the example spreadsheet here. Make sure your spreadsheet has the same headers (case sensitive), the sku, title, price, picture url fields are required, all others are optional.

To start the set up go to  ezshop411.appspot.com

You need to have a Google account (Gmail or Google Apps account) to start. Once you login, you will be bringing to the User Preference page. Your nick name will be your Google account id and the email will be your Google Email. The following two fields asking for an additional Google account which should have minimum READ access right for the spreadsheet you gonna use for the store. You can enter the same account information as your original one, however, for the security, we recommend use different Google account.
Once all information filled out, click at the Update button to save them. Now click at "Main" button you start the build-up. The main page already load all your Google Spreadsheet files' name from your site for you to choose to generate the token to create the PayPal store.
user preference settings


Once you decide which file to use just click at "Add" button to create one store Gadget list. It will show you the time it was created and the store Gadget URL which you will need to use it when add the store gadget to your Google Site. You can also remove the listing by clicking at "Delete" button. The deleting will not delete your spreadsheet on your Google Doc, however, if you have any Gadget using this token to access the store information will stop to function. If you click at the name of the list it will show you the spreadsheet in CSV format, you can use the feature to double check if you choose the right file.

Now, open the Google Site, select the site you want to add the ezSHOP store, choose the PAGE you want to add the store Gadget, click at "Edit page" button. Once you are in EDIT mode, go to the section where you want to add the Gadget, then click at "Insert" button, choose "More gadgets"

A new window will pop out -

Click at "Add gadget by URL" on the left-hand side.

Type in the URL which you copy from your main page's Gadget URL then click at "Add" button.

A Gadget setup screen will be displayed as above. Gave the Gadget the proper width and height, make sure you check the "include a scroll-bar on gadget when necessary". Click "OK" to finish setup.
You can always come back to edit the Gadget setting by clicking at "Properties" of the Gadget.
Once you save the PAGE from EDIT mode, you should be able to see the store items listing right away. The current released version only supports PayPal "Buy Now" button. I will add the PayPal shopping cart function for the next release. Once customer click at "Buy Now" button, a PayPal payment page will show up and customer can fill up the information to complete the transaction!
There are some other issues like shipping charge, sales tax, inventory control... etc. You will need to go to your PayPal account page to  set up correctly. Some of the functions can be done programmatically through PayPal API, we will discuss these more details in the future releases.

Above is the sample spreadsheet we used to do the demo, you can download it and upload it to your Google Doc to test this ezSHOP Gadget.


********************************************************
NOTE:
This Gadget only works under HTTP not HTTPS since there is PayPal service url link within the HTML codes, unfortunately, now Google Sites default URL only allows HTTPS, like https://sites.google.com/a/.... therefore, you have to map your own domain host name to the Google SITES to use HTTP, for example, create a host named "store" under your Domain, so http://store.yourdomain.com will be your url. To map your domain host to Google Sites just go to "Manage Site" and choose "Map this site" button to proceed. Only done, you can see the Gadget under you own domain url page.