API overview

If you are a developer and have an app that uses sop links you may find useful the following information:

When starting soptohttp you can put extras in the intent. Bellow is a list with supported extras:

Name Type Default Description
stream_name (deprecated)
String null Show the stream name in status window.
show_local_address (deprecated)
boolean app setting Show the local url in status window.
show_memory (deprecated)
boolean app setting Show the memory usage in status window.
show_traffic (deprecated)
boolean app setting Show data traffic in status window.
com.devaward.soptohttp.EXTRA_SHOW_CLIENTS boolean app setting Show the number of clients connected to local address (video players).
show_counter (deprecated)
boolean app setting Show the auto-stop countdown in status window.
video_player_package (deprecated)
String system setting Open the stream with a specific video player.
The priority is: 1 App setting, 2 Intent extra, 3 System setting.
This was added in v.4.0
video_player_extras (deprecated)
Bundle null Intent extras that will be passed to the specified video player.
This was added in v.4.0
make_private (deprecated)
boolean false Hide the sop link and disables save button. The stream_name extra must be set for this to work. This should be used only in extreme cases like when you own the stream and you don't want it to become public. It should not be used for streams that can be found on the internet.
This was added in v.3.38

While soptohttp service is running it will broadcast events with its status.

To capture broadcast events use the IntentFilter "com.devaward.soptohttp.action.EVENT". The onReceive should not be CPU demanding because it will run multiple times while the stream is watched.
This was added in v.4.0

Name Type Description
com.devaward.soptohttp.EXTRA_STREAM_NAME String The sopcast stream url.
com.devaward.soptohttp.EXTRA_PORT int The port used in local address (
com.devaward.soptohttp.EXTRA_STATUS int Status of the streaming described in the next table..
com.devaward.soptohttp.EXTRA_BUFFER int Buffer of the streaming from -1 to 100, -1 means that there is no data yet.

Values for com.devaward.soptohttp.EXTRA_STATUS

Value Meaning Description
0 Service started. Sent once at the beginning when the service starts.
1 Connected to server. Sent once if the connection to sopcast server is successful.
2 Buffering. Sent once when buffering is started.
3 Quality level. Sent every time there is a change in the quality level. You can get the level from "stream_quality" (int) intent extra
4 Streaming started. Sent once after buffering is sufficient and the stream can be opened.
5 Client connected. Sent every time a client (video player) is connecting to the stream.
6 Client disconnected. Sent every time a client (video player) is disconnecting from the stream.
7 Stream is offline. Sent once if the stream is offline.
20 Streaming has ended. Sent once if the stream is no longer online. May be also sent if the connection to the internet is lost.
40 Server can't be accessed. Sent once if the sopcast server is unaccessible. May be offline or it may have changed its IP if it is called using the IP address.
99 Service stopped. Sent once at the end when the service is stopped.

To capture saving the stream with your Activity watch for com.devaward.soptohttp.action.SAVE by adding the following to the manifest.

        <action android:name="com.devaward.soptohttp.action.SAVE"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <data android:mimeType="text/plain"/>

The extras in intent are:

Name Type Description
com.devaward.soptohttp.EXTRA_STREAM_URL String The sopcast stream url.
com.devaward.soptohttp.EXTRA_STREAM_NAME String The stream name (Optional).

Please don't send bug reports about streams or servers being offline. This app and the developer have nothing in common with any stream or server regardless of their country.

Send all bug reports to e-mail . Please make sure to describe it in detail.
Thank you for your help!