Magic Bean Electronic Photo frame

Source: Internet
Author: User

I. Directory structure

Second, new App-xiang folder

1. manifest.json file

{    "package_id":"Com.modou.xiang",     "name":"App-xiang",     "Display_name":"Electronic Photo Frame",     "author":"Tingpan",     "Author_mail":"[email protected]",    "Homepage":"modouwifi.cn",    "version":"0.0.1",    "os_version":"1.3.01",    "release_date":"2015.06.22",     " Location":"Internal",     "Description":"This is an electronic photo frame",    "instruction":"This is the first version of",     "autostart":false,    "Start_on_boot":false}

2. Init

#!/bin/SHCurDir=$ (CD $ (dirname$0) &&pwd) PWD="$ (CD $ (dirname $) && pwd)"TITLE="Electronic Photo Frame"program_name="App-xiang"ICON="Res/icon.png"Pressed_icon="Res/icon_p.png"Apps_config_dir="/data/conf"Launcher_config_dir="$APPS _CONFIG_DIR/LAUNCHER/CONF.D"Launcher_config_file="$LAUNCHER _config_dir/$PROGRAM _name.conf"Install_bin="/usr/bin/install"REMOVE="/bin/rm-f"usage () {Echo "error:action Missing"    Echo "Syntax: <start|stop|restart|status|config|install|uninstall>"}Install() {    Echo "{">"$PROGRAM _name.conf"    Echo "\ "name\": \ "$TITLE \",">>"$PROGRAM _name.conf"    Echo "\ "icon\": \ "$PWD/$ICON \",">>"$PROGRAM _name.conf"    Echo "\ "iconpressed\": \ "$PWD/$PRESSED _icon\",">>"$PROGRAM _name.conf"    Echo "\ "exec\": \ "$PWD/init run\",">>"$PROGRAM _name.conf"    Echo "\ "msgnum\": 4">>"$PROGRAM _name.conf"    Echo "}">>"$PROGRAM _name.conf"$INSTALL _bin-d $LAUNCHER _config_dir $INSTALL _bin"$PROGRAM _name.conf" "$LAUNCHER _config_file"}uninstall () {$REMOVE"$LAUNCHER _config_file"}run () {#textview2-T"Hello"-M"Hello World"#textview2-T"Hello"-m ${curdir} imageview ${curdir}/res/qi_224_240.png224  -&Sleep 5    Killallimageview ImageView ${curdir}/res/sheng_320_240.png the  -} Case " $" inch    "Start") start;; "Stop") stop;; "Run") run;; "Restart") start stop;; "Install" )        Install;; "Uninstall") uninstall;; "Set_config") Set_config;; *) usage;;Esac

3, the Res folder into the following PNG image,

Note: Icon.png and icon_p.png pixels are 111x111

MPK Package and source code download:

Http://pan.baidu.com/s/1eQniLRc

Reference:

Https://gitcafe.com/Modou/app-framework

https://gitcafe.com/hdcola/ModouAppDevTutorial/tree/master/app-helloworld0.0.1

Magic Bean Electronic Photo frame

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.