RSS Reader Android App Tutorial 5: Show WebSite Content in WebView

New Update Version 2.92:

  • Improve drag down to refresh content
  • Enable/disable page navigation function
  • Fix app crash bug
  • Add Google Play Library
  • Add Interstitial Ads

New Update Version 2.4:

  • Change to load content from link by default
  • Add more comment in source code
  • Fix SimpleDateFormatter “Unparseable Date” bug: this bug will cause European users cannot load the rss content;
  • Add AdMob 6.4.1 module to help you monetize your app;
  • Add Google Analytics V2 module to help you trace installation;
  • Fix WebView webpage not available bugs

Show rss content is the last task for Rss Reader Android App. In this android code example, I will create a new Activity class to handle the presentation. Normal Rss feed content is HTML formatted. So I prefer to use WebView to show RSS content instead of TextView. In the following Android WebView example, I will show you how to switch activities programmatically, pass data from one activity to another activity, and show HTML content on WebView.
Read more

Rss Reader Android App Tutorial 4: Drag to Refresh in ListView Android Example

New Update: Adding Loading More in FooterView
Several weeks ago, I created a IOS tutorial about how to implement pull to refresh in IOS UITableView. In my Rss reader android app, I also want to add pull to refresh feature so that user can easily update the ListView content. I searched online and spend several to integrate one open source project in my Android ListView example. After that, I find it is quite hard to make some change basing on the open source project because of its poor flexibility. Therefore, I decide to create my own drag to refresh ListView (or called pull to refresh ListView).

In my app, I will create a subclass of ListView which is called RefreshableListView. The new ListView class will allow user to drag down and trigger loading event. So my RefreshableListView will implement the interface OnScrollListener and override the interface functions onScroll and onScrollStateChanged; To track user interactions, I will override the function onTouchEvent as well. Once we drag down the ListView, we will see the headerView which gives a tip “Pull Down to Update”. If we release ListView, the headerView will stay on the top and wait for updating. Once the updating processing finishes, the headerView will shrink back and disappear. Now let’s see the example source code step by step.
Read more

Adding Admob Banner in Android ListView Header

Adding AdMob ads banner in ListView header is quite difficult, comparing with adding ads banner in IOS UITableView header. It is simply because there is no header section for ListView in Android. But IOS UITableView has and UITableViewDelegate offers a very convenient way to customize the header and footer. For Android ListView, we have two ways to solve the problem. In this Android AdMob example, I will show you how to add AdMob Banners in Android ListView App.

Read more

iPhone Rss Reader App For Twitter

In the post, iPhone Rss Reader App IOS Tutorial, I gave an example to show you how to create a RSS Reader App for iPhone. In that tutorial, I am using the data source from WordPress powered website. One of my friend, Mohamed, wonder if it can be modified to get RSS Feed from Twitter. I think it is necessary to create this iPhone App tutorial to show how to migrate the iPhone RSS Read app example to read the twitter rss feed.
Read more

How to Add Smart Banners in Your Android and iPad Apps

A new ad unit, Smart Banner, is introduced after AdMob v6.0. This new ad banner make us able to render multiple size of ads on any screen size, regardless it is Portrait or landscape. Lack of screen size standard, there are too many different screen size mobiles and tablets we are using in the world. It make us too hard to create our apps to fit with all the types of screen size.

Smart Banner help us to solve the screen size problem. It smartly detect the width and height of the phone in current orientation and decide to show the most suitable size of ads in our apps. One piece of code can solve the problem to show different size ads in different device where our apps are running. For example, the Smart Banner can show either 320×50 or 360×50 size ads in portrait mode. While in landscape mode, it will show an ad in 480×32 or 682×32 which is depending on the height of the phone.

Download and Try The Example App
AdmobSmartBannerExampleQR

Read more