I've tested my app on iOS devices and works fine. I am now testing on Android. I downloaded the app to my device and it installs fine but when I try to open I get an immediate error - unfortunately (name of app) has stopped. I have no idea what could be causing this - Android version 5.0.1, LG G Pad F 7.0
- 33 Posts
- 0 Reply Likes
Posted 4 years ago
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Is this a device specific problem or an overall Android problem?This is the easiest question of your post: take another test device and test your app. As a developer, you will surely have multiple devices with different Android versions, right?
I can only say that the configuration (PGB cli-x.x.x with the latest inappbrowser plugin) works fine, here. So there must be something different in your app or with your test devices.
I would be happy to have another look if you could publish the latest version of your zip file.
Is it possible to clarify in config.xml to use one version of a plugin for android and another for iOS? Or only use it for iOS?Yes. Exactly the same way as how you specified different PGB versions for iOS and Android.
- 33 Posts
- 0 Reply Likes
App ID: 1854099
I do have two Android devices Nexus 4 (Android Version 5.1.1 and LG G Pad Android Version 5.0.1), not identical versions but probably not much difference.
I have separated config out for each platform.
I have uploaded the latest zip file as well as apk (without the inappbrowser plugin) - here's a new wrinkle. Now none of the external links are working - (native browser) on Android. Haven't changed anything but the above in config file.
You can find the files at www.kjrwebdesigns.com
File names are:
NewZip8.zip
GraceCovenantPresbyterianChurch-debug (6).apk
I do have two Android devices Nexus 4 (Android Version 5.1.1 and LG G Pad Android Version 5.0.1), not identical versions but probably not much difference.
I have separated config out for each platform.
I have uploaded the latest zip file as well as apk (without the inappbrowser plugin) - here's a new wrinkle. Now none of the external links are working - (native browser) on Android. Haven't changed anything but the above in config file.
You can find the files at www.kjrwebdesigns.com
File names are:
NewZip8.zip
GraceCovenantPresbyterianChurch-debug (6).apk
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Now none of the external links are working - (native browser) on Android.Are you saying that external links in a native browser are "not working"?
What does "not working" mean? You click such link and nothing happens? No javascript errors, nothing?
I am looking into NewZip8 and notice:
- you still (or again) include two different jquery libraries. You can't do that.
- the Facebook link to https://www.facebook.com/GraceCovenan... "works" just fine. It opens in a new browser window
- you are using "window.open()" to open a new window. With the new inappbrowser plugin, this will not "work" You would need cordova.InAppBrowser.open(). Read and apply the plugin's documentation
- 33 Posts
- 0 Reply Likes
What does "not working" mean? You click such link and nothing happens? No javascript errors, nothing?
before (without the inappbrowser plugin in config) the external links would open but in the app itself and could get back to app itself without closing it and opening it again. Now nothing happens when clicked - nothing, nada, zilch, crickets...
I am looking into NewZip8 and notice:
- you still (or again) include two different jquery libraries. You can't do that.
I do know there are two different versions of jquery on the site -
one is part of the jquery mobile requirements and the other is the Wow Slider. Again, even if I "can't do that" it is not what is causing the app to stop because - and I've already posted this many times - I tested the app without the Wow Slider files and folders which includes the extra jquery version and removed the link on the index.html page which is the only place it is linked and the app still didn't work.
- the Facebook link to https://www.facebook.com/GraceCovenan... "works" just fine. It opens in a new browser window
does it provide a back to Grace Covenant link? This is what iOS does.
- you are using "window.open()" to open a new window. With the new inappbrowser plugin, this will not "work" You would need cordova.InAppBrowser.open(). Read and apply the plugin's documentation
The inappbrowser plugin works fine on Apple products without the cordova.InAppBrowser.open(). It is a moot point since the app won't work on Android with the plugin any way. Build fails if it is included in config.xml PGB 3.5.0 and app stops if any higher version of PGB used.
Honestly, I just want to use the most recent version of PGB and have it work on my Android devices as it does on my iPhone and my iPad.
before (without the inappbrowser plugin in config) the external links would open but in the app itself and could get back to app itself without closing it and opening it again. Now nothing happens when clicked - nothing, nada, zilch, crickets...
I am looking into NewZip8 and notice:
- you still (or again) include two different jquery libraries. You can't do that.
I do know there are two different versions of jquery on the site -
one is part of the jquery mobile requirements and the other is the Wow Slider. Again, even if I "can't do that" it is not what is causing the app to stop because - and I've already posted this many times - I tested the app without the Wow Slider files and folders which includes the extra jquery version and removed the link on the index.html page which is the only place it is linked and the app still didn't work.
- the Facebook link to https://www.facebook.com/GraceCovenan... "works" just fine. It opens in a new browser window
does it provide a back to Grace Covenant link? This is what iOS does.
- you are using "window.open()" to open a new window. With the new inappbrowser plugin, this will not "work" You would need cordova.InAppBrowser.open(). Read and apply the plugin's documentation
The inappbrowser plugin works fine on Apple products without the cordova.InAppBrowser.open(). It is a moot point since the app won't work on Android with the plugin any way. Build fails if it is included in config.xml PGB 3.5.0 and app stops if any higher version of PGB used.
Honestly, I just want to use the most recent version of PGB and have it work on my Android devices as it does on my iPhone and my iPad.
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Honestly, I just want to use the most recent version of PGBThen why do you specify cli-5.2.0? PGB has moved on with two newer versions, meanwhile.
Anyway, you apparently prefer debugging an app while keeping some obvious defects in the code. That's quite a task!
Good luck.
- 33 Posts
- 0 Reply Likes
You miss the point - as usual. I can't get it to work with anything above V. 3.5.0. I would be OH SO HAPPY if I could get it to work on any version above 4.0.0 so I didn't get the same annoying error message in the build. Which is to use the most recent version of the inappbrowser plugin and I am. So what does it matter if I have defects in the code if it will not build the app because of the plugin issue?
I can have an app that works poorly or I can have an app that doesn't work at all.
Rock meet hard place.
I can have an app that works poorly or I can have an app that doesn't work at all.
Rock meet hard place.
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
I can have an app that works poorly or I can have an app that doesn't work at all.No. You can have an app that builds and works well. Thousands of others already have reached that stage.
Your inappbrowser plugin is the latest (1.3.0), 4 weeks old
Your PGB version is not the latest (cli-5.2.0), over half a year old.
Now, guess what you could do to make them fit?
Two possibilities!
====
Making them fit doesn't mean that your app would work correctly, though. In order to achieve that, you need to fix all other problems as well.
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
@Kathy,
In review of your the message thread and your website, I cannot help but wonder how much overloaded your are. While Phonegap tends to sell the system as being easy, it actually requires a lot of work.
On your issue, two (2) things.
1) In the future, new problem - new thread. Sometimes it is hard to tell, but if you solved the last issue - you have a new one. Starting a new thread allows other people to answer. Edict on the forum is to allow a single person to answer, unless the issue is so vauge - multiple answer could be correct.
2) Your issue is likely related to the whitelist plugin. On iOS, the plugin is not required. iOS only required the
The following will likey make both Apps work.
NOTE DOING THIS WILL MAKE YOUR APP INSECURE. IT IS UP TO YOU TO SECURE YOUR APP.
Add this to your
NOTE YOUR APP IS NOW INSECURE. IT IS UP TO YOU TO SECURE YOUR APP.
Add the followin to your
This *whitelist* worksheet should help you secure your app.
[HOW TO apply the Cordova/Phonegap the whitelist system](https://github.com/jessemonroy650/top...)
Let us know
Jesse
In review of your the message thread and your website, I cannot help but wonder how much overloaded your are. While Phonegap tends to sell the system as being easy, it actually requires a lot of work.
On your issue, two (2) things.
1) In the future, new problem - new thread. Sometimes it is hard to tell, but if you solved the last issue - you have a new one. Starting a new thread allows other people to answer. Edict on the forum is to allow a single person to answer, unless the issue is so vauge - multiple answer could be correct.
2) Your issue is likely related to the whitelist plugin. On iOS, the plugin is not required. iOS only required the
<access > tag to make the whitelist work. On Android, the plugin is required AND entires for each of the domains that are being accessed.
The following will likey make both Apps work.
NOTE DOING THIS WILL MAKE YOUR APP INSECURE. IT IS UP TO YOU TO SECURE YOUR APP.
Add this to your
config.xml
<plugin name="cordova-plugin-whitelist" source="npm" spec="1.1.0" />
<allow-navigation href="*" />
<allow-intent href="*" />
<access origin="*" /> <!-- Required for iOS9 -->
NOTE YOUR APP IS NOW INSECURE. IT IS UP TO YOU TO SECURE YOUR APP.
Add the followin to your
index.html
<meta http-equiv="Content-Security-Policy"
content="default-src *;
style-src * 'self' 'unsafe-inline' 'unsafe-eval';
script-src * 'self' 'unsafe-inline' 'unsafe-eval';">
This *whitelist* worksheet should help you secure your app.
[HOW TO apply the Cordova/Phonegap the whitelist system](https://github.com/jessemonroy650/top...)
Let us know
Jesse
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Starting a new thread allows other people to answer. Edict on the forum is to allow a single person to answer, unlessThis gets me feeling quite confused, Jesse. I know of no such 'edict'. How and when was this rule or agreement introduced?
Due to the nature of this 'community' or 'forum', I thought it was specifically desired to establish a many-to-many discussion platform. This forum is meant to "help each other", where the crowd manages to solve more problems than single persons.
That's why I would expect others to chime in whenever anyone believes to be able to contribute. It would make the conversations richer and could perhaps lead to even better solutions.
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
@Petra,
You just don't know.
You just don't know.
Related Categories
-
PhoneGap Build
- 15111 Conversations
- 274 Followers


