Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yooga-tecnologia/capacitor-yooga-zoop-sdk
Encapsulamento via Capacitor para integrar com o Zoop Java SDK
https://github.com/yooga-tecnologia/capacitor-yooga-zoop-sdk
capacitor-plugin ionic-framework pinpad zoop
Last synced: 2 days ago
JSON representation
Encapsulamento via Capacitor para integrar com o Zoop Java SDK
- Host: GitHub
- URL: https://github.com/yooga-tecnologia/capacitor-yooga-zoop-sdk
- Owner: yooga-tecnologia
- Created: 2019-08-22T18:31:46.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-04T19:05:44.000Z (about 5 years ago)
- Last Synced: 2024-10-09T09:57:53.018Z (30 days ago)
- Topics: capacitor-plugin, ionic-framework, pinpad, zoop
- Language: Java
- Homepage:
- Size: 280 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# capacitor-yooga-zoop-sdk
Encapsulamento via Capacitor para integrar com o Zoop Java SDK.Todas contribuições são bem vindas, o plugin ainda está em **processo de desenvolvimento** e o objetivo é encapsular o máximo possível e tornar simples e funcional no ambiente híbrido do Ionic
## Installation
```bash
$ npm i --save capacitor-yooga-zoop-sdk
```
## Android configurationIn file `android/app/src/main/java/**/**/MainActivity.java`, add the plugin to the initialization list:
```java
this.init(savedInstanceState, new ArrayList>() {{
[...]
add(com.yooga.zoop.sdk.YoogaZoopSDK.class);
[...]
}});```
## Usage
```typescript
import { registerWebPlugin } from '@capacitor/core';
import { YoogaZoopSDK } from 'capacitor-yooga-zoop-sdk';export class AnyService {
constructor() {
window.addEventListener("showMessage", (res: any) => {
// Messages received from the terminal
});window.addEventListener("paymentSuccessful", (res: any) => {
//
});try {
registerWebPlugin(YoogaZoopSDK)
} catch(err) {
console.error(err)
}
}getBluetoothDevices() {
return Plugins.YoogaZoopSDK.getBluetoothDevices().then(res => {
console.log(res) // Devices that already has been paired
}).catch(err => {
console.error(err)
})
}
executeTransaction() {
Plugins.YoogaZoopSDK.transaction({}).then(res => {
console.log(res)
}).catch(res => {
console.error(res)
})
}
setBluetooth(bluetooth) {let bluetoothObject = {
name: bluetooth.name,
uri: "btspp://" + bluetooth.name,
communication: "Bluetooth",
persistent: true,
dateTimeDetected: "2019-08-23 10:06"
}try {
Plugins.YoogaZoopSDK.setBluetoothDevice(bluetoothObject).then(res => {
console.log(res)
}).catch(err => {
console.error(err)
})
} catch(e) {
console.error(e)
}
}
```