Upgrade to Pro — share decks privately, control downloads, hide ads and more …

LINE Thingsとは何か? / What is LINE Things?

LINE Thingsとは何か? / What is LINE Things?

2019年3月13日、LINE ThingsとLINE Clovaをテーマとした勉強会が、LINEのテクノロジーパートナー向けに開催されました。
その中で、LINE ThingsのProduct Managerである高久が登壇したプレゼンテーション資料です。

◆セミナーレポート
https://www.linebiz.com/jp/column/seminar-report/20190313
◆テクノロジーパートナーについてはこちらをご覧ください
https://www.linebiz.com/jp/partner/

LINE Developers

May 14, 2019
Tweet

More Decks by LINE Developers

Other Decks in Technology

Transcript

  1. LIFF BLEͷ࣮૷ const device = await liff.bluetooth.requestDevice(); const gatt =

    await device.gatt.connect(); const service = await gatt.getPrimaryService( 'E625601E-9E55-4597-A598-76018A0D293D' ); const characteristic = await service.getCharacteristic( '26E2B12B-85F0-4F3F-9FDD-91D114270E6E' ); characteristic.addEventListener('characteristicvaluechanged', (e) => { console.log('value changed to:' + e.target.value); }); await characteristic.startNotifications();
  2. const device = await liff.bluetooth.requestDevice(); const gatt = await device.gatt.connect();

    const service = await gatt.getPrimaryService( 'E625601E-9E55-4597-A598-76018A0D293D' ); const characteristic = await service.getCharacteristic( '26E2B12B-85F0-4F3F-9FDD-91D114270E6E' ); const value = await characteristic.readValue(); Connection ϓϩηε
  3. σʔλΞΫηε const device = await liff.bluetooth.requestDevice(); const gatt = await

    device.gatt.connect(); const service = await gatt.getPrimaryService( 'E625601E-9E55-4597-A598-76018A0D293D' ); const characteristic = await service.getCharacteristic( '26E2B12B-85F0-4F3F-9FDD-91D114270E6E' ); const value = await characteristic.readValue();
  4. Read const device = await liff.bluetooth.requestDevice(); const gatt = await

    device.gatt.connect(); const service = await gatt.getPrimaryService( 'E625601E-9E55-4597-A598-76018A0D293D' ); const characteristic = await service.getCharacteristic( '26E2B12B-85F0-4F3F-9FDD-91D114270E6E' ); const value = await characteristic.readValue();
  5. Write const device = await liff.bluetooth.requestDevice(); const gatt = await

    device.gatt.connect(); const service = await gatt.getPrimaryService( 'E625601E-9E55-4597-A598-76018A0D293D' ); const characteristic = await service.getCharacteristic( '26E2B12B-85F0-4F3F-9FDD-91D114270E6E' ); await characteristic.writeValue( new TextEncoder(‘utf-8‘).encode(‘LIFF BLE’) );
  6. Notify const device = await liff.bluetooth.requestDevice(); const gatt = await

    device.gatt.connect(); const service = await gatt.getPrimaryService( 'E625601E-9E55-4597-A598-76018A0D293D' ); const characteristic = await service.getCharacteristic( '26E2B12B-85F0-4F3F-9FDD-91D114270E6E' ); characteristic.addEventListener('characteristicvaluechanged', (e) => { console.log('value changed to:' + e.target.value); }); await characteristic.startNotifications();
  7. LINE ࣗಈ௨৴͕ͲͷΑ͏ʹಈ࡞͢Δͷ͔ʁ LINE server LINE app Device Your server Messaging

    API (webhook) γφϦΦ࣮ߦ݁Ռ ϦΞϧλΠϜͰ͸൓ө͞Ε·ͤΜ γφϦΦηοτొ࿥ γφϦΦηοτ൓ө ϦΞϧλΠϜͰ͸൓ө͞Ε·ͤΜ γφϦΦ࣮ߦ
  8. LINE γφϦΦηοτొ࿥ Device γφϦΦ࣮ߦ Messaging API (webhook) γφϦΦ࣮ߦ݁Ռ ϦΞϧλΠϜͰ͸൓ө͞Ε·ͤΜ LINE

    app γφϦΦηοτ൓ө ϦΞϧλΠϜͰ͸൓ө͞Ε·ͤΜ Your server LINE server γφϦΦηοτొ࿥
  9. γφϦΦηοτ • ଈ࣌ • σʔλΛऔಘ͢Δ • σʔλΛॻ͖ࠐΉ • NotificationΛड͚औͬͨλΠ ϛϯάʢNotifyͷ͜ͱͰ͢ʣ

    • σʔλΛऔಘ͢Δ • σʔλΛॻ͖ࠐΉ • ଈ࣌ • Ұఆ࣌ؒ଴ͭ • σʔλΛॻ͖ࠐΉ
  10. LINE γφϦΦηοτ൓ө Device γφϦΦ࣮ߦ Messaging API (webhook) γφϦΦ࣮ߦ݁Ռ ϦΞϧλΠϜͰ͸൓ө͞Ε·ͤΜ Your

    server γφϦΦηοτొ࿥ LINE server LINE app γφϦΦηοτ൓ө ϦΞϧλΠϜͰ͸൓ө͞Ε·ͤΜ
  11. LINE γφϦΦ࣮ߦ γφϦΦηοτొ࿥ γφϦΦηοτ൓ө ϦΞϧλΠϜͰ͸൓ө͞Ε·ͤΜ LINE server Your server Messaging

    API (webhook) γφϦΦ࣮ߦ݁Ռ ϦΞϧλΠϜͰ͸൓ө͞Ε·ͤΜ LINE app Device γφϦΦ࣮ߦ
  12. LINE γφϦΦ࣮ߦ݁Ռ γφϦΦηοτొ࿥ γφϦΦηοτ൓ө ϦΞϧλΠϜͰ͸൓ө͞Ε·ͤΜ Device γφϦΦ࣮ߦ LINE server LINE

    app Your server Messaging API (webhook) γφϦΦ࣮ߦ݁Ռ ϦΞϧλΠϜͰ͸൓ө͞Ε·ͤΜ