...
The JSON receive form the server is in the form :
{ categories:[{..},{..},{..},...], styles:{}, images:[], adv:"true|false", layout:"",
layoutoption : {}
}
Name | Type | Description |
categories | array | an array of page definition |
---|---|---|
styles | hash | an hash of key,value style info |
images | array | an array of images url used inside the app |
adv | string | "true" if the app have banner active |
layout | string | refer to Layout Definition |
layoutoption | hash | refer to Layout Definition |
...
Each page hash have this strutture :
{
nome:"name",
descrizione:"description",
img:"/../../image.png",
imgsize:60,
layout:"list",
layoutoption:{},
option:{},
pageoption:{},
child:[]
}
- Child
The Child Key is an array of page's hash. If this array is empty this mean this is an content page and the app should parse the option hash to find the page content.
- Option
The Option Hash describe the contains of the page.
...
The app should check the key “type” if not present it shouldn't do anything. The possible value of the type key are :
...
{
type:"text",
txt:"base64 encoded"
}
In this case the app should get an base64 encode string in the key “txt” and use it inside a WebView
...
{
type:"site",
url:"link url",
open:"inside|outside"
}
In this case the app should get an url in the key “url” and check the key “open” that have 2 possible value : “inside” or “outside” In the value of the key “open” is “inside” the app should open the url into a Webview if its “outside” the app should open the link using an external call.
...
{
type:"xml",
urltype:"audio|image|news|..."
img:"true|false",
add:"addpage link"
}
All the xml type pages get they contents from the feedconverter. The View should show two (2) options menu :
- Refresh
That reload the view
- Add (optional)
This button is present if the option hash contains the key “add”. The action of this button is to open the a webview using the url contains in the “add” key.
The app should check the value of the key “urltype” that can have these values :
...
If the urltype is image the app should show a gallery
...
If the urltype is image the app should show an audio player
...
For all the others values the view should display all the content (title,description,img) using the selected layout. The view should check in case of the list layout the key “img” that specify that the img si visible (default is showed) When a item is selected the app should check the value of the key “show” that can have this value :
- link
In this case the app should open the value of the key “link” with an external call
- insidelink
In this case the app should open the value of the key “link” in a webview
- content
In this case the app should show the value of the key “content” in a webview In the “insidelink” and “content” case the app should slideshow of news with next/prev/share
...
In this case the app should check the value of the key “subtype” that can have these values :
...
In this case you should read the check the key “values” that is an array of hash with this structure :
type:"special",
subtype:"contacts",
values :{
name:"",
value:"",
type:""
}
This list should be show in a list layout setting the title with the name and the description with the value and the img url build like
/images/default/category/+type+.png
...