Cast a website to TV from Android app - Chromecast; is it possible? - html

This is what I want to do.
Have a screen on my Android app with a few buttons on it. One of them would be the Chromecast icon, the other buttons would just be a few numbers most like (a "1" button, a "2" button, a "3" button etc).
When the cast button is hit, a default website is loaded (eg. www.example.com) on the TV. In the Android app, I still just see my buttons.
When a number his hit (ie. "1") the website changes, and www.example.com/parameter/1 is loaded for example.
I have been reading Google's documentation. If I understand correctly, I can create Android sender app code to do part 1 and 2. And a receiver application for part 3.
What I am confused about though is how I just get it to load a preexisting website. Surely I wouldn't need any custom HTML5 code for that? All I want to do is load a URL.
Could someone please advise me if what I want to do is possible, and if so point me in the right direction? Thanks

The default receiver only loads media URLs. Video, images, etc. If you want it to do anything else, like show a website, you need to create a custom receiver.
Luckily, that's rather easy, and they have some good samples on the Github account.
https://github.com/googlecast

Related

Upload multiple camera photos with html input

I have a web application with an upload form.
<input type="file" name="c_files[]" id="c_files" multiple="multiple" />
I can select and upload mutliple files from the gallery but can't make multiple photos from the camera app. Taking the photos first and then uploading them from the gallery is not a good way to go.
I'm using Google Chrome Version 92.0.4515.159 on Android 11.
Firefox for Android and Safari on iOS isn't working either.
Apparently I have to use javascript right or is their an exisiting work around?
There is no such thing as "Out of the Box" that will solve your problem or your scenario, and the truth is that not HTML have at least one way to get there.
But... we have javascript I can think of something that is not exactly what you are looking for but it would be the way to perform this feat:
detect that you are on a mobile device.
allow that if you are on a mobile device when you click on the file field, you directly invoke the camera APP and take multiple photos.
when returning to the form detect the event and make the programmatic trigger of the multiple input type file, but directly open the image gallery...
select multiple images to attach.
As you can see, this is a concept/solution based on the capabilities that we know the mobile environment and the javascript language have. regardless of HTML.
To achieve this you must get each point mentioned above to work.

Cast an entire webpage to tv?

I need to cast an entire webpage (which includes images, videos, iframes and carousels) to a chromecast enabled TV.
Once loaded, the webpage is auto scroll enabled and hence keeps showing few images, videos and iframes (think of it like a looped slideshow).
I know there's an option in the chrome browser itself to cast a tab/entire desktop, but it would require my laptop/computer screen to be open all the time.
I also came across chromecast for web app docs: https://developers.google.com/cast/docs/chrome_sender/integrate , but as far as I can figure out, it will help only to cast videos but not iframes/carousels embedded in my website.
Any suggestions how to achieve this? The requirement is to show an advertisement kind of data to the TV in every 3 hours. All this cannot be automated fully I guess?
Yes, you can do this. You just need to create a custom receiver app, which is basically just an HTML page that implements the cast receiver framework javascript. https://developers.google.com/cast/docs/caf_receiver/basic

Does the latest Instagram iOS app support caption in URL scheme?

Formerly it was possible in iOS to use the hook instagram://camera?caption=YourCaptionHere (from Mobile Safari, or elsewhere) to have the Instagram app open in camera mode with a pre-filled caption. However, that no longer seems to be the case as my previously working URL (hook) no longer populates a caption (though it does still open Instagram in camera mode).
I'm having trouble finding any current information on this, though the caption query string variable seems to have never been documented in the first place.
Does anyone know if this feature is still available under a different query string variable?
To be more clear, I have a link on a web page that attempts to open Instagram in camera mode with a caption. I have a JavaScript click event that checks after 500ms to see if the page is still open, then alerts the user to download the app if the link didn't work:
Open Instagram
Instagram provides documentation on iOS hooks. That documentation does not make any mention of a caption parameter, except sharing a photo via Obj-C (in which they call it annotation). Given the different naming, you could try instagram://camera?annotation=YourCaptionHere and it might even work, but this doesn't seem to be an officially-supported use case.
Further, to support your second paragraph, searching through the history of the docs on the wayback machine doesn't turn up any mention that caption was ever a supported argument... like you said. Interestingly, one of their co-founders claimed this was available 2 years ago... I guess they never made it official, then removed it?

Can I run different versions of my website based on detection of mode

I would like to create one website. This website will have behave differently if I am viewing it at a specific event via a kiosk. The kiosk, will just be an iPad. I believe I can figure out how to lock down the iPad to act like a kiosk and just show my website based on this http://www.webascender.com/Blog/ID/447/How-to-Setup-Kiosk-Mode-Lock-Your-iPad-to-Just-One-App#.U9Fx3oBdVX4
But what I am asking is, in code, is there a way to detect that I am in 'kiosk' mode and show different pages? For example, if you are at home(or anywhere that is NOT the event) you should be able to hit my website to find out all about my company and to view your existing profile. You should be able to see these same pages on the 'kiosk'(the iPad while at an event) but you will now see additional pages such as pages dealing with the specific event and payment pages. Vice-versa you might be able to see additional pages on the website while at home that you will not see while in 'kiosk' mode.
I do not know if the solution is tools/language dependent as we have not settled yet on all tools/languages/frameworks we will be using to build the site and so I am open to all but we will definitely have some javascript/css/html.
I believe you will need to write a native app in order to detect whether you are in 'guided access' aka 'kiosk' mode.
Taken from Detect or react to Guided Access?
NSLog(#"Accessabilitiy enabled: %#", UIAccessibilityIsGuidedAccessEnabled() ? #"YES" : #"NO");
if (!UIAccessibilityIsGuidedAccessEnabled()) {
// show something since I'm not in guided access
}
If you want to know when it changes...
[[NSNotificationCenter defaultCenter] addObserver:self selector:#selector(guidedAccessChanged) name:UIAccessibilityGuidedAccessStatusDidChangeNotification object:nil];
- (void)guidedAccessChanged
{
// do something when guided access changes
}
If you must work with a website then what you can do is write a native app that embeds a UIWebView. This class allows you to show websites within a native app. So, what you could do with this method is pass along the guided access setting to your website so that it can adjust itself accordingly.
If you know the IP address you can direct views using PHP (and probably a host of other programs). Or you can lock the iPad to only open a specific URL (http://mysubdomain.mydomain.com) and only have pages that you want viewed by the kiosk. I'm sure there are a mess of other ways too.

Adding a interactive gui to my VB.net application

OK. So first, I will try my best to explain so good. My friend has gotten cursed out on this forum for not explaining, so I will explain. :)
Ok so I have my program built and all. But then it hit me! Wouldn't it be better to add a news feature? One teeny tiny problem? I cant? How would I implement a interactive code into an HTML page.
Like can i connect a button to a URL that will make the program do something. Almost like you can open cydia tweaks with there identifier and url EXAMPLE: http://handleopenurl.com/scheme/cydia And then i can add urls so i can update the program, without updating the files.
Or even just a featured news thing would be nice. But how would i implement this perfectly. I tryed a webrowser, but the page is too big for it. I am good at html, not much at css, i mostly use Adobe Muse http://www.adobe.com/Muse
Last question. Kinda defies the first thing i said about having my program finished.
Is there a way i can add a plus button and make it add more buttons and more labels and all?
This would help with allowing users to customize more then what the program can handle. By The Way, its a winter board Theme Maker. So I have a bunch of icons with there bundle identifiers and I create the folders with VB.net and all that stuff. But i want users to be able to click a plus button to add MORE text boxes and file browsers.
Any ideas? Maybe DIM 1 as NewFileBrowser? But i need to move all the buttons and i need it to be able to be clicked an infinity amount of times. I can do the coding for all of these buttons, but i jest need to know how to create them <1 Move them and the button so that the button goes further down each time, and more boxes will go further down. Much help apreciated. THANKS:)
EDIT:
Are you trying to say that you're wondering how to have a web browser control in a vb.net >app, which displays a web page, and when a button is clicked on the page, your app detects >it and does something? – Thraka
That sums up the top part. I am using windows forms, and it is coded in VB.net
If you get the object you want, like the button, you can hook the event and have it call code in your form.
Find the object using the Browser.Document.GetElementById method.
With that object, add an event handler to the Click event.
See http://msdn.microsoft.com/en-us/library/system.windows.forms.htmlelementeventhandler(v=vs.110).aspx for information about the event handler used