Why does my Google Cast sender not find my receiver? - javascript

I have an existing Google Cast app. It's been quite a while since I've touched it because it's been working just fine, but now I want to add some features to it so I'm digging back in.
I've created a second Google Cast app in the Google Cast SDK Developer Console (https://cast.google.com/u/0/publish/#/applications) so I can do some testing without interrupting people using the existing app. This new one has basically all the same settings: it's a Custom Receiver and it points to a URL -- very simple. The only difference is that the new URL is my test server instead of our production server. It's published.
When I run my sender in my test environment and leave the app ID as the existing app, everything works fine. Chrome prompts me to chose a destination device and my Chromecast shows up in there.
Now when I change the app ID in sender code to the new app ID, Chrome says
No cast destinations found.
I change it back to the original app ID and it finds my Chromecast again no problem.
So, I assume that behind the scenes something is wrong with the configuration of my new app ID but I don't know how to figure out what's wrong. Additionally, I can watch the logging on the test server and I can see that nothing is hitting my server, so I don't believe Google is making a request to my new URL.
I'm just not really sure where to start to try to figure out whats going on.

Double check the serial number you entered in the Google Cast Developer console. It is very easy to get the number wrong. Also, restart your cast device to force it to sync with the servers that track the developer device registrations.

Related

Confusing when publish my React Native Application to google play

After android application expo building done and got APK/BUNDLE file ready to publish and access to google console and begin to fill all the forms stages one by one but when i got finish i face the open & closed & internal tests, for the first moment i didn't understand what these tests for.
After reading all the instructions i understad that somebody have to test my application, but who?
I saw that each one (open, closed, internal test) gives me a url.
i think this url is my application in google play but not for public just to give testers access to check my app.
Noteworthy the app got a temporary name.
I have give myself as a tester and app got installed by google play url ( talked above) on my phone, everything works fine but i dont know how to give pass to the tests.
thank you
After testing my app, every thing work very well, but still writen beside by app on the dashboard it is a draft and still writen not checked ?????
i get lost, what to do ?? maybe to wait for google testers ?? or maybe i forget something.??
please help....!!!!!!!
Open & closed & internal just for testing your app before it is available to all users. Testers can test your app if any bug happens while testing you have to upload a new app with resolved bugs. And if anything goes right you can directly upload it to production.
Draft in dashboard that means you have upload apk and doesn't rollout it to production.

Force one tab only on web app (e.g. similar to WhatsApp and Google Messenger)

I have a strict requirement to only allow a logged in user to open my web app in one tab. I've noticed that WhatsApp and Google Messenger's web apps have implemented this. For example, trying to open those apps in more than one tab (be it on the same browser, different browser, or even different device) results in these warnings:
Anyone know how this is done? There must be some sort of sync happening between the server and the client to ensure that only one tab is open. But this would require a unique tab identifier, which can get quite complicated to build reliably. Anyone know how WhatsApp and Google Messenger are doing it? Their technique seems to work flawlessly.
I don't know exactly how this is done at WhatsApp and Google Messenger, but if you work with WebSockets (your post hast the tag "websocket", so I assume, you do) every tab has its single connection to the server, and if your users need to be logged in you could check if the user has already a open weboscket connection to your server.

Java Applets - Application/Publisher Show 'Unknown' for Signed Applet On Javascript->Java Calls

Our product is running into an issue specific to Java 8. Java 6/7 runs fine.
We have a package of Java applets that multiple customers use, so the domain this package is deployed to is always different. The package is properly signed with the certificate from Verisign.
When the end user launches a page in the browser, the expected dialog with our application name and publisher appears, and asks the end user to accept the security warning. The end user accepts and clicks 'Do not ask again' and the page runs fine.
The trouble starts with pages that make Javascript calls into the Java applets. The behavior appears to be random. New security popups appear, asking the end user to accept the certificate again. My understanding is that once the user selects the certificate initially, this should not happen again. Yet it does.
Then also sometimes the popup appears with the application name and publisher set to UNKNOWN. There does not seem to be any reason for this, the applet package is confirmed to be signed correctly and with a valid certificate from Verisign. Yet, it occurs.
I recognize the initial popup is unavoidable but all of these downstream popups, especially those where the application/publisher are UNKNOWN don't make sense to me, and I'm not sure how to debug this further. The java console trace logs do not clearly show any more details.
Any ideas? Please feel free to ask me more detail if there is something here unclear.

Ionic/Angular Android app crash with Barcode Scanner

I've started writing a basic app so I can scan barcodes and email them out to people. It's using latest version of Ionic and the barcode scanner (GitHub).
Scanning works and I can display the list of scanned results. I'm currently using HTML local storage via a service/factory but I ran into this same issue using ngCordova/sqlite. If I scan a new barcode and then open the modal so as to change an attribute (which works) upon closing the modal the app crashes after a few moments. The change does get written to storage, as upon re-opening what I changed is present.
It appears to only crash when I do this for the first time for each object. If I start the application back up and change it to something else I don't get a crash. I can't for the life of me figure out what's causing the crash (I've re-written it in case I messed up along the way) and the I can't find anything in the logcat results (wasn't sure what to post).
What's worse, if I remove the scanning function and just enter something directly into storage so I can test in a web browser, things don't crash in a web browser or on Android. It appears something between the Barcode Scanner and the modal or local storage doesn't get along. I've tried this using routes and same result.
Relevant code samples are at http://git.io/vm4W7
P.S. I don't have iOS developer account or device so couldn't test if it Android or iOS specific.
EDIT: Using adb logcat | grep -i "console" with my device plugged into the only errors I get are below
I/chromium(29216): [INFO:CONSOLE(173)] "No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin.", source: file:///android_asset/www/plugins/cordova-plugin-console/www/console-via-logger.js (173)
D/PluginManager(29216): exec() call to unknown plugin: Console
I/chromium(29216): [INFO:CONSOLE(173)] "No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin.", source: file:///android_asset/www/plugins/cordova-plugin-console/www/console-via-logger.js (173)
D/PluginManager(29216): exec() call to unknown plugin: Console
EDIT 2: GapDebug shows same messages on crash, with nothing more informative.

How might I send messages (strings) from a Win32 app to a Javascript program running in an existing IE window?

I have a system tray icon that receives incoming phone calls. When a call comes in, I want to send the phone number into a web app that does stuff on that phone number. We can launch the web app with the phone number in a query string, but if I launch a new window for every call, it will junk up the user's computer with lots of browser instances, would not preserve the location/size the user moved the browser window to, and would take longer than just refreshing the page. Instead, I'd like to make the Win32 app re-use the same IE browser window and just send the web app the new phone number every time a new call comes in. I'm envisioning somehow sending a Windows message, or somehow instructing the IE browser to run a certain javascript event with some data? I can see why doing the reverse (javascript out to Win32) would be a security issue, but this would be just sending a message from Win32 to javascript.
So I'm specifically NOT asking how to do what's been answered in this question: How to Interact Between Web App and Windows Form Application
That user was asking how to launch a Win32 app from Javascript and pass data to the win32 app. Roughly, I need to do the opposite. I need to send data from a Win32 app into a running javascript program.
Note also that I'm not asking how to launch one IE window with arguments to Javascript one time; I can easily do that with query strings. What I'm asking is how can I / is it possible to pass data from a running Win32 app outside the browser to a running Javascript app inside a browser window.
Since you can send the phone number to the site through a querystring, all you really need to do is tell IE to navigate to a URL of your choosing.
To that end, you can use what is in this KB article to help you find the instance of IE you want to connect to.
http://support.microsoft.com/kb/299356/de
Granted, its in Visual J++ of all things, but since you are interacting through COM Automation, the calls should be easy to translate.
Once you have the instance of IE (in the form of an IWebBrowser2 interface implementation) you can simply call the Navigate or Navigate2 method with the URL you need (with the phone number in the query string of course).
You should be able to find the handle of the IE window, and then send messages (keypresses perhaps) to it. Use a bit of javascript to capture all keypress activity and you have a very simple method to transfer information.
It won't be easy (the devil is in the details - issues of focus, etc) but it should be possible.
-Adam
What you need is a way to How To Connect to a Running Instance of Internet Explorer
(caveat: this one is in Java, but you should be able to translate it to C# quite easy).
Or you could enumerate the top-level windows to find a particular instance of IE and then Get IHTMLDocument2 from a HWND (this one is in C++, so you might need to do some Win32 interop; you can find all necessary declarations on PInvoke.net).
If you search on your friendly local search engine for How to connect to a running instance of Internet Explorer, you will find a lot more info.
Once you get to the document, you can either invoke the JavaScript function through the document scripting interface, or you can just navigate it to your page and pass the phone number as a parameter.
you could possibly get around the security and other issues with this method by using a web service on the web server, and have the win32 app update the web service and have the web page poll the same web service every however many seconds. Then you the the option of mapping that number to a database and getting additional information.
The only draw back is that instead of being immediate, there is a delay to get the information displayed in the browser.
How about you write an active-x control that you create in the browser using Javascript. This is effectively an Explorer browser plugin. Same idea for Mozilla, etc., except they use a different plug-in structure. This lets you support other browsers in the future.
The control can talk to your win32 app using a pipe or a socket or whatever type of inter-process communications and is then accessible as a Javascript object.

Categories

Resources