Community Questions & Answers
Android module: Unable to find explicit activity
I'm developing an Android module that just needs to start a new activity like so: ~~~ @Kroll.method public void doIt() { final Context ctx = getActivity(); final Intent intent = new Intent(ctx,...
Android Module - Unable to find explicit activity class
I am trying to use a piece of code from a native java android app as a module in my project, but cannot seem to get it working. First off I have to confess to being no java programmer, but have done a lot of googling and searching of the Q&A. I am...
imageview placeholder
i have images which loads url . i want to display the alternative text if image is not available .. also i want to show the indicator in imageview which hides automatically when image download from the server .. any help?
What is this? Fatal signal 11 (SIGSEGV)
I am discovering a very strange behavior on Android. I basically have an Window containing a ScrollView with an login form. Hitting the login button calls function to request my application server. What has worked before, is showing an alert when login...
HeavyWeight Window Vs. Android Activity problem
I want to create a new window after click a button. So I have: ~~~ var win1 = Titanium.UI.currentWindow; var btn = Titanium.UI.createButton({...}); btn.setEventListener('click', function() { var win2 = Titanium.UI.createWindow({ url: ..., }); ...
Recording video. questions...
I am making some application for android and i wanted to know can i record video not switching to camera activity, i want to record from my current one. And second question is, can i somehow pause recording or something similar. I did research and i found...
Android Activity doesn't trigger Pause event
Hi, I'm developing an app for Android in Appcelerator, but am trying to execute a function when the app loses focus and is pushed into the background. I've tried using the `Titanium.Android.currentActivity`'s 'pause' event, but it doesn't seem to...
Application (Activity) resume event on Android
Any suggestions how you catch the resume of an application on Android? I tried setting the following event in my app.js: Ti.Android.currentActivity.resume but it didn't trigger when I went out to another application then brought my application back to...
Default Activity Indicator for webview shows on left of screen and is cut off
On the app I'm working on, whenever I load up a webview and the page is loading, the activity indicator can be seen on the left side of the screen, and is cut off in the middle (so half of it isn't visible). It seems like the activity indicator is working...
Activity Indicatior WebView
Hi all, I was just wondering if it is possible to display activity indicator before the a remote page loads onto a webview? my code so far has been ~~~ var webview = Titanium.UI.createWebView({ url: Titanium.UI.currentWindow.param,backgroundColor:'#000'...
How to catch "newIntent" event in tabGroup activity (on Android)?
This is driving me nuts for days. I have an android service that sends status bar notifications. When a user clicks the notification the app should open (its still running in background) and I want to catch a newIntent event. Without tabGroup, with just a...
How would you manage Android pause (home button click) and intervals?
Hello, I am trying to solve my last big hurdle in getting my app finished for the Android. In my app I have 3 intervals that simply poll my server for any data updates. As you know, when the app is exited, all the activities as well as the intervals all...
Bluetooth Activity - No Activity found to handle Intent
Hello everyone, I've started diving into developing a Bluetooth Android module for Titanium. I've got the device to tell me if Bluetooth is enabled or not but now I'm having some trouble creating the little dialog box that will allow them to enable...
Android Background Streaming Audio
I have found two issues with background audio streaming on Android devices. First, when the user receives a phone call -- the background audio continues to play. Anyone know a way to disable background streaming while on a phone call? Also, I noticed that...
Android TabGroup activity pause/resume
I'm not succeeding in getting the activity pause/resume events for a tab group nor for its windows. Testing on Kitchen Sink 3.0, I'm adding the following in ApplicationTabGroup.js inside the existing TabGroup `open` event handler: ~~~ if (Ti.Platform.name...
set exitOnClose application not exit real
app.js: ~~~ var win1 = Ti.UI.createWindow({ backgroundColor : 'red', exitOnClose : true, fullscreen : false }); win1.open(); ~~~ when touch android back key to home screen, but the Settings -> Applications -> Manage applications show the...
How can ActivityIndicator run some functions and the close?
HI, I'm trying to create an activity indicator that executes some functions in the background and then closes automatically. The problem I face is that the activity indicator closes before completion because the functions are called asynchronously. When...
Android - Window Activity Destruction
My environment: - **Ti SDK**: 2.1.2 (08/24/12 14:46 ed7f777) - **Platform**: Android 2.3.4 - **Device**: Something from HTC - **Titanium Studio**: 2.1.2.201208301612 I have the following code in my application for getting to the bottom of an issue...
Activity indicator
Hello I'm wondering, why is it that an activity indicator sometimes doesn't show up? Is this just in my application, or does anyone else have this problem too. Even when I put width:'auto', it doesn't show up. I have to put a timeout around the...
Get data from pending intent to launch detail window in app
I've been trying to find any examples that create an intent with data (such as an ID) so when it's touched in the notification drawer it opens my app (which works) and then loads the correct screen. I'm attaching an ID using `intent.putExtra('the_id',...
intercept calling url in android webview
my problem is to intercept a called url from a webview. if the url end with #plugin or #iframe i will open the url inside the calling webview, otherwise i will open the browser. to do this i modified the Titanium sdk (android) adding this lines in the...
Activity onResult not called
Hi, I have a native android module that presents a view. The custom module's view calls another activity B from within itself. I want to capture the event when activity B finishes. I've tried a few things and they don't seem to work. How do I accomplish...
Bring running Android app from background to foreground without notification?
In Android, when I press Home button, my app is still running normally (though I know it can be killed by OS if needed -- but that's OK). I would like to, based on a certain condition, bring the app back to foreground. I have found how to do this via...
Open Email App in Android
I want to open email app from my Titanium app. I know this is posible in Titanium using Android Intent. ~~~ var intent = Ti.Android.createIntent({ action: Ti.Android.ACTION_SEND, type: "plain/text" ...
Navigation Controller module and activity lifecycle
I found a situation about using navigation controller, Here's my sample codes app.js ~~~ var NavigationController = require('NavigationController').NavigationController; var navigationController = new NavigationController(); var isAndroid =...
Android - How to add a different menu to each tab?
As the documentation says, each window created inside a TabGroup is a heavyweight window. Although, I tried to add different menu entries to each window, but the menu in every tab is the same as the first tab opened... as if they where the same...
Android currentActivity not updated when resuming app using different action!
Hello, I'm writing an app, which will require registration and email confirmation. In the confirmation email, there will be a link, which will open up the app again and fill out some forms. In order to achieve this, I have to have two intent filters like...
Android Activity onNewIntent
Is it planned to implement a callback for onNewIntent in an Android Activity?
Gcm or C2DM application launch problem.
Hi, I am developing small android application in which I want to integrate GCM. I used one module for it and its working fine. The only problem with it is when my application is open and if I click on notification it relaunch my application which I don't...
Unable to resume application after receiving Gcm Notification android.
Hi, I am developing small android application in which I want to include google cloud messaging. In my application I am able to get regid from server. Also when my application is running I am able to receive the message from my server. Now my...
Activity - how to pass a constant to startActivityForResult
I'm looking at the [Android documentation](http://developer.android.com/guide/topics/connectivity/bluetooth.html) to start a request to enable Bluetooth and it gives me this: ~~~ startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT); ~~~ But the...
Which titanium components create an activity ?
Hi, I would like to make a list of the titanium components that create an activity. As far as I'm aware till now, heavyweight windows and tabgroups create and associate with an activity. Is there any other? I'm interested for android 2.3.x & 4.x
TiViedeoActivity not found
Hello, I've been using Titanium Studio and TiVideoActivity on Windows without a problem, using this code: ~~~ var movie =...
Android Activity Events (pause, resume) dont fire like the should, (but fine on the "root Activity")
Hi, im trying to use location updates. Everything works like it should, exceptly the Android Activity events im my Activity dont fire. I have tested the following. in the main app.js and in my ui.js added the eventlisters like :...
Android startActivityForResult callback not happening
I am trying to get the IntentCookbook sample app from Forging Titanium to work. Code here: https://github.com/appcelerator-developer-relations/Forging-Titanium/tree/master/ep-009/IntentCookbook Most exaples work fine, but when the...
re-bind to running service events
I have a service running in the background on Android and it keeps running constantly. When I launch application activity is binding to service events and that works ok. When the app is destroyed service keep running in the background . When activity is...
Activity indicator for streamed video
Hi, I need some sort of waiting sign(activity indicator) when opening a streamed video before it starts rather than blank screen. Is it possible?
How to show an activity indicator while loading video (from url)
I got some streaming videos in my application. But now it stays black while loading the video. (sometimes for a long time) How can I add an acitity indicator while the video is loading/buffering. I know there is Ti.UI.ActivityIndicator, but I've no idea...
onCreateOptionsMenu - solution
Hi guys, This is clearly not a question, but I wanted to post it as I have spent a long time trying to fgure it out and hopefully this will save someone some time if they are searching for a solution... I was trying to get onCreateOptionsMenu to work in...
Getting an Android notification to relaunch the application
I've got about as far as I think I can with the limited documentation and discussion on these topics. Strolling through the actual Android documentation is pretty complex so I'm hoping that through helping me solve this issue, I'll figure out how this all...
Video from android gallery.
I am trying to get video from android gallery by clicking on button and get reference from [this link](http://developer.appcelerator.com/question/19181/video-gallery) and implement it in to my code but I don't get any response and alert when gallery...
Picking the right colors for Android Activity menu icons
I have an android app with an activity menu (what gets shown when the hardware menu button is pressed). My issue is that the icons I am using look fine on Android 4+ since the background of the activity menu is a dark color. On android 2.3- the background...
Declaring android activities inside tiApp.xmo
Hi ALL, I am newbie in titanium studio.I am developing a mediaplayer application with lot more functionalities embedded in it.I have 8 screen in my application.I want to declare android activities inside the tiApp.xml file (like what we do in...
View can't be touched when finish custom activity
Titanium SDK: 2.0 Platform & version: Android 2.3 I create a custom module and a new activity in the module. In my module i execute my custom activity and finish it back to titanium view. But the can't be touch anymore. My activity: ~~~ @Override ...
Integrating 3rd party Android JAR into Titanium Mobile app?
Hey guys, I'm writing a Titanium app trying to play YouTube videos. The goal is to keep the user inside the app, so **calling the native youtube app, which I can do already, is out of the question.** I have code that works on iOS, but only because...
Third time posting this, Appcelerator please respond: Activity indicator on splash screen?
Sorry for posting this question yet again, really hoping for a response from Appcelerator. Previously posted question [here](https://developer.appcelerator.com/question/14831/activity-indicator-on-splash-screen-possible) and...
Intent extras stick around
So, in Android I'm using a C2DM module to stick some extras from a notification into my launching intent. When I receive a second notification, I clear those extras and put in the new ones, and launch again, and it works correctly. (This is because I...
android activity and heavyWeight windows!!!!
hi all, i have application on android from 4 windows , every window have long table with a lot off objects in every row so when i reach the second window the app going slow loading and some time crashes so , any idea to make peter performance , i read...
Use Activity in a Titanium Module
I want write a module that use TouchDB and start the listener.. In this module I write a method in this way: ~~~ public void example() { TiApplication appContext = TiApplication.getInstance(); Activity activity = appContext.getCurrentActivity(); ...
Open PDF files in Android
I m having a PDF file in my **applicationDataDirectory**, I am trying to open it using below code. But i am getting error **file not found** ~~~ try { Ti.Android.currentActivity.startActivity(Ti.Android.createIntent({ action:...