ChildOfCode


Maker,Coder,Hacker,Robotic,Open Source. Knowledge Base


Tag: Titanium


  1. Appcelerator Titanium - Android 6.x permission

    Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app. Titanium change some API for this. Below is how to Request Multiple Permission In Android 6.x We Will Request GPS and External Storage for Our…

    Appcelerator Studio, Titanium, Android 6.x, Permissions, Titanium SDK 6.0.1, Android 6.0.1

  2. Titanium Studio Save the Apps data in the Filesystem

    In IOS is only Internal Storage ,but in Android is diffrent since some android device can use sd-card theClass.prototype.WriteLog = function(theJSON){ Ti.API.info('WriteLog = ' + new Date() ); var thisClass = this; var jsonDir = ''; var dateObj = new Date(); var month = dateObj.getUTCMonth() + 1; //months from 1-12 var day…

    Android, JavaScript, Titanium, IOS, JSON, Filesystem, applicationDataDirectory, externalStorageDirectory

  3. Titanium Studio get battery Level

    Get the battery Level in the apps Ti.Platform.batteryMonitoring = true; Ti.Platform.addEventListener('battery',UpdateBattery); if(e.level !== undefined) { thisClass.batteryLevel = e.level; } *this code is only work on Android platform Curennly ,this code is not work on IOS a known bug .…

    Android, Titanium, IOS, Battery Level

  4. Memory Leaks In Titanium apps

    Solution 1.Remove all the remove all not necessary event listener. 2.Remove all the SetInterval Function. Method for using Geolocation location Event Listener function LocationClass(parent) { this.Parent = parent; var thisClass = this; //Geolocation Setup Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_HIGH; Ti.Geolocation.distanceFilter = 10; Ti.Geolocation.preferredProvider = Ti.…

    Titanium, Memory Leaks, EventListener, Geolocation, removeEventListener

  5. JavaScript CallBack

    ComponentOne.js function ComponentOneClass(parent) { this.Parent = parent; var thisClass = this; //Properties this.responseCallback = null; }; ComponentOneClass.prototype.ProcessAction = function(theValue) { if(theValue){ this.responseCallback("Callback return"); }else{ Ti.API.log("Get Error"); }; }; ComponentOneClass.prototype.CallOtherMethod = function(theValue,theCallback) { this.responseCallback = theCallback; theProcess = this.ProcessAction(theValue); }; //finally, export the module module.…

    mobile, JavaScript, Titanium, CallBack