0.7.0 • Published 6 years ago

nativescript-ichi-presentation v0.7.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

nativescript-ichi-presentation

Presentation for NativeScript.

Supported platforms

  • Android (any device with Android 4.4 and higher)

There is no support for iOS yet!

Installing

tns plugin add nativescript-ichi-presentation

Usage

Here is a TypeScript example:

import {PresentationClient} from "nativescript-ichi-presentation";

// data for show
var order = {
    items: [],
    coupons: [],        
    finalFee: 0.0,
}
var orderItem = {
    name: "product",
    qty: 2,
    fee: 14,
}
var orderItem2 = {
    name: "product2",
    qty: 3,
    fee: 45,
}
var couponItem = {
    name: "coupon",
    fee: 5,
}
order.items.push(orderItem);
order.items.push(orderItem2);
order.coupons.push(couponItem);
order.finalFee = 54;


// new Presentation Client
var client = new PresentationClient();

if (client.generate())
{
    // show Presentation
    client.showPresentation();

    // set data whil showed
    client.setShowType(2);
    client.setOrder(order);

    // imgPath
    // client.setShowType(1);
    // client.setImage(imgPath);

    // videoPath
    // client.setShowType(1);
    // client.setVideo(videoPath);

    // black screan
    // client.setShowType(0);

    // media from web
    // url response json string like: {"mediaFiles":["http://192.168.1.5/800.jpg"],"menus":["http://192.168.1.5/menu1.jpg"]} 
    // var url = "http://192.168.1.5/media/";
    // client.downloadAndShow(url);

    // var resp = "{\"mediaFiles\":[\"http://192.168.1.5/800.jpg\"],\"menus\":[\"http://192.168.1.5/menu1.jpg\"]}";
    // client.setMediaJsonAndShow(resp);

    // show "menus" by downloadAndShow
    // client.ShowMenu();

    // show "mediaFiles" by downloadAndShow
    // client.ShowMedia();

    // clean Files downloaded by downloadAndShow
    // var deleteAll = false;
    // client.cleanCacheFile(deleteAll);

    // close Presentation
    // client.closePresentation(videoPath);
}
else
{
    console.log("Presentation Client generate failed");
};
0.7.0

6 years ago

0.6.9

6 years ago

0.6.8

6 years ago

0.6.7

6 years ago

0.6.6

6 years ago

0.6.5

6 years ago

0.6.4

6 years ago

0.6.3

6 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.6

6 years ago

0.4.5

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago