- Install LiveView globally:
npm i -g liveview
- Change the
~/.titanium/config.json
to include the CLI hook (underpaths
->hook
):
{
"user": { ... },
"app": { ... },
"cli": { ... },
// start service | |
var SECONDS = 20; // every 10 seconds | |
var intent = Titanium.Android.createServiceIntent({ | |
url: 'logservice.js' | |
}); | |
intent.putExtra('interval', SECONDS * 1000); // Needs to be milliseconds | |
Titanium.Android.startService(intent); |
npm i -g liveview
~/.titanium/config.json
to include the CLI hook (under paths
-> hook
):{
"user": { ... },
"app": { ... },
"cli": { ... },
export default class Utils { | |
static loadCachedImageFromURL(url, cb) { | |
let filename; | |
try { | |
filename = url.substring(url.lastIndexOf('/') + 1); | |
} catch (err) { | |
cb(null); | |
} |