appcelerator

Call location coordinates from outside the function

蓝咒 提交于 2020-01-06 23:47:58
问题 I'm try to access the lat and long from getCurrentPosition so that I can create a URL to use with an API. This is working if you call it from within the function or if you set a timeout on an alert(outside the function), as the current position takes a few moments to determine the coordinates. How can I access coords variables and/or the URL one? Thank you var coords1; var coords2; if (Ti.Geolocation.locationServicesEnabled) { Titanium.Geolocation.purpose = 'Get Current Location'; Titanium

Select dynamically generated element by id in Titanium Appcelerator

六月ゝ 毕业季﹏ 提交于 2020-01-06 20:02:08
问题 I am working with the latest Tianium Appcelerator and my project is using Alloy. I have a TableView with the id: tblResults In my controller, I populate this table view with rows like this: // Dummy data var results = []; results.push({ title: 'Hello World', value: '123456' }); results.push({ title: 'Bye World', value: '654321' }); // Build result data var resultData = []; for (var i = 0; i < results.length; i++) { resultData.push(createResultRow( results[i].title, results[i].value )); } //

Get network operator name in Appcelerator Titanium

人盡茶涼 提交于 2020-01-06 19:57:32
问题 I am looking to get the name of the operator for the user's Android device. E.g. "Verizon" or "Vodafone", I think I have found the Android equivalent documented here called getSimOperatorName() from http://developer.android.com/reference/android/telephony/TelephonyManager.html#getNetworkOperatorName() I am scanning over the documentation for Appcelerator Titanium, but can't seem to find a way of doing this in the docs (http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Network). Is

Ti.App.fireEvent - Reference error Ti is not defined

╄→гoц情女王★ 提交于 2020-01-06 19:17:22
问题 I have this simple Titanium js script. app.js var win = Ti.UI.createWindow(); var webview = Ti.UI.createWebView({ url: 'logging.html' }); webview.addEventListener('help',function(){ alert('help'); }); win.add(webview); win.open(); logging.html <html> <body> <a onclick="Ti.App.fireEvent('help')">Help</a> </body> </html> when I click on the Help link, the console gives me Reference Error: Ti is not defined . I also tried changing Ti with Titanium, but same error. ------------- EDIT ----------

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

Appcelerator studio: how to set logging level to trace?

青春壹個敷衍的年華 提交于 2020-01-06 04:08:09
问题 How to set logging level in the Appcelerator Studio to show trace messages (posted by Ti.API.trace()) in the console? version of the studio is 4.4.0.201511241829 Thanks! 回答1: In Studio, you can change the log level on the Console Window as seen below 回答2: Change your Run Config to run as trace instead info 来源: https://stackoverflow.com/questions/34794220/appcelerator-studio-how-to-set-logging-level-to-trace

appcelerator module for existing ios project sdk

断了今生、忘了曾经 提交于 2020-01-06 02:21:06
问题 I want to use into my titanium project the functionalities provided by an existing sdk (deezer sdk). I know I must deal with modules , so I found a lot of tutorials that explain well how to create a titanium module from scratch. But I didn't find something about to explain how to "wrap" an existing ios project within a titanium module. I just need the login/signup functionality and to retrieve the logged user (functionalities provided by the deezer ios sdk, of course). can anybody help me on

Hyperloop compilation error

耗尽温柔 提交于 2020-01-04 05:42:05
问题 I've written before about a problem running Hyperloop project. If run a newly created project to witch I added Hyperloop from Appcelerator Studio it seems like compilation is stuck on: [INFO] Starting Hyperloop assembly [INFO] Skipping Hyperloop compile, no usage found ... So what I did now is to run it from command line using: HyperloopApp ophir$ appc run -p ios And right after Skipping Hyperloop compile, no usage found ... I get the following error messages: /Users/ophir/Documents

Can't run Hyperloop project

人盡茶涼 提交于 2020-01-04 02:45:06
问题 I've downloaded the latest SDK from master as explained here: http://builds.appcelerator.com/#master I've also downloaded the latest Hyperloop from here http://labs.appcelerator.com/project/55f74a9f421c44837717716b/Hyperloop-Module and followed the instructions in the PDF file. I created a new Alloy project, in tiapp.xml I've created the plugin and module and ran my empty project. it didn't seem to complete compilation. it is stuck on: [INFO] : Alloy compiler completed successfully [WARN] :

Appcelerator Titanium Android background location service

廉价感情. 提交于 2020-01-01 03:37:07
问题 I am trying to make an app , where if the user enters a particular region, he will get an alert. And that will work even if the app is in background. I found Ti.App.iOS.backgroundService to do that for iphone but how to start the background service in android and how to present local notification kind thing when particular latitude and longitude is found. so basically my questions are :- background location service in android android equivalent for localnotification 回答1: For background geo on