{ "id": "92891", "key": "TIMOB-9416", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "13418", "description": "Sprint 2012-13 Core", "name": "Sprint 2012-13 Core", "archived": true, "released": true, "releaseDate": "2012-07-01" }, { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-06T10:11:37.000+0000", "created": "2012-06-06T10:23:24.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "core", "qe-port" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "18265", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "94334", "key": "TIMOB-9863", "fields": { "summary": "Android: Custom url doesn't open the app on 3.x+ devices", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-12-03T21:44:10.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h4. Problem Description \r\nCustomer wants to registrate his own url in android, so he can open the app with something like this://is.sparta from the browser in android. We got a really nice recipe on this, but it's not working anymore. \r\n\r\nh4. Actual Results\r\nThe custom url is not registered.\r\n\r\nh4. Expected Results\r\nThe custom url should work nice.\r\n\r\nh4. Test case:\r\n1. Create mobile project.\r\n2. Add this to the app.js:\r\n{code}\r\nvar win = Ti.UI.createWindow({ backgroundColor: '#fff' });\r\nwin.add(Ti.UI.createLabel({ text: 'Type http://www.appcelerator.com in a browser, and this app will get launched. Try it!' }));\r\nwin.open();\r\n{code}\r\n3. Add this to launchFromURL.js:\r\n{code}\r\nvar activity = Ti.Android.currentActivity;\r\nvar win = Ti.UI.currentWindow;\r\n\r\nactivity.addEventListener(\"create\", function(e) {\r\n win.add(Ti.UI.createButton({title: 'Our app was launched when you typed http://www.appcelerator.com!'}));\r\n});\r\n{code}\r\n4. Add this to the tiapp.xml\r\n{code}\r\n \r\n \t \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n{code}\r\n\r\nh4. Extra info\r\nPart of our research was:\r\n\r\nGeneric for Android: http://stackoverflow.com/questions/3469908/make-a-link-in-the-android-browser-start-up-my-app/3472228\r\n\r\nFrom Dawson: https://gist.github.com/840600\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Can't create a custom url for the app ", "creator": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "environment": "Titanium SDK version: 2.0.1GA2\r\nJavascript Engine: V8 \r\nPlatform & version: Android 2.3, 3.2 \r\nDevice Details: Android emulator and Acer Iconia A500 \r\nHost Operating System: OSX 10.7.3 \r\nTitanium Studio version: 2.0.2", "comment": { "comments": [ { "id": "200953", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR Ready: https://github.com/appcelerator/titanium_mobile/pull/2492\r\n\r\nFor testing we will need to use a local web server. For some cases, the browser does not resolve \"http://www.appcelerator.com\" correctly if you type it directly into the url box. If you click on a link that is directly to 'http://appcelerator.com' then it always works correctly. This is native android behavior and we don't do anything on the titanium end:\r\n\r\n1. Run an app with the code sample above\r\n2. On a Mac: create a test.html file under ~/Sites/test.html\r\n3. Add the following in test.html:\r\n{code}\r\n\r\n\r\n\r\nclick me!\r\n\r\n\r\n{code}\r\n4. Under system preferences > sharing, check off \"web sharing\"\r\n5. Once you have done this, there should a url for your site, something like: http://192.168.1.104/~your_username/\r\n6. On your phone, connect to the same wifi network as your laptop, and type http://192.168.1.104/~your_username/test\r\n7. Click on the \"click me\" link\r\n8. It should prompt you to open either a browser or your app. Choose to open with your app.\r\n\r\nExpected Result:\r\nYour app should open with a button with the success message\r\n\r\nActual Result:\r\nCurrently, the app will open with a runtime error", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-29T15:21:07.000+0000", "updated": "2012-07-02T15:17:39.000+0000" }, { "id": "201512", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Thanks! Tested this on my environment and worked fine!\r\n\r\nBest,\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-07-04T12:11:30.000+0000", "updated": "2012-07-04T12:11:30.000+0000" }, { "id": "208012", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Environment used for verification -\r\nTested with Titanium SDK: 2.1.1.v20120716180600\r\nTested with Titanium  Studio: 2.1.1.201207161421\r\nDevice - Android 2.2.2 LG-P970 \r\nMachine OS - MAC 10.7.3", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-17T04:58:08.000+0000", "updated": "2012-07-17T04:58:08.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }