Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8940] Android: Unable to open google street view intent

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2012-05-09T16:10:18.000+0000
Affected Version/sRelease 1.8.2, Release 2.0.1
Fix Version/sn/a
ComponentsAndroid
LabelsSupportTeam, api
ReporterNikhil Sharma
AssigneeJosh Roesslein
Created2012-04-30T22:14:54.000+0000
Updated2017-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

FileDateSize
error_log.rtf2012-04-30T22:14:54.000+00007180
Intent_error.png2012-04-30T22:14:54.000+000028420

Comments

  1. Josh Roesslein 2012-05-07

    Use "data" instead of "type" when creating the intent. Example:
       var intent = Ti.Android.createIntent({
         action: Ti.Android.ACTION_VIEW,
         data: "google.streetview:cbll=30.427583,-91.137857&cbp=1,90,,0,1.0&mz=mapZoom"
       });
       
    Ran test case with this change and was able to get street view activity to appear fine.
  2. Josh Roesslein 2012-05-09

    Closing as invalid since the issue was caused by an error in the application code and not a platform bug.
  3. Lee Morris 2017-03-09

    Closing ticket as invalid.

JSON Source