RemoteViewクラスのsetImageViewUri(int viewId, Uri uri) では、できないのでメモ。 Glide 4.1.1 を使用しました。 //☆まずはNotificationを作る ========================================= //NotificationManagerを取得 NotificationManager manager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); //Intentを生成 Intent intent = new Intent(context, HomeActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
NotificationCompat.Builderは端末のPush通知を送る事ができる機能です。 setLargeIcon(Bitmap bitmap)というメソッドがあるのでそれを使って実装します。 AsyncTaskを使って画像URLをHTTPで取得し、 NotificationCompat.BuilderでBitmapを設定したPush通知を送信するクラスを書きます。 class SendNotificationBuilder extends AsyncTask<String, Void, Bitmap> { private String title; private String message; private String imageUrl; private Intent intent; public SendNotificationBuilder(Context conte
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く