titanium-mobile

HTML Parser for Titanium Mobile

可紊 提交于 2020-01-02 18:38:21
问题 I'm looking for easy to implement module (or a function) for Appcelerator Titanium Mobile that could parse html code (stripping unneeded tags and cleaning up the code) and spitting out just the content. I know there's an option to use webview in mobile development, but it would add additional overhead, consuming device resources and slowing down your application. so it is not an option. I also found this post on official appcelerator forum: http://developer.appcelerator.com/question/60731

How do you create a raised tab bar item, like the one found in Instagram, with Titanium?

♀尐吖头ヾ 提交于 2020-01-01 06:51:08
问题 I am trying to create a menu like the one on Instragram, with the central item using a special design, but the Titanium Documentation does not provide information about this kind of feature There's an example with an already answered question in here: How do you create a raised tab bar item, like is found in Instagram? but I need it working on titanium, any clues? 回答1: I believe Instagram is written in Objective-C. Creating a custom tab bar as they have made involves subclassing the native

How do I tell if the app was opened or resumed as a result of a push notification in Titanium?

假如想象 提交于 2020-01-01 05:38:06
问题 How do you handle a push differently in Titanium depending on whether the app was open at the time the push arrived? When a push notification comes in and my app is running, I would like to pop up a message offering to take the user to the item the notification refers to. If the app is closed, and the user taps on the push notice and causes the app to open, I would like to take the user directly to the item without a popup. Titanium's registerForPushNotifications seems to only have one

android:back (device back button) event in Titanium not working

牧云@^-^@ 提交于 2020-01-01 03:16:09
问题 Hi i am working on android application development.I am using Titanium studio for development. I create a simple application.I want to capture the device back button event in my application because I don't want to user android default tabs in titanium.I am creating my own tabs.I tried following code : :list.js var expt = Titanium.UI.currentWindow; expt.addEventListener('android:back', function (e) { Ti.App.fireEvent('expt_back_event'); }); :app.js Ti.App.addEventListener('expt_back_event'

How to bind the data in to label in Titanium alloy?

隐身守侯 提交于 2019-12-25 09:28:52
问题 How can I bind data from controller to xml, My code is as follows, View: <Collection src="respondentAge"/> <Label id="question"></Label> Styles ".question":{ font:{ fontSize:18, fontWeight:'normal' }, color:"#000", left:10, height:Ti.UI.SIZE } Controller var agenames = Alloy.Collections.respondentAge; agenames.on("reset", function() { var agenamesLength = agenames.length; var question; for (var i = 0; i < agenamesLength; i++) { question = agenames.at(i).get("quesion"); // I need to bind the

Titanium Mobile - PhotoGallery - Success callback - event property - media.file returns null

允我心安 提交于 2019-12-25 07:58:40
问题 Titanium SDK: 2.1.1, Host OS: Mac OS X 10.6.8, Mobile platform: iOS 5 I am un-able to access some properties of 'Blob' object returned by Titanium.Media.openPhotoGallery's success callback. The properties un-accessible are 'file' and 'nativePath', however I can access properties like 'height', 'width' and 'mimeType'. I'm testing on simulator. Here is what I coded so far. Titanium.Media.openPhotoGallery({ success : function(event) { var image = event.media; if (event.mediaType == Ti.Media

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

How to create pdf file of the webview content in titanium

吃可爱长大的小学妹 提交于 2019-12-25 05:25:17
问题 I am new to Titanium. I have a webview . The content of the webview can be a pdf file, or a url . I want to save the webview content as a pdf file. I have created webview using the below code: var webViews = Ti.UI.createWebView({ left : 0, top : 0, right : 0, bottom : 0, url : 'http://www.appcelerator.com' }); Please anyone help me out... 回答1: You cant directly convert the webview data in pdf but you have to first parse html and then use the js pdf to create the pdf.Here is the code with

Titanium app not working, by keeping modal property for window

痴心易碎 提交于 2019-12-25 02:47:37
问题 In my android app, developing by Titanium Studio 3.1.3 SDK, I am trying to get push notifications. My code is in app.js var Cloud = require('ti.cloud'); Cloud.debug = true; var CloudPush = require('ti.cloudpush'); CloudPush.debug = true; CloudPush.enabled = true; CloudPush.showTrayNotificationsWhenFocused = true; CloudPush.focusAppOnPush = false; try { CloudPush.retrieveDeviceToken({ success : function deviceTokenSuccess(e) { deviceID = e.deviceToken; Ti.App.Properties.setString('deviceid', '

Add event listener to links loaded in webview? (Titanium Mobile)

寵の児 提交于 2019-12-25 02:28:52
问题 I am working on a sample app using titanium. I have created a webview and loaded a local html as shown below var webview = Ti.UI.createWebView({ borderWidth:0, paddingRight:10,width:310,top:25, height:210,left:5 }); webview.html = '<div><a href="http://google.com" id="ggle"></a></div>' is it possible for me to add event listener for the anchor tag specified in the html? if so how? if not please suggest me anyother possible solution. thanks. 回答1: Yes you can add your custom event like this: