0
내 응용 프로그램에서 webview를 팽창 시키려고합니다.클릭 webview inflated crash
03-31 09:39:14.278: W/System.err(1825): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://details?id=air.com.goodgamestudios.empirefourkingdoms&referrer=mat_click_id=c5e82ec15ac735af3b-20140331-4066 }
당신이 날 도와 줄 수 : 응용 프로그램이
viewGroup = (ViewGroup)activity.findViewById(android.R.id.content);
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
final TextView textViewCompteur ;
ImageView ic_close ;
final View inflater = activity.getLayoutInflater().inflate(R.layout.interstitial_ads, null, true);
webView = (WebView)inflater.findViewById(R.id.webViewSplashAds);
ic_close = (ImageView)inflater.findViewById(R.id.imageViewCloseSplashAds);
textViewCompteur = (TextView)inflater.findViewById(R.id.textViewSplashAds);
webView.setWebChromeClient(new WebChromeClient());
webView.getSettings().setJavaScriptEnabled(true);
webView.setClickable(true);
webView.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT));
AppehourTools.disableAdsScroll(webView);
// icone de fermeture
ic_close.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
viewGroup.removeView(inflater);
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
showBar();
}
});
webView.setBackgroundColor(Color.BLACK);
webView.loadData("<html><head><style type=\"text/css\">body{margin:0 auto;text-align:center;}</style></head><body>"
+ array.get(0).getUrl()
+ "</body></html>", "text/html", "utf8");
Log.d("AppehourInterstitialAds", "showing ad");
hideBar();
webView.setWebViewClient(new WebViewClient() {
public void onPageFinished(WebView view, String url) {
int delayClose;
delayClose = Integer.valueOf(array.get(0).getValidDelay());
viewGroup.addView(inflater);
new CountDownTimer(delayClose * 1000, 1000) {
public void onTick(long millisUntilFinished) {
textViewCompteur.setText(millisUntilFinished/1000
+ " "
+ context.getString(R.string.seconds_remaining));
}
public void onFinish() {
viewGroup.removeView(inflater);
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
showBar();
}
}.start();
}
public boolean shouldOverrideUrlLoading(WebView view, String url) {
hideBar();
viewGroup.removeView(inflater);
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
//i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
activity.startActivity(i);
return super.shouldOverrideUrlLoading(view, url);
}
});
}
그리고 오류를 충돌한다 웹보기 부하에 마무리하고 그 이후 : 난 브라우저 시작하지만 응용 프로그램 충돌을 클릭하면? 고맙습니다
해당 URL에 설치된 시장 애플리케이션이 필요합니다. – Blackbelt