lundi 25 mai 2015

getBroadcast and getService of PendingIntent

Can request codes of requestCode the same for getBroadcast and getService? For instance,

Intent intent = new Intent(INTENT_FILTER);
        PendingIntent sender = PendingIntent.getBroadcast(ctx, requestCode, intent, PendingIntent.FLAG_CANCEL_CURRENT);
        am.cancel(sender);
        sender.cancel();

        Intent intentS = new Intent(ctx, MyService.class);
        PendingIntent senderS = PendingIntent.getService(ctx, requestCode, intentS, PendingIntent.FLAG_CANCEL_CURRENT);

am.cancel(senderS);
        senderS.cancel();

Aucun commentaire:

Enregistrer un commentaire