How can I force chrome to get the geolocation from GPS module connected to a USB port instead of getting it from router IP? - google-chrome

I'm working on a certain project that uses RasberryPi debian 7 google chrome to open get some work done, the thing is, the server (I made it with django) asks the rasberry pi about its location.
RasberryPi's google chrome gets the location from the wifi IP location service.
How can I change it to get the location from a GPS module I connected to RasberryPi USB port?
I configured the GPS module and it's ready the location well and everythin works fine, now I only need to force chrome to get its location from that GPS module.

I do not have RasberryPi but this way works in Android: Start a native GPS app alongside Chrome, and Chrome will use the GPS positions that have already been produced for the native app.

Related

chrome.enterprise.deviceAttributes availability for force-installed PWAs in chrome enterprise

I'm trying to determine if I can access any browser api for chrome OS that will allow me to identify the device that its running on when the application has been force-installed in kiosk mode as a PWA.
We're running into exactly the same issue right now. The correct path seems to be to create a PWA and to connect it to a (pre-installed) extension that has access to the enterprise.deviceAttributes:
See https://developers.chrome.com/apps/migration:
"If there is a capability that your Chrome App has that the regular web platform can't provide, it might be available as an extension API. In this case, you use a progressive web app together with an externally connectable extension your web app can send messages to."
enterprise.deviceAttributes are only accessible if the calling App/Site is pre-installed to the device and not loaded dynamically, so it cannot run in the PWA by design.
But with this tutorial, it seems possible:
https://developer.chrome.com/extensions/messaging#external-webpage
We're looking into that right now and will post our progess here.

React-Native - can't fetch from connected Android device to localhost endpoint

Im pretty new to React Native and im trying to make an application.
I have a JSON post request that works on Postman and on Expo when i run it on web browser (with http://127.0.0.1:8080). But when i try to run it on an attached Android device my app doesn't actually fetch the data.
As far as i can tell there is some problem with the connection between my phone and my computer. But i can't seem to find it.
Extra info:
- both devices are connected to my internet
- calls to the firebase API work just fine
- changing the "http://localhost:8080/route" with my computers IPv4 address or 10.0.2.2:8080 doesnt work
First try this
- For android: run the following command in terminal and try again
adb reverse tcp:8081 tcp:8081
If it doesn't work try this
Shake device(android)
Select dev settings and click "Debug server host & port for device"
Under debugging type local ip address and port number. (Ex: http://127.0.0.1:8080)

how to allow microphone for local ip in chrome

I am hosting my page inside the sdcard of arduino, I have implemented web speech api feature in that, however when I test my site using 127.0.0.1/project-X , everything works perfect, but when I use 192.168.1.4(which is same machine) or 192.168.1.10 (which is other laptop having WAMP) Chrome does not allow the microphone? I have also tried to start Chrome using different flags found on Google but none of them worked. What to do? I just want Chrome to allow using microphone from local ip also!
Chrome now allows Microphone access over secured Http only. You can very easily create your own signed SSL certificate and use that to host your page via Https.In tomcat server.xml you just have to un-comment the ssl connector and point to the location of your certificate.

Geolocation not working on Chrome even from a host server

I was working on a html5 file which uses geolocation. It was working fine in Chrome version 38.0.2125.111m from both loading the file locally and from a host server. Now, Chrome does not work for geolocation from either resource. I understand the security issue when running the file locally, but it still happens from any website that is running geolocation. I get the error message of "geocode service failed". BUT runs fine from both resources using Firefox. I have a windows 7 x64 laptop. The code that I am using is right off of Google geolocation example...
I've also went to the chrome's privacy-security-location settings and checked to use allow all sites to check location and still the problem continues... Help!
I think I found a clue. I copied the geolocaton file to another website and ran fine using the same chrome version which makes me believe that it is the google api keys that was causing the problem. I deleted the keys for both local and web host and will see in a few days if indeed this was the case. If it is, then I suggest not to establish api keys during development until app is ready for production.

How to use Android mobile as Remote control for wifi enabled raspberry pi car , without using any access point/wifi router

i want to connect my android mobile with raspberry pi so that i can send some data from pi to mobile through UDP sockets and vice versa. This is because i want to use android screen as remote control , some rPI data display and live video view of pi camera output from android web browser. i am interested to use wifi connection but without using any access point/wireless router in between i.e i want to create a peer to peer wifi adhoc network. in home with access network this will work , but its not possible to have wireless network or carry wireless router where ever the pi go.
for prototyping purpose i tried creating Adhoc wifi network in windows vista but my mobile didnt detect the wifi possibly because the frequency of the wifi network cant be recognised by android. i tried wifi direct feature of my galaxy Note2 (android jelly bean) but i seems to work with only samsung specific phones. it didnt work with nexus 4 neither with windows vista.
so i am quite sure that none of the above technique will work with raspbian OS.
any idea how to achieve my requirements. if connecting raspberry pi with android by USB to microUSB cable will solve the purpose , please let me know how.
Thanks
agoswami
as of now i have used USB/Wifi tethering method which has worked for me.i first tried with USB tethering , it was assigning some IP to Rpi. i changed the /etc/network/interfaces file so that this IP remain static. i used android Ip address as gateway and was able to ping them and even i was able to SSH from connectBot app.
i think the same approah will work for wifi also. i will give it a try later.
this discussion can be closed now :) my issue was resolved.