質問編集履歴
3
logcatの追加
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
|

|
2
写真の追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -193,4 +193,5 @@
|
|
193
193
|
}
|
194
194
|
}
|
195
195
|
}
|
196
|
-
```
|
196
|
+
```
|
197
|
+

|
1
追加しました
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;
|