3
I want to clear an application to open Urls that redirect to the Play Store and I want you to just load the direct URL in the notification without Bir any layout, and appear in the android intent filter, Ex: (Complete this action using: Chrome, Browser, Redirect Browser). But I don’t know how to do it. I started creating the code:
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
public void alerta (View v) {
Notification.Builder notification = new Notification.Builder(this);
notification.setContentTitle("Carregando página da Web...");
notification.setContentText("A Play Store se abrira ao concluir");
notification.setSmallIcon((R.drawable.ic_launcherrb));
notification.setSound(Uri.parse("/system/media/audio/notifications/Argon.ogg"));
notification.build();
NotificationManager nm = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
int NOTIFICATION_ID = 0;
nm.notify(NOTIFICATION_ID, notification.build());
}}
Can someone help me??