MaddinXx
Forum Replies Created
-
Forum: Plugins
In reply to: [JSON API] [Plugin: JSON API] PhoneGap Android App built around JSON API@jaskobihac have you given “&thumbnail_size=” a try? you can see it for example in post.id section (routing file) – that lets you define the size to take (again, see without ?include and dev=1 for a list of all sizes your installation has available).
Indeed scrolling is not optimal – but the side menu should work. Do you get an error message in the console (Ripple) or with Logcat (adb)?
I might somewhen create a new JSON API based app as it’s already a bit old and I had the chance to learn a lot more about JS in the meanwhile…but this can take ages (depending on free time :))
@elevatemindz thank you. Believe in yourself and try again if you still need it – I’m sure you’d be able to manage it nowadays ??
Forum: Plugins
In reply to: [JSON API] [Plugin: JSON API] PhoneGap Android App built around JSON APIYou can include the fields you want for the view. For example change: https://github.com/MaddinXx/ch.schwingenonline.android/blob/develop/assets/www/routing.json#L11 to get_recent_posts/?include=id,title,excerpt,thumbnail and include it in the view:
https://github.com/MaddinXx/ch.schwingenonline.android/blob/develop/assets/www/tpl/news.mustache (you will have a new placeholder {{ thumbnail }} there.
You can see all available fields by calling the URLs WITHOUT the include parameter (and ?dev=1)
Forum: Plugins
In reply to: [JSON API] [Plugin: JSON API] PhoneGap Android App built around JSON API@jaskobihac you might need to change some of these lines:
– https://github.com/MaddinXx/ch.schwingenonline.android/blob/develop/res/xml/config.xml#L21-L24 (it controls which domains/IPs are allowed to be opened from within the app (e.g. load content from it))
– https://github.com/MaddinXx/ch.schwingenonline.android/blob/develop/assets/www/routing.json (make sure those URLs are available for your install)
– https://github.com/MaddinXx/ch.schwingenonline.android/blob/develop/assets/www/assets/js/app.js#L16-L23 (change to your domain / JSON API base path)That should already be enough to get a working application.
Let me know if this helps – if not, you might want to install Ripple (see posts above) and post the console output when starting/running the app there.
Hope this helps ??
Forum: Plugins
In reply to: [JSON API] [Plugin: JSON API] PhoneGap Android App built around JSON APIThe problem with Ripple is, that you have to click 3-times abort when the popups appear (otherwise an endless error loop happens).
You just need to have Android SDK installed and run:
./cordova/build
to generate an .apk (will be placed in ./bin).Well, Sublime Text – what else? ??
Forum: Plugins
In reply to: [JSON API] [Plugin: JSON API] PhoneGap Android App built around JSON APII 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 URLsthose 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 changesFinally, 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#legendForum: Plugins
In reply to: [JSON API] [Plugin: JSON API] PhoneGap Android App built around JSON APIHi ElevateMindz. Thanks for the flowers.
Adding the images to the news list is easy, you can do it like so:
-in routing.json you need to add thumbnail @ include (so it’s included in the server’s JSON respond)
– in news.mustache you will now have a new placeholder called post.thumbnailthat’s it ??
Let me know if it worked for you.
BTW: If you don’t mind I’d be interested in seeing your resulting app ??
Regards!
Forum: Fixing WordPress
In reply to: error if not logged inHi jkovis
It is working now, no idea why. I deactivated all plugins and activated all again, and it works. Strange situation, but as it finally works – great ??
Thank you though
Kindly Regards,
Michel