This file contains hidden or 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
| //Import bencoding alarmmanager module into our Titanium App | |
| var alarmModule = require('bencoding.alarmmanager'); | |
| var alarmManager = alarmModule.createAlarmManager(); | |
| var isRunning = Ti.App.Properties.getBool("service_running", false);//get service running bool status | |
| if (isRunning) { | |
| Ti.API.info('service is running'); | |
| } else { | |
| Ti.API.info('service is not running'); | |
| alarmManager.addAlarmService({ |
This file contains hidden or 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
| var win = Titanium.UI.createWindow({ | |
| title: 'Video Recording from Appcelerator Titanium', | |
| backgroundColor: '#fff' | |
| }); | |
| // const value grabbed from | |
| // http://developer.android.com/reference/android/provider/MediaStore.Audio.Media.html#RECORD_SOUND_ACTION | |
| var RECORD_SOUND_ACTION = "android.provider.MediaStore.RECORD_SOUND"; | |
| var soundUri = null; // Will be set as a result of recording action. | |
This file contains hidden or 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
| /** | |
| * We're going to create an infinite scrollable list. In this case, we're going to show a date. When you swipe left, | |
| * you'll see yesterday. Then the day before yesterday, and so on. Swiping right shows you tomorrow, and so on. | |
| */ | |
| var win = Ti.UI.createWindow({ backgroundColor: '#fff' }); | |
| var isAndroid = Ti.Platform.osname === 'android'; | |
| /** | |
| * Track where we are in the infinite scrollable views, and define how large of a step goes between each view. | |
| */ | |
| var currentDate = new Date(), msIntervalBetweenViews = 1000/*ms*/ * 60/*s*/ * 60/*m*/ * 24/*h*/; |
OlderNewer