Inspect Devices Chrome auto reopen/reload - android

I am currently usings chromes fantastic Inspect Devices to debug my phonegap app.
However every single time I build the app and deploy to my phone I will get the following message:
Detached from the target etc
Is it possible to get Chrome to auto reload so I don't have to keep opening
Settings -> More Tools -> Inspect Devices

As far I know, at this moment it is possible to do it only by reload page. It will reload the code (HTML, js, CSS), but the history of WebView will not be cleared. By that I mean that if your app start on "http://start", and you are currently on url "http://a/b" and do reload, you will be now on "http://start", but click on back will not terminate app, you will be redirected on "http://a/b". If that is not problem, then relaod is your solution. Regards.

Related

How to make embedded javascript within IOS and android to console.error to the outside world

Currently, we have a react web app (say it is a form), when it is running on web browser, if there is any error, console.error will fire and we can see that in browser's console log and figure out what is the problem.
The app is working fine and no console.error firing.
Now the app is embedded into webview of IOS and android. When user is filling the form, click the submit button, some of the button and dropdown stops working (e.g. click but nothing happened or null)
I suspect is something undefined, but I have no proof.
Is there a way to ask IOS and android to behave like the web browser to output console.error? I can log it and feed it to the IOS / Android, but I don't know where exactly the problem is. If I can have console.error, it will tell me the location of error.

auto-fill not working in InAppBrowserObject external website on Android device

I have been struggling to get my app working the way I want it to. I have an ionic/angular based app that is meant to be only for the Android platform. It is basically a wrapper for an already-existing website from the company I work at. The InAppBrowserObject works great for this, it does exactly what I want except that it doesn't auto-fill the login credentials. It makes it so users need to login every time they open the app which is not what we want. We want the external website to open in the app itself and not in the device's browser, so I use "_self" as target.
I have noticed that when I use the device's browser (target: _system) that it asks for permission to save the credentials and then it does actually save them. It is only when I use the targets: "_self" or "_blank" that I get no popup asking to save it (it also doesn't save it). In the image below you can see the code in the app.component.ts file and some information about the app which might be important. The app is small, it literally only has the app.component files and that's it. It opens the external website immediatly when the app is started.
At this point I am clueless as to what to do about this problem. I think I have visited every website that is related to this subject and the solutions are either outdated or there is no solution at all. I hope I gave enough information as to what the problem is, if not, I can always add more.
Information:
using Angular(ts), Ionic in vs-code. Testing apk in Android Studio.
InAppBrowserObject (Cordova, #awesome-cordova-plugins/in-app-browser)
app.component.ts file ^
target set to _self and not auto-filling the inputs (the inputs in the website are set with autocomplete on)
target set to _system and auto-filling is working correctly.

React Native Hot Reloading

I have created a React Application via Expo CLI, while I run something via:
yarn web
I am able to open a QR code, and Switch to Tunnel and open that application via my Personal Android Device, it renders fine. But I have to make any changes, and I spin the server again using the same command, it does not seem to refresh content. It does refresh on Web, but does not on Android.
I have gone through few SO's posts and seen that we need a Hot Reload to serve contents dynamically. But when I shake the phone rigorously, I do not find any thing such as Hot Reload to enable it.
This is what I am getting:
I need two things now so to unblock me:
How to enable Hot Reload?
How can I rebuild the package so that I can access the latest from Android mobile
I used expo start instead of yarn web,
And it has helped me in auto reloading

Load webside in iOS App and Android App, not loading after changes

I have a page that is opened inside a webview (Android) and uiwebview(iOS). When it is in the app, it works perfectly, but when I made a change in the code in the hosting site, the page wont't load in Android or iOS either. It's telling me that "error resource is not available". The page does load after refreshing many times. I don't know what is happening. The page is built in Laravel 5.1 and my hosting site is GoDaddy.
Does anyone has the same problem?
Is the app hosted on godaddy using javascript files? In that case you might want to handle that in android app.
For starters you can try to access the website in chrome/ any browser on android device, if its working, try and delete data/cache of app from settings. Or simply just uninstall and install again.

Using iFrames in Phonegap And App Crashes

I have created an app with PhoneGap 2.0.0 for Android on Eclipse but when I try run the application either on an emulator or my phone(signed application with no errors) it only shows up the static html pages. When I go to a page where I have used iFrame to load another webpage into it, it simply crashes.
This is the screen I get on the emulator and the same message is displayed on my phone as well(SE Xperia X10)
Screenshot of Emulator with The error :
After showing the message the app crashes instantly. Please let me know if I need to add any other permissions or add other settings or make any changes for this to function because the iFrame functions properly outside Phonegap on browser(including phone/desktop browsers)
At least some versions of PhoneGap use an iframe to communicate with the native layer.
I'm most familiar with the iOS version, where there are definite bugs in the browser's support of iframes ( https://issues.apache.org/jira/browse/CB-593 ). I don't know if there is a similar system level issue on android, but there could easily be some part of your code that doesn't expect that second iframe to be there.

Categories

Resources