hi all i am developing a shopping cart application. i wants to show a cart icon with the number of items on it. the number will increase when user will add an order to cart. i want to use something like notification -- (in notification on status bar it is possible to show an icon with number on it.) . but in status bar position of icon is not application specific and it also popup a window when dragging it. for showing the thing in status bar code is as follows-- String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns); int icon = R.drawable.icon; CharSequence tickerText = "Hello"; long when = System.currentTimeMillis(); Notification notification = new Notification(icon, tickerText, when);
Context context = getApplicationContext(); CharSequence contentTitle = "My notification"; CharSequence contentText = "Hello World!"; Intent notificationIntent = new Intent(this, Animation123.class); PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); notification.number = 1;//number we want to show on icon final int HELLO_ID = 1; mNotificationManager.notify(HELLO_ID, notification); if it is possible to show the same thing at position other than status bar ? if yes please tell me how? thanks alok -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

