teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

3

logcatの追加

2019/02/09 01:43

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -194,4 +194,16 @@
194
194
  }
195
195
  }
196
196
  ```
197
+ ```logcat
198
+ 2019-02-09 10:40:20.272 604-617/system_process D/Sensors: batch handle 6, but there is no batch sensor in genymotion
199
+ 2019-02-09 10:40:20.279 604-827/system_process D/Sensors: batch handle 1, but there is no batch sensor in genymotion
200
+ 2019-02-09 10:40:20.282 604-649/system_process D/PressureSensor: pressure event 1013.000000
201
+ 2019-02-09 10:40:21.273 604-670/system_process W/WifiMode: WiredSSID, Invalid SupportedRates!!!
202
+ 2019-02-09 10:40:21.273 604-672/system_process W/WifiMode: WiredSSID, Invalid SupportedRates!!!
203
+ 2019-02-09 10:40:21.274 604-670/system_process W/WifiMode: WiredSSID, Invalid SupportedRates!!!
204
+ 2019-02-09 10:40:21.777 604-2123/system_process D/Sensors: batch handle 1, but there is no batch sensor in genymotion
205
+ 2019-02-09 10:41:43.460 604-618/system_process D/Sensors: batch handle 6, but there is no batch sensor in genymotion
206
+ 2019-02-09 10:41:43.470 604-649/system_process D/PressureSensor: pressure event 1013.000000
207
+
208
+ ```
197
209
  ![](a59f123de0abbdc6212c5ced33bfe9fd.png)

2

写真の追加

2019/02/09 01:43

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -193,4 +193,5 @@
193
193
  }
194
194
  }
195
195
  }
196
- ```
196
+ ```
197
+ ![](a59f123de0abbdc6212c5ced33bfe9fd.png)

1

追加しました

2019/02/09 01:35

投稿

退会済みユーザー
title CHANGED
@@ -1,1 +1,1 @@
1
- インターネットアプリが落ちる
1
+ 自作インターネットアプリが「停止しました」と表示されて起動できない
body CHANGED
@@ -1,15 +1,17 @@
1
- アプリが落ちるところが、分かりません。
2
1
  ご指摘お願いします。
3
2
  ```java
4
3
  package com.android.internetbrowser;
5
4
 
5
+ import android.app.AlertDialog;
6
6
  import android.app.DownloadManager;
7
+ import android.content.DialogInterface;
7
8
  import android.content.Intent;
8
9
  import android.net.Uri;
9
10
  import android.os.Environment;
10
11
  import android.support.v7.app.AppCompatActivity;
11
12
  import android.os.Bundle;
12
13
  import android.text.SpannableStringBuilder;
14
+ import android.util.Log;
13
15
  import android.view.KeyEvent;
14
16
  import android.view.View;
15
17
  import android.webkit.CookieManager;
@@ -120,7 +122,27 @@
120
122
  if (webView.canGoBack()) {
121
123
  webView.goBack();
122
124
  } else {
125
+ AlertDialog.Builder alertDialog=new AlertDialog.Builder(this);
123
126
 
127
+ // ダイアログの設定
128
+ alertDialog.setTitle("確認"); //タイトル設定
129
+ alertDialog.setMessage("終了しますか?"); //内容(メッセージ)設定
130
+
131
+ // OK(肯定的な)ボタンの設定
132
+ alertDialog.setPositiveButton("はい", new DialogInterface.OnClickListener() {
133
+ public void onClick(DialogInterface dialog, int which) {
134
+ finishAndRemoveTask();
135
+ }
136
+ });
137
+
138
+ alertDialog.setNeutralButton("いいえ", new DialogInterface.OnClickListener() {
139
+ public void onClick(DialogInterface dialog, int which) {
140
+ }
141
+ });
142
+
143
+
144
+ alertDialog.show();
145
+
124
146
  }
125
147
 
126
148
  return true;