File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,24 @@ module.exports = class AndroidworldApp extends Homey.App {
5656 this . error ( 'Error fetching Androidworld feed:' , error ) ;
5757 }
5858 } , 15 * 60 * 1000 ) ;
59-
59+ try {
60+ const { randomUUID } = require ( 'crypto' ) ;
61+ let id = this . homey . settings . get ( 'id' ) ;
62+ if ( ! id ) {
63+ id = randomUUID ( ) ;
64+ this . homey . settings . set ( 'id' , id ) ;
65+ }
66+ await axios . post ( 'https://homey-apps-telemetry.vercel.app/api/installations' , {
67+ id : id ,
68+ appId : "nl.androidworld" ,
69+ homeyPlatform : this . homey . platformVersion ? this . homey . platformVersion : 1 ,
70+ appVersion : this . manifest . version ,
71+ } ) . catch ( error => {
72+ this . error ( 'Error sending telemetry data:' , error . message ) ;
73+ } ) ;
74+ } catch ( error ) {
75+ this . error ( 'Error in onInit:' , error . message ) ;
76+ }
6077 }
6178
6279} ;
You can’t perform that action at this time.
0 commit comments