Androidのステータスバーに番号をテキストとして表示したい。アイコンを設定しましたが、動的な番号を設定したいです。それは可能ですか?
//Create the Notification
Notification notification = new Notification(android.R.drawable.stat_sys_warning, "Battery Indicator", System.currentTimeMillis());
//Create a PendingIntent to do something when the user clicks on the Notification
//Normally this would be something in your own app
Intent intent = new Intent();
intent.setClass(getApplicationContext(), BatteryIndicator.class);
PendingIntent pi = PendingIntent.getActivity(this, 0, intent, 0);
//Add the detail to the Notification
notification.setLatestEventInfo(getApplicationContext(),"Battery Indicator", "Charge level: " + batteryRemaining , pi);
//Display the Notification
NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(1, notification);