I am building the notification progress bar in Service in such a way that is given below :
private NotificationManager mNotifyManager;
private NotificationCo
Create .xml file with below code:
Where wheel0 to 5 are the images of the wheel. Make sure all images are in your drawable folder.
User below snippet into your code to animate icon:
Notification notification = new Notification(R.drawable.wheelAnim, null, System.currentTimeMillis());
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, new Intent(), 0);
notification.flags |= Notification.FLAG_AUTO_CANCEL;
notification.setLatestEventInfo(this, getText(R.string.someTitle),getText(R.string.someText), pendingIntent);
((NotificationManager) getSystemService(NOTIFICATION_SERVICE)).notify(uid, notification);
Ref link