appcelerator-titanium

Layout challenge when using native date/time picker on Android 5.1.x

为君一笑 提交于 2020-01-06 18:55:11
问题 I have a kind of "catch 22" situation here. I am using Appcelerator Titatium SDK 5.1.2. On Android 5.1.x with a very small screen size I cannot find a solution to correctly select date and time using the native pickers. I need to add a <ScrollView> to allow the user to move the contents to make the picker entirely visible. However, when doing this on Android 5.1.x the user cannot scroll back to previous months in the date picker.... Changing it to a <View> control makes the date picker behave

Altbeacon Android - EnterRegion while app is killed (not background)

放肆的年华 提交于 2020-01-06 15:16:12
问题 I'm trying to listen to Beacons when the app is closed (killed) on Android (swiped off task manager). I'm using Appcelerator Titanium 5+ and for the beacons using the module https://github.com/dwk5123/android-altbeacon-module. The app works just fine when is on background, but not when you close it. I've tried the Altbeacon.setRunInService() method creating an app service on Titanium and it doesn't seem to work. I've also tried to modify the module to implement this http://altbeacon.github.io

fb.authorize() never give a login event

左心房为你撑大大i 提交于 2020-01-06 08:11:33
问题 I am using the code from the appcelerator docs like this: var fb = require('facebook'); fb.addEventListener('login', function(e) { Ti.API.info("Login event received..."); if (e.success) { alert('login from uid: '+e.uid+', name: '+ JSON.parse(e.data).name); } else if (e.cancelled) { // user cancelled alert('cancelled'); } else { alert(e.error); } }); Ti.API.info("fb authorize..."); fb.permissions = ['public_profile']; fb.initialize(); fb.authorize(); But the login event is never fired and

app will freeze if re-launch from the task bar after closing it using Titanium.Android.currentActivity.finish();

谁说我不能喝 提交于 2019-12-25 07:39:01
问题 anyone knows any workaround? We are closing the application by calling this line of code Titanium.Android.currentActivity.finish() when the user tap the back button(device back). Though the application will close completely, if the user tried to re-launch the app using the recent apps(task bar), the application will freeze that affects device performance. I created a new app, tested it and was able to replicate the issue. Anyone knows a work-around? Steps: 1. Create an app 2. Create a window

Titanium Alloy Controller Constructor doesn't exposer functions

妖精的绣舞 提交于 2019-12-25 07:17:11
问题 I am creating a row made from a widget dynamically from another controller. While I seem to have access to the views I cannot access the exported functions. Here is the controller code for the widget. var moment = require("/lib/moment-with-locales"); var args = $.args; var isSent = true; function configure(data){ $.userImage.image = data.otherUser.attributes["avatar-thumb-url"]; $.userNameLabel.text = Alloy.Globals.getFormattedName(data.otherUser.attributes["first-name"], data.otherUser

Titanium Alloy Controller Constructor doesn't exposer functions

狂风中的少年 提交于 2019-12-25 07:16:00
问题 I am creating a row made from a widget dynamically from another controller. While I seem to have access to the views I cannot access the exported functions. Here is the controller code for the widget. var moment = require("/lib/moment-with-locales"); var args = $.args; var isSent = true; function configure(data){ $.userImage.image = data.otherUser.attributes["avatar-thumb-url"]; $.userNameLabel.text = Alloy.Globals.getFormattedName(data.otherUser.attributes["first-name"], data.otherUser

titanium InAppBilling queryInventory return error code -1003 (InAppBilling.IAB_RESULT_VERIFICATION_FAILED)

僤鯓⒐⒋嵵緔 提交于 2019-12-25 01:22:27
问题 I'm using ti.inappbilling module for in-app billing on Android. I use titanium sdk 5.1.2 But when I call it's always returning an error: var InAppBilling = require("ti.inappbilling"); InAppBilling.queryInventory({}); InAppBilling.addEventListener('queryinventorycomplete', function(e) { if (e.success) { purchase = e.inventory.getPurchase(productID); }else{ Ti.API.error('queryinventorycomplete: ' + e.responseCode + " - " + responseString(e.responseCode)); } }); queryinventorycomplete: -1003 -

Appcelerator/ Titanium: Cannot send push notification to Android

折月煮酒 提交于 2019-12-25 00:04:04
问题 I want to be able to send push notifications using Titanium and Arrow Push on Android. I have followed the instructions here: Configuring Push Services Subscribing to push notifications Modules.CloudPush My simple code looks as follows: var CloudPush = require('ti.cloudpush'); var deviceToken = null; // Works fine CloudPush.retrieveDeviceToken({ success: function () { deviceToken = e.deviceToken; alert('deviceToken: ' + deviceToken); subscribeToChannel(); }, error: function () { alert('Failed

Appcelerator sidemenu redirect to another screen creating multiple screen

混江龙づ霸主 提交于 2019-12-24 13:38:21
问题 I am using this sidemenu module in my app. In sidemenu i have option like home, setting etc. When i click on setting, it redirect to setting page. Now problem is when setting page is opened and i open side menu using swipe and again click on setting then it will again open setting screen on previous one. Means it creating 2 setting screen. If i repeat it again then it will creating again setting scree. How do i prevent this? My code for screen redirection is here var win = Alloy

Why do I get invalid JSON payload when calling google cloud vision API from appcelerator?

爷,独闯天下 提交于 2019-12-24 12:48:34
问题 I was trying to use Google vision API v1 by Alloy Appcelerator I create a request HTTPClient and call API https://vision.googleapis.com/v1/images:annotate?key=MY_APP_KEY But i have get response text from google : { error = { code = 400; details = ( { "@type" = "type.googleapis.com/google.rpc.BadRequest"; fieldViolations = ({ description = "Invalid JSON payload received. Unknown name \"request\": Cannot bind query parameter. Field 'request' could not be found in request message."; }); } );