0
に通知にURLを渡しビーコンが検出されたときに、この方法は、通知を作成します。私は、Android Studioで書かれた次のメソッドを持っているのAndriod
public void showNotification(Beacon beacon) {
Resources r = getResources();
int random = (int) System.currentTimeMillis();
Notification notification = new NotificationCompat.Builder(this)
.setSmallIcon(android.R.drawable.ic_popup_reminder)
.setContentTitle("You have reached area:")
.setContentText(retrieveLocation(beacon.get()))
.setPriority(Notification.PRIORITY_MAX)
.setVibrate(new long[0])
.setAutoCancel(true)
.setLights(0xff00ff00, 300, 100)
.build();
NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
notificationManager.notify(random, notification);
}
を今、私は、この中にWebリンクを含めますお知らせ。私はオンラインでいくつかのリサーチを行い、コンテキストクラスを作成する必要があることを理解しています。しかし、私はこのメソッドにリンクをどのように渡すことができるかに関して、今でも本当に混乱しています。私は非常にjavaに新しいですので、どんな助けも大歓迎です。