Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

This section describe the app json received from the server

The configuration is retrieved from :

/app/getInfosAndroid3/IDAPP

/app/getInfosIphone3/IDAPP

/app/getInfosWindows/IDAPP

JSON Structure

The JSON receive form the server is in the form :

{
  categories:[{..},{..},{..},...],
  styles:{},
  images:[],
  adv:"true|false",
  layout:"",
layoutoption : {}
}

 

NameTypeDescription

categories

arrayan array of page definition

styles

hashan hash of key,value style info

images

arrayan array of images url used inside the app
advstring"true" if the app have banner active

layout

stringrefer to Layout Definition
layoutoptionhashrefer to Layout Definition

 

Page Hash

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.

Option Hash

The app should check the key “type” if not present it shouldn't do anything. The possible value of the type key are :

text

{
   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

site

{
   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.

xml

{
   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 :

image

If the urltype is image the app should show a gallery

audio

If the urltype is image the app should show an audio player

Anything Else

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

special

In this case the app should check the value of the key “subtype” that can have these values :

contacts

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

When the row is selected the app should check the type key and do a call,sms,email, web browsing.

  • No labels