Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2943] Ti.Platform.openURL doesn't work on Android

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2012-07-03T12:10:09.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
LabelsAndroid, openUrl
ReporterTobias Reike
AssigneeMostafizur Rahman
Created2012-06-20T02:48:36.000+0000
Updated2016-03-08T07:47:56.000+0000

Description

When using Ti.Platform.openURL on Android (seen only on compiled-for-production apps, don't know for apps in dev), no matter if it's http://www.somewebsite.com or tel:01234566789 on Android an exception is thrown: Runtime Error Message: Uncaught Error: Java Exception occured Source: c.addEventListener("click", function(){ Ti.Platform.openUrl("h... It's working again in 2.1.0, but in 2.1.0 there are some opacity issues, so not yet usable.

Comments

  1. Anirudh Nagesh 2012-06-29

    Tobias, Could you please provide the code snippet you are using!? I recently tested this feature on Android and its working fine.. Regards, Anirudh
  2. Tobias Reike 2012-07-03

    Tried it again with a clean app, this time not getting the error. Don't know why I did get this exception. Sorry about that.
  3. Anirudh Nagesh 2012-07-03

    Feature working fine.
  4. sourabh kaley 2012-12-21

    This works fine with android emulator but fails to perform on iPhone
  5. Mostafizur Rahman 2013-12-29

    This is not reproducible anymore with latest 3.2.0GA release.

    Testing Environment:

    MAC OS X 10.8.5 Android SDK: 4.2.2 Titanium SDK: 3.2.0.GA Titanium CLI Version: 3.2.0

    Test Code

       var win = Ti.UI.createWindow({
       		title : 'URL TEST',
       		navBarHidden : false
       	});
        
       	// Create a Button.
       	var go = Ti.UI.createButton({
       		title : 'URL TEST',
       		height : Ti.UI.SIZE,
       		width : Ti.UI.SIZE,
       		top : 10,
        
       	});
        
       	// Listen for click events.
       	go.addEventListener('click', function() {
        
       		Ti.Platform.openURL("http://www.google.com");
        
       	});
        
       	win.add(go);
       	win.open();
       
       

    Steps to Test:

    1. Create a sample project, 2. Paste this code in app.js file. 3. Run this with testing environment. 4. Click on URL test button
  6. Shak Hossain 2013-12-29

    Closing since it is not reproducible anymore.

JSON Source