I have an android app built via Ionic Framework. The issue is it is working fine in the browser but not working as expected in the android app, which I installed on my phone. The issue is that I am not able to navigate the app on my phone.After connecting to chrome dev tools, seeing the link in the dev tools I found out that there is a difference. The link in dev tools is
file:///android_asset/www/index.html#/sideMenu/dashboard/dashboard/month
and link in my browser is
http://localhost:8100/#/sideMenu/dashboard/dashboard/month
could this be the reason? Most of you would be doing the same thing. So how do you guys resolve it?
EDIT
Screen shot of chrome inspect
There were errors in my app generating from the fact that It was not able to access the internet. Download the Cordova's whitelisting plugin. It should do the trick and it's a known issue that if you have even a single error in your app. It could possibly break the flow.
Related
I have recently been playing around with code-server, which is a Visual Studio Code IDE that can be ran on the remote machine and accessed through the browser. For that I made a google vm instance of Ubuntu LTS 16.04, and I was successfull to launch it and install the Flutter and Dart sdks. Because of the flutter_web and flutter itself still being unable to unify in one codebase, I ran into a lot of incompatibilities which made it impossible to debug my application as a web-site.
Now I want to launch the android emulator instead, because I would be able to test and debug the apps, but I didn't find any source of information on how to install it and display it remotely, for example, in local browser.
Is it practically possible? And if it is, please tell me how. Because me being able to develop flutter apps on iPad would be really cool.
Actually this out of our scope as is not related to the Google Compute Engine product, anyway I would give my best effort to help you:
Google Marketplace has an awesome product called Genymotion [1] which is an Android Emulator. I tried and it's one click deploy, very useful.
[1] https://console.cloud.google.com/marketplace/partners/genymotion-public-project
I have always used ripple-emulator to test my Android app in browser.
The project seems to be unmaintened but was still working, until I upgraded to Cordova 7.0.0. Now it does not work anymore: when Ripple starts it just shows:
So I'm looking for a new way to test my app in browser.
Is there any new way to do it?
I use Ubuntu 16.04 OS.
Thanks
The Ripple emulator is no longer being updated (as of writing this).
I would recommend that you install the latest version of Cordova-Simulate into your application directory. You can read all about it here: https://www.npmjs.com/package/cordova-simulate
It contains the same features that were available in the ripple emulator.
I am trying to work on react native for android application development. I am using android studio for that, but I am unable to debug the .js files developed for react native. Whenever there is any problem with code its giving me error, Unexpected Token, I am unable to know that how to debug or get proper error. Is there any framework available to work on React native for Android app development. I have already figured out a lot but unable to get any solution to debug android app based on React Native.
You can debug JavaScript code, console.log etc in Chrome. You have to select "Debug in Chrome" from the developer menu on device first and that will open a new tab on Chrome at localhost:8081/debugger-ui. However, to debug in Chrome, keep in mind you have to install React Developer Tools on Chrome https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi
You need to debug in Chrome. There are good docs on the RN site about debugging:
https://facebook.github.io/react-native/docs/debugging.html#content
However, if you have syntax errors the debugger won't help you, but Chrome Dev tools might give you a better idea of where the error is.
My issue is similar to this question.
I have an HTML5-based Android app. It is wrapped in Cordova, and built using the Ionic Framework. When launched, the app loads an index.html file, which is located locally on the device and makes a cross-origin resource request. It therefore does not load for Android API 18 and higher.
The workaround to this restriction is to enable the setAllowUniversalAccessFromFileURLs setting. Given that my project is built using the Ionic Framework, what would be the correct way to enable this flag? Would I necessarily need to go into the Android project to enable the flag, or is there a cleaner way to do it via a settings file?
I have inherited this project and have very little experience with Ionic, Cordova, and HTML5, therefore any detail would be greatly appreciated. In the question above, the solution was to update to Cordova 2.8.1. I am running Cordova 5.1.1. and still experience the problem.
Can be a origin problem try to whitelist your remote domain.
Read this http://docs.phonegap.com/en/4.0.0/guide_appdev_whitelist_index.md.html
My ionic app was running fine in the desktop browser and on ios, but not showing up at all on android. It wasn't explicitly failing, but it just resulted in a blank, white screen with no sign of life.
The same result happened both in android emulation and on an actual android device. The app would load, with its icon and everything, but its view was completely blank and empty.
SO has lots of questions about explicit ionic android build errors and platform-irrelevant errors, but nothing that quite matched what I was seeing.
I set up my android device to debug through Chrome Canary on my Mac, and was able to see the javascript console while it ran... looked like it was having trouble loading key data from an external url!
A little research showed me that this is a feature of Android Cordova, not a bug... and that the solution is to add the Whitelist Cordova plugin to ionic, whitelist the domains in question in config.xml, and rerun... that solved the problem!
The bigger mistake was that I was using resolve sections in my ui-router states, but had never thought about what to do if the promises in question never resolve!
this is a feature of Android Cordova, not a bug... and the solution is to add the Whitelist Cordova plugin to ionic, whitelist the domains in question in config.xml, and rerun.