[TIMOB-8940] Android: Unable to open google street view intent
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-05-09T16:10:18.000+0000 |
Affected Version/s | Release 1.8.2, Release 2.0.1 |
Fix Version/s | n/a |
Components | Android |
Labels | SupportTeam, api |
Reporter | Nikhil Sharma |
Assignee | Josh Roesslein |
Created | 2012-04-30T22:14:54.000+0000 |
Updated | 2017-03-09T23:27:57.000+0000 |
Description
Unable to open google streetview intent. I'm getting an error "Uncaught Error: No activity found to handle Intent".
Repro Steps
1. Run the below code in the app.js 2. Click the open button to open the intent and you will get the runtime error.
var win = Ti.UI.createWindow({
backgroundColor: '#ffffff',
navBarHidden: true
});
var button = Ti.UI.createButton({
title: "Open",
width: 200,
height: 40
});
button.addEventListener('click', function() {
var intent = Ti.Android.createIntent({
action: Ti.Android.ACTION_VIEW,
type: "google.streetview:cbll=30.427583,-91.137857&cbp=1,90,,0,1.0&mz=mapZoom"
});
intent.addCategory(Ti.Android.CATEGORY_DEFAULT);
Ti.Android.currentActivity.startActivity(intent);
})
win.add(button);
win.open();
Please find the screenshot and error logs attached.
Attachments
File | Date | Size |
---|---|---|
error_log.rtf | 2012-04-30T22:14:54.000+0000 | 7180 |
Intent_error.png | 2012-04-30T22:14:54.000+0000 | 28420 |
Use "data" instead of "type" when creating the intent. Example:
Ran test case with this change and was able to get street view activity to appear fine.
Closing as invalid since the issue was caused by an error in the application code and not a platform bug.
Closing ticket as invalid.