My react native app is functioning properly on emulator. But after generating apk version of the app, I could not log in to the app on android device.
What could be the possible solutions ? Please !!!
There are two possible situations
1- The API you are hitting is on HTTP you required HTTPS instead
you can enable the HTTP support as well check the link for details
How to allow all Network connection types HTTP
2- Android is blocking the API request for some reason change the device to test
Related
I am building an IOT device for my home and have mDNS responder on it (to avoid static IP setup for IoT devices).
Devices are to be controlled with React Native Android app, but the same seems to be not working and am getting Network error (using Axios).
My endpoints have changed from http://192.168.0.2/setSettings to http://mymdnstest.local/setSettings same works from windows chrome browser but not from android browser as well.
I came across zeroconf but it seems it searches for mdns URL but I am looking for more of invoking them.
Note: the mDNS endpoint is known to my React Native app.
Zeroconf actually works, the issue is with emulator it doesnt let us know if it works.. If you test it with physical device will get to know the mDNS details.
I am using API in my react native app which uses HTTPS and works fine while connected to wifi but when i switch to mobile data it gives me Error: Network Request Failed.
The issue only occurs in android 10, works with both mobile data and wifi network in android 9 or older
I researched a lot what i found was it wasn't react native problem, it was my phone's problem my phone is nsot certified in google play i bought it from someone and it's bootloader is unlocked. When i open my app turn the data off and then on the app works just fine.
I'm thinking to pass to a web app IDE like cloud9 to host my apps currently in development.
The problem with this is that i don't know how to test my code in the way I normally do with a simulator, locally.
I'm trying to develop on a remote server, and building on that remote server, an i want to test the app with my real device, with live reloading absolutely. If it's not possible to use my real device i could use an emulator and it's ok, but I'd prefer to use my phone.
I see you are using metro-bundler, you can achieve this by using the Tunnel option in connection:
This will create a global link to communicate with any of your devices. Then you can easily use the QR code or just the generated link in your own mobile device using expo app.
Now you can debug and test with your actual physical phone or emulator without publish it.
I am developing a web app, that needs to run on android mobile device's browser and, communicate with a mobile app which is installed on that device.
The web app need to communicate through ajax calls to localhost (to the android mobile device) to retrieve data from the mobile app.
So far I tried fetching from: http://localhost, http://127.0.0.1, http://10.0.2.2 and none of them worked.
I succeeded only by getting the device IP using webRTC and fetching from this IP.
Is there another way to do this?
If I understand correctly you are trying to inspect development on your android device, you need to use Google Chrome, just open localhost on your mobile device and connect via usb to your computer, then use the remote device tool.
Follow the tool link: https://developers.google.com/web/tools/chrome-devtools/remote-debugging
If you're on the same network you can use your internal IP address. If you're using windows you can use ipconfig and if you're a MAC user you can use ifconfig.
After you found your internal IP address append the port number that your server is running on internalipaddress:port and start making requests there.
My requirement is to launch my installed application from chrome browser if it is installed on client machine, If not installed then I wanted to start download. What is best recommended solution for chrome?
So fare i tried following
used NPAPI, but due to deprecation of NPAPI by chrome I can't use.
Checked PNacl and Pepper API both API not providing access to local file system to launch an application. They just port my C/C++ code in browser and run it in browser environment with sandbox restrictions.
Is it true only option i have is to use native messaging? Or is there any other option for simple task to launch my application from our url,
Regarding “Native Messaging”
Do users need to install my extension
Do i need to add my extension to chrome store
How to deal with Registry permissions for non admin users
Can i install extension to chrome along with my app installation
Note :- Found some providers use “External Protocol Request” to launch application but there are no enough resources where can i found more about this
Thanks and Regards,
Pravin
For what its worth,
see here - http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/nativeMessaging/
the README indicates that Native Messaging can now be added even by non-Admins.
But it appears Native Messaging will only work for Extensions: "Extensions can exchange messages with native applications(...)" and I dont imagine you can expect all of your users to do that.
To open it if it's installed you just need to register your application (at the OS level, so the details will vary by OS; you don't say what OS you are targeting) as a handler for some specific scheme, then have your page open that scheme. That's the same flow that causes mailto: links to open a user's mail client, for instance.
If you have a chrome app, you can use inline install: https://developer.chrome.com/webstore/inline_installation