Last active
February 17, 2018 05:11
-
-
Save carlosdelfino/94475eeb882c26c9a141441d8208914b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// referente ao fork do plugin em: https://github.com/carlosdelfino/nativescript-sqlite/tree/2.0.1-TypeScript-TEMP | |
// código padrão de iniciação da aplicação no entry point. | |
eventsManager.on(app.launchEvent, (args: ApplicationEventData) => { | |
myTrace.write("######################################"); | |
myTrace.write("app.js: Inicializnado DatabaseManager"); | |
SQLite.getInstance().checkDatabase(). | |
.then((db:SQLite) => { | |
myTrace.write("App: initDefaultDatabase: " + db.isOpen()); | |
}, (reason: any) => { | |
myTrace.write("App: " + reason.stack); | |
myTrace.write("App: Banco de dados com problemas: " + reason); | |
}); | |
myTrace.write("######################################"); | |
myTrace.write("app.js: Inicializando bluetooth."); | |
manager.initBluetoothDevice({ useLE: false } as ConnectOptions); | |
myTrace.write("app.js: bluetooth Type: " + (manager.le ? "LE" : "Classic")); | |
const btEnabled = manager.isBluetoothEnabled(); | |
myTrace.write("app.js: bluetooth ativo: " + btEnabled); | |
if (btEnabled) { | |
myTrace.write("app.js: Bluetooth abilitado!"); | |
// myTrace.dump(manager.getBondedDevices(), false); | |
} | |
myTrace.write("######################################"); | |
}); | |
// restante da aplicação |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment