Back to project page open311-android.
The source code is released under:
GNU General Public License
If you think the Android project open311-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/** * @copyright 2012 City of Bloomington, Indiana * @license http://www.gnu.org/licenses/gpl.txt GNU/GPL, see LICENSE.txt * @author Cliff Ingham <inghamn@bloomington.in.gov> *//* w ww . ja v a 2s.c o m*/ package gov.in.bloomington.georeporter.activities; import android.annotation.SuppressLint; import android.content.pm.PackageManager.NameNotFoundException; import android.os.Bundle; import android.webkit.WebView; public class AboutActivity extends BaseActivity { WebView webview; @SuppressLint("SetJavaScriptEnabled") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); webview = new WebView(this); webview.getSettings().setJavaScriptEnabled(true); webview.addJavascriptInterface(new WebAppInterface(), "Android"); webview.loadUrl("file:///android_asset/about.html"); setContentView(webview); } private class WebAppInterface { @SuppressWarnings("unused") public String getVersion() { try { return getPackageManager().getPackageInfo(getPackageName(), 0).versionName; } catch (NameNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } return ""; } } }