pushy

Pushy is an Android application based upon Google C2DM techniques. Before push certain information to clients. We will collect the users' individual information requirement through their feedback. Then collect corresponding message via RSS and send what they are interested in.

We implemented both client and server in JAVA. Attached is our tech report and demo videos(Report.rar), as well as code (Proj_file.rar) .

Why Push?

Push is a new approach for data transmission where the connection is started by the server. It's opposite is called pull, where clients periodically asked the server whether there is any new content or not. If there is, transmission will be performed. However, to guarantee the timeliness of the content, the inquiry will be performed frequently. Therefore, a lot of energy and data volume would be wasted, and it is not tolerable for portable devices like cell phones or laptops. Push is a promising solution for those problems.

What's Push?

The framework of push is illustrated in following figure.

In general, push can be implemented by a platform defined by yourself, but for the sake of convenient, we directly use the Google Push Service, that is, the Cloud to Devices Message (C2DM). The connection will be launched by our server, and since then, the client and server can interact with each other directly.

Of course, our server will obtain the content which is prepared for the client from the Internet by pulling.

How to Push?

How does C2DM work can be easily explained using a figure by Johan Nilsson.

A key component of push services is a constant connection between portable devices and google server, and in C2DM, all the APPs using C2DM shared this connection with google market. To start a push, APP server should post a HTTP request to messaging frontend. If the connection is detected to be available, the message will be pushed immediately. Otherwise, when the client is power off, the message is stored and wait until the connection is established.

However, the implementation of our APP involved many other aspects. Firstly, you should successfully use the pushed message to launch your activity

on your phone, process many messages, and interact with users and server. The general framework of the client is as following.

When the message arrived, broadcast receiver will be launched and store the message locally in the database. The database is organized using XML format and the user interface will parse the database and build an interface. The interface gives users opportunity to give their comment on each message and our APP will feedback to the server according to the comment. The feedback mechanism is applied using multiple thread to guarantee the responsiveness of our APP.

The server has two function, to record users' preference and to send message periodically. Firstly, each devices will be registered in the server. The reception of feedback uses direct socket programming and the server will guess what users like. From different source of message, the server will obtain news and messages in different fields, including entertainment, technology, sports, etc. According to each user's preference, the server will send selected message to them.

Demonstration