Please conduct the following tasks alone. For implementation details you can refer to the lecture slides or the Android developer website. Please do not hesitate to ask me or the tutor if you have any questions. Under “Tip” you can find some hints for the task. The “Checklist” specifies what should happen when your implementation is correct.
Implement an app with a list of tweets that are loaded asynchronously from Twitter like service. You can develop your own service or use: http://gerlicher.mi.hdm-stuttgart.de/mad/index.php. An example PHP script to write your own service can be found here.
Either use an IntentService or an AsyncTask to load the messages in the background. Use the org.json library and the class JSONArray to parse JSON data.
Checklist | |
---|---|
The message are loaded and shown in the list |
Add a second activity that allows to send a message to the „twitter service“. To add a message, a floating button should be shown on the first screen. When it is clicked the second activity is startet. The messages should be send asynchronously to the service.
Add a floating button in the layout using the class: android.support.design.widget.FloatingActionButton. You might need to add the design android support library.
Checklist | |
---|---|
When the button is clicked the second activity is started | |
When sending a new message, it shows up in the list |
Implement the feature that allows to pull down the list of messages and this triggers a reload of the list.
For pull to reload use the layout: android.support.v4.widget.SwipeRefreshLayout
Checklist | |
---|---|
When the list is pulled, the new message are reloaded from the server |