Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- seekbar.setOnSeekBarChangeListener(new OnSeekBarChangeListener()
- {
- @Override
- public void onProgressChanged(SeekBar arg0, int arg1, boolean arg2)
- {
- Log.i("SEEKTIME", "time:" + arg1);
- upnpService.getControlPoint().execute(new Seek(service, SeekMode.REL_TIME, arg0.toString())
- {
- @Override
- public void success(ActionInvocation invocation)
- {
- //super.success(invocation);
- Log.i("SEEKSUCCESS", "success seek");
- }
- @Override
- public void failure(ActionInvocation arg0, UpnpResponse arg1, String arg2)
- {
- Log.i("SEEKFAIL", "fail seek");
- }
- });
- }
- <?xml version="1.0" encoding="utf-8" standalone="yes"?>
- <root xmlns="urn:schemas-upnp-org:device-1-0">
- <specVersion>
- <major>1</major>
- <minor>0</minor>
- </specVersion>
- <device>
- <deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType>
- <UDN>uuid:2797d98f-173f-fe46-0000-00002d731080</UDN>
- <friendlyName>BubbleUPnP (Nexus One)</friendlyName>
- <manufacturer>Bubblesoft</manufacturer>
- <manufacturerURL>http://forum.xda-developers.com/showthread.php?t=1118891
- </manufacturerURL>
- <modelDescription>BubbleUPnP Media Renderer</modelDescription>
- <modelName>BubbleUPnP Media Renderer</modelName>
- <modelNumber>1.4.3.1</modelNumber>
- <modelURL />
- <iconList>
- <icon>
- <mimetype>image/png</mimetype>
- <width>72</width>
- <height>72</height>
- <depth>32</depth>
- <url>/dev/2797d98f-173f-fe46-0000-00002d731080/icon.png</url>
- </icon>
- </iconList>
- <serviceList>
- <service>
- <serviceType>urn:schemas-upnp-org:service:AVTransport:1
- </serviceType>
- <serviceId>urn:upnp-org:serviceId:AVTransport</serviceId>
- <controlURL>/dev/2797d98f-173f-fe46-0000-00002d731080/svc/upnp-org/AVTransport/action
- </controlURL>
- <eventSubURL>/dev/2797d98f-173f-fe46-0000-00002d731080/svc/upnp-org/AVTransport/event
- </eventSubURL>
- <SCPDURL>/dev/2797d98f-173f-fe46-0000-00002d731080/svc/upnp-org/AVTransport/desc.xml
- </SCPDURL>
- </service>
- <service>
- <serviceType>urn:schemas-upnp-org:service:RenderingControl:1
- </serviceType>
- <serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>
- <controlURL>/dev/2797d98f-173f-fe46-0000-00002d731080/svc/upnp-org/RenderingControl/action
- </controlURL>
- <eventSubURL>/dev/2797d98f-173f-fe46-0000-00002d731080/svc/upnp-org/RenderingControl/event
- </eventSubURL>
- <SCPDURL>/dev/2797d98f-173f-fe46-0000-00002d731080/svc/upnp-org/RenderingControl/desc.xml
- </SCPDURL>
- </service>
- <service>
- <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1
- </serviceType>
- <serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
- <controlURL>/dev/2797d98f-173f-fe46-0000-00002d731080/svc/upnp-org/ConnectionManager/action
- </controlURL>
- <eventSubURL>/dev/2797d98f-173f-fe46-0000-00002d731080/svc/upnp-org/ConnectionManager/event
- </eventSubURL>
- <SCPDURL>/dev/2797d98f-173f-fe46-0000-00002d731080/svc/upnp-org/ConnectionManager/desc.xml
- </SCPDURL>
- </service>
- </serviceList>
- </device>
- Bundle localBundle = paramIntent.getExtras();
- String str1 = localBundle.getString("TrackDuration");
- String str2 = localBundle.getString("RelTime");
- int i = com.techd.tvapp.util.Utils.getRealTime(str1);
- int j = Utils.getRealTime(str2);
- mSeekBar.setMax(i);
- mSeekBar.setProgress(j);
- mTotalTime.setText(str1);
- mCurrentTime.setText(str2);
- class PlaySeekBarListener implements SeekBar.OnSeekBarChangeListener {
- PlaySeekBarListener() {
- }
- public void onProgressChanged(SeekBar paramSeekBar, int paramInt,
- boolean paramBoolean) {
- }
- public void onStartTrackingTouch(SeekBar paramSeekBar) {
- // isUpdatePlaySeek = false;
- }
- public void onStopTrackingTouch(SeekBar paramSeekBar) {
- if (null != dmcControl) {
- String str = com.techd.tvapp.util.Utils.secToTime(paramSeekBar.getProgress());
- Log.i("DMC", "SeekBar time:" + str);
- dmcControl.seekBarPosition(str);
- }
- }
- }
- mSeekBar = (SeekBar) findViewById(R.id.media_seekBar);
- mSeekBar.setOnSeekBarChangeListener(new PlaySeekBarListener());
Add Comment
Please, Sign In to add comment