# nativescript-ichi-presentation

> Presentation for NativeScript

Latest version **0.7.0** (published 2018-07-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install nativescript-ichi-presentation
pnpm add nativescript-ichi-presentation
yarn add nativescript-ichi-presentation
bun add nativescript-ichi-presentation
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.7.0 |
| Published | 2018-07-27 |
| First published | 2018-05-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 138.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | mozhju |
| Maintainers | mozhju |
| Keywords | Presentation, nativescript, javascript |

## Links

- npm: https://www.npmjs.com/package/nativescript-ichi-presentation
- Repository: https://github.com/mozhju/nativescript-ichi-presentation
- Issues: https://github.com/mozhju/nativescript-ichi-presentation/issues
- npm.io page: https://npm.io/package/nativescript-ichi-presentation

## Recent versions

- 0.7.0 (latest) — 2018-07-27
- 0.6.9 — 2018-07-27
- 0.6.8 — 2018-07-27
- 0.6.7 — 2018-07-27
- 0.6.6 — 2018-07-25
- 0.6.5 — 2018-07-23
- 0.6.4 — 2018-07-20
- 0.6.3 — 2018-07-19
- 0.6.2 — 2018-07-18
- 0.6.1 — 2018-07-18
- 0.6.0 — 2018-07-18
- 0.5.2 — 2018-07-11
- 0.5.1 — 2018-06-28
- 0.5.0 — 2018-06-28
- 0.4.6 — 2018-05-23
- … 14 more at https://npm.io/package/nativescript-ichi-presentation/versions

## README

# 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:

```js
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");
};



```

---
_Source: https://npm.io/package/nativescript-ichi-presentation · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
