requestWindowFeature(Window.FEATURE_NO_TITLE);// hide statusbar of Android
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
        WindowManager.LayoutParams.FLAG_FULLSCREEN);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
WebView myWebView = (WebView) findViewById(R.id.webview);
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
myWebView = (WebView) findViewById(R.id.webview);
WifiManager wm = (WifiManager) getSystemService(WIFI_SERVICE);
String ip = Formatter.formatIpAddress(wm.getConnectionInfo().getIpAddress());
myWebView.loadUrl("http://localhost:8080";);


This is the code i am using.

On Saturday, October 29, 2016 at 9:42:24 AM UTC-4, sardar khan wrote:
>
> You can use WebView in android.
>
> On Sat, Oct 29, 2016 at 7:10 AM, DatOneLefty <k9do...@gmail.com 
> <javascript:>> wrote:
>
>> My app runs a webpage, whenever I click on a link, it opens up the page 
>> in chrome and not the app. How can I fix this?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Android Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to android-developers+unsubscr...@googlegroups.com <javascript:>.
>> To post to this group, send email to android-d...@googlegroups.com 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/android-developers.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/android-developers/3d396130-de27-44ce-84c7-dfec64fcbc99%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/android-developers/3d396130-de27-44ce-84c7-dfec64fcbc99%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/b12cb2a8-2055-4b73-9ffd-0ff21f09c16d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to