Skip to content

Working on json

Sumit Rajdev edited this page Jan 13, 2017 · 2 revisions

#This May be hard for you

##Example file

    "prerelease": "true",
    "stable": "false",
    "latest" : "true",
    "tag_name": "pac_i8262_Beta2",
    "id": 20161224,
    "name": "pac_arubaslim_UNOFFICIAL_I8262_Beta2.zip",
    "release_date": "2016-12-20T20:16:02Z",
    "browser_download_url": "https://github.com/Arubadel/ROM/releases/download/pac/pac_arubaslim_UNOFFICIAL_I8262_Beta2.zip",
    "body": "Added power hal for extending battery",
    "version" : "20161224"

understanding

###prerelease

"prerelease": "true",

if prerelease is true then rom will show it's a beta update .

###stable

"stable": "false",

if stable is false then it will not show stable tag before rom .

###Latest

"latest" : "true",

you should set this for only one build at a time if latest is true then it will show latest tag after changelog.

###Tag Name

"tag_name": "pac_i8262_Beta2",

this decides what name should be shown of rom in list view .

###ID

"id": 20161224,

this will be added before name of zip file and let allow app to find rom for flashing (not added flasher yet).

###Name

"name": "pac_arubaslim_UNOFFICIAL_I8262_Beta2.zip",

this will let you allow to set name of zip file to be downloaded in device .

###Release data

"release_date": "2016-12-20T20:16:02Z",

you can ignore it since it's already added in build.prop and roms zip

###browser_download_url

"browser_download_url": "https://github.com/Arubadel/ROM/releases/download/pac/pac_arubaslim_UNOFFICIAL_I8262_Beta2.zip",

this is direct link to your zip file to be downloaded by user .

###Body

"body": "Added power hal for extending battery",

in simple words it's your change log you should use \n for new line .

##version

"version" : "20161224"

you can get it form your build.prop compiled build

Note :-

If you do any mistake then app may crash

for example this is right formate

[
  {
    "prerelease": "false",
    "stable": "true",
    "latest" : "true",
    "tag_name": "Build Name",
    "id": 2859018,
    "name": "app-debug.apk",
    "release_date": "2016-12-20T20:16:02Z",
    "browser_download_url": "https://github.com/Grace5921/OtaUpdater/releases/download/untagged-6e1dc78792511dabc72a/app-debug.apk",
    "body": "This is my change log",
    "version" : "20161230"
  },
  {
    "prerelease": "false",
    "stable": "true",
    "tag_name": "Build 2 Name",
    "id": 2859019,
    "name": "app-debug.apk",
    "release_date": "2016-12-20T20:16:02Z",
    "browser_download_url": "https://github.com/Grace5921/OtaUpdater/releases/download/untagged-6e1dc78792511dabc72a/app-debug.apk",
    "body": "This is my change log"
  }

]

and this is wrong

[
  {
    "prerelease": "false"
    "stable": "true"
    "latest" : "true"
    "tag_name": "Build Name"
    "id": 2859018
    "name": "app-debug.apk"
    "release_date": "2016-12-20T20:16:02Z"
    "browser_download_url": "https://github.com/Grace5921/OtaUpdater/releases/download/untagged-6e1dc78792511dabc72a/app-debug.apk"
    "body": "This is my change log"
    "version" : "20161230"
  },
  {
    "prerelease": "false",
    "stable": "true",
    "tag_name": "Build 2 Name",
    "id": 2859019,
    "name": "app-debug.apk",
    "release_date": "2016-12-20T20:16:02Z",
    "browser_download_url": "https://github.com/Grace5921/OtaUpdater/releases/download/untagged-6e1dc78792511dabc72a/app-debug.apk",
    "body": "This is my change log"
  }

]

"prerelease": "false" did you noticed "," is missing and it will crash app

Clone this wiki locally