Sunday, October 26, 2014

POX Wiki Android App

[6/23/2015 Update] Here are the latest statistics on the app about six months after publication:








***

I am learning Android programming with a class I am taking at UW Extension. The class is 10 weeks long and I wanted to come up with a project idea that I can work through out the class.

As such, I made an app that is pretty bare, to say the least. It is basically a webview of the POX Controller Wiki. I am hoping that through out the class I will be able to add more to it.

Here are the Java code that creates a webview and loads the page. The code includes allowing JavaScript and an additional method to allow the page to stay within the app after rendering to mobile layout.
public class LandingPage extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_landing_page);
        WebView poxWiki = (WebView) findViewById(R.id.webview);
        poxWiki.setWebViewClient(new myWebViewClient());
        // Confluence renders page for mobile via JavaScript
        WebSettings webSettings = poxWiki.getSettings();
        webSettings.setJavaScriptEnabled(true);
        poxWiki.loadUrl("https://openflow.stanford.edu/display/ONL/POX+Wiki");
    }
    // Stays within app instead of call browser
    public class myWebViewClient extends WebViewClient {
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url){
            view.loadUrl(url);
            return true;
        }
    }

Here are some screenshots of the store.









1 comment:

  1. We have an extraordinarily group of very expert experts who can undoubtedly capable to unfathomable degree subsidiary with android applications improvement.http://www.appsprison.com/download-happy-chick-emulator-for-ios-apk-without-jailbreak/

    ReplyDelete