Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Runtime Development

Reply
Highlighted
Contributor
Posts: 10
Registered: ‎03-15-2013
My Device: BlackBerry 10 Dev Alpha B
My Carrier: T-Mobile

Where can I see the notification title and contents??

[ Edited ]

Hi.. 

 

I have been trying to work out the Android runtime push notification.. Now, I have the push notification from BlackBerry push server and created new notification using the below code.

 

            NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context)

                    .setSmallIcon(R.drawable.icon_launcher).setContentTitle("My notification")

                    .setContentText("Hello World!");

            Intent resultIntent = new Intent(context, SigninActivity.class);

 

            TaskStackBuilder stackBuilder = TaskStackBuilder.create(context);

            stackBuilder.addNextIntent(resultIntent);

            PendingIntent resultPendingIntent = stackBuilder.getPendingIntent(0,

                    PendingIntent.FLAG_UPDATE_CURRENT);

            mBuilder.setContentIntent(resultPendingIntent);

            NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);

            mNotificationManager.notify(0, mBuilder.build());

 

I can see the red star icon on our app icon on home screen, but where could I see the title and contents?? On real Android device, we can see it on status bar on the top of screen. Is it everything indeed we can see??

 

Thanks..

 

K.