appcelerator

LED & Camera always ON

主宰稳场 提交于 2019-12-12 00:01:57
问题 I'm trying to open the device camera an activate immediately the LED light of that device (android/iOS). I've tried the appcelerator ti.media events but didn't work, neither this module: Ti.Light. Found this on this link activate-iphone-4-led-light Hey guys! For the flash stuff you have to check the property: Ti.Media.cameraFlashMode (case sensitive) To change it you can use Ti.Media.setCameraFlashMode(PARAM) . PARAM could be: Ti.Media.CAMERA_FLASH_OFF , Ti.Media.CAMERA_FLASH_ON, Ti.Media

how to redirect from one page to tab in another page in titanium?

落花浮王杯 提交于 2019-12-11 23:14:46
问题 I have two pages in my application. The first page has a tab group with three tabs. Now on click of button in second page, I need to redirect my control to first tab 2 in my first page. How can I do that. My code is as follows, <Alloy> <TabGroup id="myTabGrp"> //Tabgroup Added <Tab id="one"> <Window class="container"> <Label>This is the Home View</Label> </Window> </Tab> <Tab id="two"> <Window class="container" id="winTwo"> <Label>This is the second View</Label> </Window> </Tab> <Tab id=

Appcelerator Titanium Alloy: How to store data on a ScrollableView to use in click event

廉价感情. 提交于 2019-12-11 21:51:44
问题 I have a ScrollableView, which has some images and labels inside each child view. However, I would like to store a ID value for each item, so that I can use it inside an onClick event. This ID could the be used to query the database or open up a new controller the value passed in. I thought about adding an attribute on the view, to store my ID, like so <ScrollableView dataCollection="videos" id="mainCarousel"> <View onClick="carouselItemClick" itemID="{the_id}"> <ImageView image="{episode_img

Disable the default actionbar on titanium sdk 3.5.0GA

百般思念 提交于 2019-12-11 19:33:11
问题 I updated my Titanium sdk to 3.5.0GA, but there exits a default action bar on every window on Android. Can anyone please tell me how to permanently disable this default action bar? Thanks in advance. 回答1: Define the settings for your custom theme, for example, your theme at /platform/android/res/values/customtheme.xml like < ?xml version="1.0" encoding="utf-8"?> <resources> <style name="Theme.NoActionBar" parent="@style/Theme.AppCompat"> <item name="windowActionBar">false</item> <item name=

Ti.App.fireEvent not working; error Uncaught TypeError: Cannot read property 'App' of undefined

大兔子大兔子 提交于 2019-12-11 18:08:49
问题 I have a simple Titanium app which opens a webview, and loads a URL. I want the links to open in the default browser, not the app. I have some jQuery code which adds a click event to all links in the page. <script> jQuery('a').click(function() { console.log("Handler for .click() called for URL: " + this.href); Ti.App.fireEvent('ynOpenURL', {url: this.href }); }); In the app.js file I have: var win = Ti.UI.createWindow(); var mywebview = Ti.UI.createWebView({ url : 'http://xxxx.xxxxx.com/',

i am unable to apply “Theme.AppCompat.NoTitleBar” and “colorPrimaryDark” status bar color property at the same time

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 17:42:44
问题 I want to hide the action bar throughout the application and also want to set the status bar color? in Appcelerator titanium. 回答1: Please follow the official guide at https://wiki.appcelerator.org/display/guides2/Android+Action+Bar You can either hide it in code win.activity.actionBar.hide(); in the open event and use a normal style in the theme xml or you set your parent in the theme to <style name="Theme.MyTheme" parent="Theme.AppCompat.NoTitleBar"> . Statusbar color is a theme item: <item

Setting Minimum iOS Version number in Titanium Studio

冷暖自知 提交于 2019-12-11 14:54:07
问题 How can we set minimum iOS version in Appcelerator Titanium Studio from default 4.3 ? 回答1: Add following setting to the tiapp.xml . Make sure to change 6.1 to whatever minimum iOS version you want to build your app for. <ios> <min-ios-ver>6.1</min-ios-ver> </ios> builder.py looks at this value to decide what minimum version to build the project with. You can find builder.py at following location: ~/Library/Application Support/Titanium/mobilesdk/osx/<Titanium-SDK-Version>/iphone/builder.py Don

Titanium sqlite ORDER BY statement

十年热恋 提交于 2019-12-11 14:19:19
问题 Using Titanium appcelerator. How can i sort my database with an sql query which is activated on a button click. my code so far is: SortButton.addEventListener('click',function(e){ sortList(); }); function sortList() { db.execute("SELECT * FROM SavedList ORDER BY SavedListed ASC"); } 回答1: Your code : db.execute("SELECT * FROM SavedList ORDER BY SavedListed ASC"); is correct. Just open database before db.execute and close it after db.execute. It will work. To open database : var db = Ti

Appcelerator on Windows: No valid Android SDK Targets Found

谁都会走 提交于 2019-12-11 13:28:52
问题 I'm trying to run an app on my Samsung Galaxy S6 installed with Marshmallow 6.0 in Appcelerator. I have downloaded Android Studio and used the SDK Manager to download the SDK for the OS. However, when trying to run my code, the console outputs these errors: [ERROR] : No valid Android SDK targets found. [ERROR] : Please download an Android SDK target API level 23 or newer from the Android SDK Manager. I tried uninstalling the API level 23 for Marshmallow 6.0 and reinstalling it directly

Track App Version in Google Analytics

瘦欲@ 提交于 2019-12-11 12:47:23
问题 I am using Google Analytics module( https://marketplace.appcelerator.com/apps/5081?2014113336 ) in my Titanium App. 1). Is there any way to track my app version to Google Analytics. In that module documentation no information regarding this. 2). How can I test Google Analytics in my app? After integrating GA, I didn't see any data on my GA account. (even realtime data also empty https://www.google.com/analytics/web/#realtime ) 3). When creating new Account in Google Analytics, which one