-
-
Notifications
You must be signed in to change notification settings - Fork 106
Launching Wolvic
Wolvic supports the following launch parameters:
-
"url"
: the webpage to open- alternatively, this can be provided as the Intent's data URI
-
"background"
: if true, the URL will open in the background (default false) -
"create_new_window"
: if true, the URL will open in a new window (default false) -
"kiosk"
: if true, Wolvic will open in kiosk mode (default false)
The first way to open Wolvic from other apps or from the command line is to launch the main activity directly.
From the command line:
adb shell am start -a android.intent.action.MAIN com.igalia.wolvic/.VRBrowserActivity
A data URI can be added to open a particular website:
adb shell am start -a android.intent.action.MAIN -d "https://moonrider.xyz" com.igalia.wolvic/.VRBrowserActivity
This strategy works well for a single device, however it is not always portable across devices because Wolvic might be using different app IDs.
The second way to open Wolvic is to launch a VIEW
intent for a data URI that begins with wolvic://com.igalia.wolvic/
:
adb shell am start -a android.intent.action.VIEW -d "wolvic://com.igalia.wolvic/"
Additional arguments, including the target URL, can be added as parameters to that URI:
wolvic://com.igalia.wolvic/?url=moonrider.xyz
And the corresponding ADB command would be:
adb shell am start -a android.intent.action.VIEW -d "wolvic://com.igalia.wolvic/\?url=moonrider.xyz"
More than one parameter may be appended to the data URI, for example this command will open a particular webpage in kiosk mode:
adb shell am start -a android.intent.action.VIEW -d "wolvic://com.igalia.wolvic/\?kiosk=true\&url=moonrider.xyz"
Remember that URI parameters need to be escaped, so to open a complex URL like http://localhost:8080
we would need to use something like this:
adb shell am start -a android.intent.action.VIEW -d "wolvic://com.igalia.wolvic/\?url=http\:\/\/localhost\:8080"
Alternatively, we could use HTML escape codes to achieve the same effect:
adb shell am start -a android.intent.action.VIEW -d "wolvic://com.igalia.wolvic/?url=http%3A%2F%2Flocalhost%3A8080"