Android:How create ongoing notification with progress bar? -


i using service in order play background music, , want create on going notification progress bar ,on status bar, in order user can watch progress of current track. can me? thank ...

create custom notification , put in notification_layout.xml file:

<progressbar      android:layout_width="fill_parent"     android:layout_height="15dp"     android:id="@+id/notificationloadingbar"     android:progressdrawable="@android:drawable/progress_horizontal"     android:indeterminate="false"      android:indeterminateonly="false" /> 

keep reference notification (make global) , set progress using remoteview's api.

sample code:

mnotification.contentview.setprogressbar(r.id.notificationloadingbar,     max, progress, false); 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -