zaterdag 16 februari 2013

Android xml / rss tag / attribute parser for (image) display (in android app)

My first app was a very simple image gallery,
with 3 buttons, calling 3 different urls in a webview.
This url was a php script that i wrote.




The host with this script would be queried like this:

http://your.host/fde-xmlparser.php?latest=1
http://your.host/fde-xmlparser.php?id=40
http://your.host/fde-xmlparser.php (skips to the next id automatically, everytime)

which grabs image links from any  RSS feed (in my case, supplied by phoca gallery). The script returns the contents of these files, so they can be directly viewed in any (mobile) webbrowser.


It supports alot:
None of the rss feed, php script, or the images need to be on the same host.
It reverts to local image fetching when script + images are on the same host, useful for hosts without url wrapper and curl. Note that in this case, the php script needs to be in the same or a parent folder of the images.

This feed can be queried with an html tag (setting) and attribute (setting).
Buildin support allows for file-location altering (find / replace), so for example, small thumbnail links can be changed into normal links.


These calls can be made from for example, google app-inventor like this: 


It's not very hard to accomplish in android studio either, if you follow the
Android studio Training.

There you have it, an super easy image gallery, suitable for lots of digital artists.

Download here:
http://code.google.com/p/xml-links-to-app-inventor/


Dont forget to check out my main project, http://www.bartbosma.eu/freedomeditor/

Geen opmerkingen:

Een reactie posten