Remote View

Action: 
org.openintents.remote.intent.action.VIEW
Intent Extra: 
Remote Host

Simulates an android.intent.action.VIEW intent on a remote machine.

Although the remote machine may not be running Android, it may be controlled remotely by an Android application. For example, an Android application for controlling a media center may instruct the media center to open a file that is stored locally on the media center. The data URI would be interpreted relative to the remote machine. For example, a file:// URI would always refer to a file on the media center, not a file on the SD card of the device controlling the media center.

An example of an application that would invoke this type of intent is a remote download manager. The download manager knows the file:// URI of the remote file and the hostname of the remote server, but does not know how to open the file remotely. The remote download manager can use this intent to see if any other applications installed on the device are able to open the file on the remote server.

Complete example:

Intent intent = new Intent("org.openintents.remote.intent.action.VIEW");
intent.setDataAndType(Uri.parse("file:///home/user/video.mp4"), "video/mp4");
intent.putExtra("org.openintents.remote.intent.extra.HOST", "mediacenter");
startActivity(intent);

Comments

Assignment Writing |

Thesis | Essay | Custom