Hi,

I tried following the DrupalGap 7 Docs to deploy my app onto my Android device in 'phonegap' mode, however it gives "No Connections found!" Alert .
It then redirects me to Failed Connection Page

A few Key points for my case:

  • DrupalGap version: 7.x-1.15
  • Services Module version: 7.x-3.12
  • I am able to access the UI and everything works fine when accessing the app in 'Web app' mode on PC using Chrome+Ripple
  • I am able to hit the URL and run the app on my Android device browser as well in 'Web app' mode
  • Using Poster on Firefox returns correctly formed JSON

I am running Android Marshmallow on my device.
Is there any additional network access related step required for deploying the app?
If yes can we add this to documenation

CommentFileSizeAuthor
#3 SS_index_html.PNG69.69 KBd16_dylan

Comments

d16_dylan created an issue. See original summary.

tyler.frankenstein’s picture

Status: Active » Postponed (maintainer needs more info)

Please confirm which plugins you've installed with Cordova. Use the terminal command: cordova plugin list

Also confirm you've changed the 'mode' to 'phonegap' in the settings.js file.

Also confirm you've copied the cordova.js file from the platforms/android/platform_www folder into your project's www folder and then include the cordova.js file in your index.html file.

Drupal Services is up to 7.x-3.16 now, please upgrade.

d16_dylan’s picture

StatusFileSize
new69.69 KB

Thanks for the prompt reply,

running cordova plugin list gives the below result

cordova-plugin-whitelist 1.2.2 "Whitelist"

settings.js has phonegap mode on

drupalgap.settings.mode = 'phonegap' ;

cordova.js is present in my projects www folder and included in my index.html file (Does the sequence matter?)

index.html Screen Shot

d16_dylan’s picture

Okay i found the issue, the plugins mentioned in the documentation were not saved because i missed the 'cordova plugin save' command.

Thanks a lot for your help.

tyler.frankenstein’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Thank you for the follow up. Yes, the cordova plugin save command is needed when making any plugin modifications, I've been burned by that a few times.

papan_tc’s picture

Hi,
I am new to drupalgap and trying to make it work on Drupal 7. It works on web-app mode but connection to server fails on android device.
I have checked the following:
1. Web-app mode : works
2. ?q=drupalgap/system/connect.json returns valid response on postman
3. cordova plugin list returns
cordova-plugin-camera 4.1.0 "Camera"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-dialogs 2.0.2 "Notificat7.ion"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-inappbrowser 3.1.0 "InAppBrowser"
cordova-plugin-network-information 2.0.2 "Network Information"
Error: ENOENT: no such file or directory, open 'C:\Users\pkmukher\.config\configstore\cordova-config.json'
4. Added cordova.js in index.html
5. Drupalgap version is 7.X- 1.16 and services version is 7.x - 3.25. Drupal version is 7.58.

What else can I check?
Please help. I spent almost 5 days researching on this without any luck.

Thanks a lot for your help.

tyler.frankenstein’s picture

Is your server on a remote host, or on your localhost? Remote works much easier, if it's localhost then you need to set your site's path to include a "local" URL, e.g. IIRC it'd be something like 10.1.10.* so the Android device can talk to it over the local network.

papan_tc’s picture

my host is a remote host on cloud VM.
I have access to the server console.
Please let me know if I need to adjust something on the server.

Update: With services-7.x-3.x-dev, the connection works but the login process takes a long time on mobile. When I access mobile-application/index.html using browser of my phone, login is very fast. Is there a way I can check why it is taking so long to login in phonegap mode?
Any guidance would be of great help.

thank you.