Intent link for opening TinyCam to a specific camera, as ONVIF

So I have figured out how to set up a link to take you to an ONVIF camera set up in TinyCam. This will work from a Dashboard in Fully Kiosk Browser. It should probably work from other browsers, too, in Android v6 and higher.

Previously, I'd used an RTSP link to open the video, which could be opened with TinyCam, or with another app like VLC, or directly in Fully Kiosk Browser with that option selected. That worked pretty well, but if I wanted to open a camera and then give it a command to point to a different direction or zoom, that didn't work. RTSP feeds didn't allow commands the way adding something with ONVIF, or another interface, does.

So I set up TinyCam on my dashboard tablets, then added each camera, typically using the ONVIF protocol. Every camera was named the same way on each tablet I have (three total). So I found that I could place a link on the tablet, which would open directly to that specific camera.

So first, I created a link on my home page that pointed to a specific camera using the TinyCam app. Then I downloaded the database used by the launcher to read it. I took a look at the intent: link used by that shortcut by getting the database and reading it with DB Browser for SQLite, and I found that the link was for something like:

#Intent;launchFlags=0x34000000;component=com.alexvas.dvr.pro/.activity.LiveViewActivity;i.com.alexvas.dvr.intent.extra.CAMERA_ID=606609356;S.com.alexvas.dvr.intent.extra.TAG_NAME=*;end

I put that into a link tile positioned above my MJPEG feed on my tablet (with intent: in front). Well, that helped a little, but each tablet had a different CAMERA_ID value, so it didn't work for all of them. However, I did find this info from a web search on setting up an intent link for TinyCam:

Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setComponent(new ComponentName("com.alexvas.dvr.pro","com.alexvas.dvr.activity.LiveViewActivity"));
intent.putExtra("com.alexvas.dvr.intent.extra.shortcut.NAME", "My camera name");
startActivity(intent);

Well with that info, I managed to put together a new intent link like the following:

intent:#Intent;launchFlags=0x34000000;component=com.alexvas.dvr.pro/com.alexvas.dvr.activity.LiveViewActivity;S.com.alexvas.dvr.intent.extra.shortcut.NAME=Driveway;end

And now, that will open up the 'Driveway' feed on all of my tablets! And this way, I can change PTZ on my cameras that allow that, directly from the dashboard. There's a setting in Fully Kiosk Browser (Open URL Schemes in Other Apps) to allow intent links, and as long as that's enabled everything works great.

Just paste a link like that last one, with your camera NAME (whatever it's called in Manage Cameras), into the link tile. My links all have ' ' as the display text, and it's positioned above the MJPEG feed on my dashboard, so tapping the feed opens TinyCam to that camera. My background color is set to 100% transparent for link tiles, so it doesn't show up on the dashboard.

The only thing to be worried about, is whether you have the TinyCam Pro version or the Free version. If it's pro, you have to use component=com.alexvas.dvr.pro/ but if you use the free version, use component=com.alexvas.dvr/ in the link.

1 Like

I just realized that this didn't work correctly on my Android 10 phone.

However, I managed to get the link to work, after adding the following action like this:

intent:#Intent;launchFlags=0x34000000;action=android.intent.action.MAIN;component=com.alexvas.dvr/com.alexvas.dvr.activity.LiveViewActivity;S.com.alexvas.dvr.intent.extra.shortcut.NAME=Driveway;end

Not sure what was happening with my phone, but now it seems to work OK there, also.

1 Like

Thank you for sharing this. I've found it very helpful.