Quantcast
Channel: Topic Tag: mobile | WordPress.org
Viewing all articles
Browse latest Browse all 22092

MaddinXx on "[Plugin: JSON API] PhoneGap Android App built around JSON API"

$
0
0

@ElevateMindz

I can not give you a straight-forward manual on how to import the files into Eclipse/NetBeans whatever as I had some problems with that too. :)

However it shouldn't really be required as with PhoneGap you focus on - HTML/CSS/JS.

The only things you need to change in non /assets/www files are:

- in /res/xml/settings.xml the origin (which defines what URL's are allowed to be loaded in-app)
- replace schwingenonline in filenames/dirnames everywhere needed (just grep the files)

Beside that, you can take a look at the commits from 17.07. here: https://github.com/MaddinXx/ch.schwingenonline.android/commits/yetone

Basically everything can be splited into two parts:

- native Android project files
- PhoneGap files (/assets/www/)

and only the PhoneGap ones need big changes.

Let me try to summarize the required steps again:

- Clone the git repo
- run android update project -p . (in repo root)
- edit /assets/www/assets/js/app.js and change
- _base
- _api
- edit /res/xml/config.xml and change
- <access origin="XY" /> to your URLs

those changes should allow you to use the app with your WP install (but the native Android project would still be the same -> e.g. app name isn't changed yet.)

Now you can edit the files in /assets/www etc. (e.g. remove the JWPlayer reference etc.)

As a last thing (those are native Android changes)

- https://github.com/MaddinXx/ch.schwingenonline.android/blob/develop/AndroidManifest.xml line 21, 45, 56
- https://github.com/MaddinXx/ch.schwingenonline.android/blob/develop/build.xml line 2
- https://github.com/MaddinXx/ch.schwingenonline.android/blob/develop/res/values/strings.xml line 3
- rename files and dirs: https://github.com/MaddinXx/ch.schwingenonline.android/tree/develop/src and change everything schwingenonline in other files as well to reflect those changes

Finally, you can debug your app either in Chrome (with Ripple plugin) or on device with adb logcat.

This issue may also contain some interesting information for you: https://github.com/MaddinXx/ch.schwingenonline.android/issues/5

Please let me know if things are still unclear :)

BTW: Debugging in Chrome (with Ripple) will fail with the PreferencesPlugin as it cannot be loaded there. Generally, I recently had some problems with it...

Might also help:

- https://github.com/MaddinXx/ch.schwingenonline.android/wiki/Concept#workflow
- https://github.com/MaddinXx/ch.schwingenonline.android/wiki/Structure#legend


Viewing all articles
Browse latest Browse all 22092

Trending Articles