titanium-mobile

titanium studio push notifications closing the app

ε祈祈猫儿з 提交于 2019-12-12 01:51:57
问题 I am trying to show push notifications in android app, developed by titanium studio, my getting alert with unfortunately app is closed after this my is clossing, my code is try { CloudPush.retrieveDeviceToken({ success : function deviceTokenSuccess(e) { deviceID = e.deviceToken; Ti.API.info(deviceID); Ti.App.Properties.setString('deviceid', '' + deviceID); }, error : function deviceTokenError(e) { alert('Failed to register for push! ' + e.error); } }); } catch(e) { alert('Error :', e); } //

Error “You may need to install the Command Line Tools package through XCode” when package titanium modul?

喜你入骨 提交于 2019-12-12 01:33:11
问题 Does anyone know how to package Titanium module for Android? Every time I try to package the Titanium module, it give me an error. Here's my log output: Executing build.xml... /Library/Application Support/Titanium/mobilesdk/osx/2.1.4.GA/module/android/build.xml:362: The following error occurred while executing this line: /Library/Application Support/Titanium/mobilesdk/osx/2.1.4.GA/module/android/build.xml:317: exec returned: 2You may need to install the Command Line Tools package through

Update password field from Titanium application

☆樱花仙子☆ 提交于 2019-12-12 01:32:41
问题 I'm working on a Titanium based iOS application. In which I need to implement the password reset functionality within my app. I found this requestResetPassword method for doing this: Cloud.Users.requestResetPassword({ email: 'me@mycompany.com' }, function (e) { if (e.success) { alert('Success: Reset Request Sent'); } else { alert('Error:\\n' + ((e.error && e.message) || JSON.stringify(e))); } }); From docs it says that, it'll send a reset password option to user's mail account. But I don't

Equivalent of .iOS.createNavigationWindow in Android?

徘徊边缘 提交于 2019-12-12 01:09:10
问题 I am developed an app for iOS using Titanium . Now my idea is to try to port it to android devices. I am finding lots of errors which I am solving as I go, but I don't seem to find the solution to this one. My app for iOS uses createNavigationWindow to navigate through the whole app. Android don't like that command as it tells me it is undefined. I been looking for an Android version of createNavigationWindow but can't find it. Any tip in the right direction will be really appreciated.

how to get x and y coordinates of user tap/touch relative to window - android titanium mobile?

可紊 提交于 2019-12-11 23:54:49
问题 Can any one tell how to get x and y coordinates of user tap/touch relative to window - android titanium mobile?? I need to add a popup view close to tableviewrow when the user select a row. How to determine the x,y (top/left) positions? 回答1: you can use row.addEventListener('click',function(e){ alert('left:'+ e.x + ' top:'+ e.y); }); where row is an object of Titanium.UI.TableViewRow. For other objects (like window/view), you can use same eventlistener. But remember one thing: it gives the co

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=

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=

Tiianium studio 3.2.0 Project intallation issue on Device

拈花ヽ惹草 提交于 2019-12-11 19:11:15
问题 I am using titanium studio or sdk 3.2.0, my app is running on ios 6 and also 7 devices, but not running on ios 5 device. How can i fix it? And also i want to know how to set deployment target and mini sdk version in my project? 回答1: Note that support for iOS 5.x and earlier was removed in Release 3.2.0. You can find this document and other useful information in the appcelerator migration guide. In order to support iOS5, you would have to compile with an older Version of the SDK, you can find

Error converting NSString to UTF8String

点点圈 提交于 2019-12-11 18:59:34
问题 -(id)select:(NSString *)original_query { sqlite3_stmt *statement; const char * converted = [original_query UTF8String]; NSLog(@"[INFO] converted char = %@", converted); if (sqlite3_prepare_v2(db, converted, -1, &statement, NULL) != SQLITE_OK) { @throw [NSException exceptionWithName: @"DB Encriptor" reason: [NSString stringWithFormat: @"Query \"%s\" has failed, we could not execute the SQL statement. '%s'", converted, sqlite3_errmsg(db) ] userInfo: nil]; } else { @try { ... } @catch

Issue with label alignment in titanium alloy

我与影子孤独终老i 提交于 2019-12-11 18:45:49
问题 I have created custom check boxes in my application. I have no issue with check box and it's label if the label text is small. If the label text is large (more than a one line) the alignment is not showing properly. Look at the above screenshot: the first option label text is "Please select the 2 primary reasons rating the program testing the program" and second option label text is "Question2". If the text in first label is small that is which fits in one line then the UI looks good. But If