私はService
このようにプログラムしました:
public int onStartCommand(Intent intent, int flags, int startId) {
loadVariables();
webview = new WebView(this);
webview.loadUrl(url);
makeNotification = notificationMaker();
result = webview.findAll(part1) > 0;
if (result == true){
notification();
}
return super.onStartCommand(intent, flags, startId);
}
起動して文字列part1が見つかったかどうかを確認webview
して通知を出したいのですが、何もしません。
part1 と url は正しく読み込まれ、通知も機能します (トーストで印刷して確認しました) webview
。
それを XML ファイルで表示する必要はありますか? はいの場合、サービスでは機能しないと思いますよね?