Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Mike Willbanks' Blog:
Android C2DM with PHP and Zend Framework
Nov 23, 2010 @ 17:26:33

In this new post to his blog Mike Willbanks shows how to use PHP - more specifically the Zend Framework - to send push notifications to an Andriod device via C2DM.

So you’ve got a new fancy Android application and you want to be able to send push notifications to the phone. Either for synchronization purposes or for notifications. Since C2DM is fairly new and is currently in the labs it is rather difficult to find code that already handles sending out the notifications correctly. This article will go through sending a push notification (or message) through the Android C2DM server utilizing PHP in the fashion of a Zend Framework component.

His setup uses the Zend Framework for the heavy lifting and Gearman to handle the asynchronous sending of the messages. Of course you'll need a Google and C2DM account to make things play nicely together. The solution also uses a third-party server for the C2DM messaging. Most of the remainder of the post is code ready for copy and pasting that defines C2dm service adapters for the Zend Framework, some exception handlers for common issues, some custom workers for Gearman and the Java code you'll need on the client side to receive the messages.

tagged: andriod tutorial c2dm zendframework gearman google

Link:

Developer.com:
Build Your First PHP for Android Application
Sep 22, 2010 @ 16:02:11

On Developer.com there's a recent tutorial looking at developing your first Andriod application in PHP (running in a PHP interpreter on your device).

Google's open source Android mobile operating system is taking the smartphone market by storm. Unlike Apple, which has stringent guidelines and requirements for developers who want to offer their applications on the iPhone App Store, Google has left the Android platform wide open. You can even write Android applications in PHP now. The folks at Irontech have created a PHP port to run on Android, and with the Scripting Layer for Android (SL4A), you can build PHP Android applications.

He shows you how to install the tool on your emulator (it doesn't have to be on a device) and how to set up the PHP environment to work with the SDK. He also includes some sample code to help you get started - an interface to the take88.com. There's also instructions on how to get the mini-application working on your phone.

tagged: andriod application tutorial sdk sl4a

Link:



Trending Topics: