netgoogle
Lurker
Hello
I converted a game from Cordova
After that I open the project on َAndroid Studio
I add WebView to my project in order to add Banner Ads
this my code:
----------------------------------
----------------------------------------
The problem is that the game starts downloading and then celebrates
But when I put the link "https:// " of the game it works fine
I hope you get my idea
thanks
I converted a game from Cordova
After that I open the project on َAndroid Studio
I add WebView to my project in order to add Banner Ads
this my code:
----------------------------------
Code:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// BannerPrapared();
// enable Cordova apps to be started in the background
Bundle extras = getIntent().getExtras();
if (extras != null && extras.getBoolean("cdvStartInBackground", false)) {
moveTaskToBack(true);
}
// Set by <content src="index.html" /> in config.xml
myWebView = (WebView) findViewById(R.id.webview);
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
WebView myWebView = (WebView) findViewById(R.id.webview);
BannerPrapared();
//
//
// myWebView.loadUrl(launchUrl);
myWebView.loadUrl("file:///android_asset/www/index.html");
----------------------------------------
The problem is that the game starts downloading and then celebrates
But when I put the link "https:// " of the game it works fine
I hope you get my idea
thanks
Last edited by a moderator: