Android Question intent = Intent.getIntent

little3399

Active Member
Licensed User
Hi, Erel

How does I can using the command in B4A , intent = Intent.getIntent ... Tks!

this command ... was is Baidu Map ... http://developer.baidu.com/map/index.php?title=uri/api/android


//调起百度地图客户端(Android)展示上海市"28"路公交车的检索结果
intent = Intent.getIntent("intent://map/line?coordtype=&zoom=&region=上海&name=28&src=yourCompanyName|yourAppName#Intent;scheme=bdapp;package=com.baidu.BaiduMap;end");
startActivity(intent); //启动调用


or in this method

Intent intent = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.parse("geo:39.922840,116.3543240,北京市西城区阜外大街2号万通大厦");
intent.setData(uri);
intent.setPackage("com.baidu.BaiduMap");
this.startActivity(intent);
 
Last edited:

ivan.tellez

Active Member
Licensed User
This is easy with the Intent object, there are lots of examples in the forum, this is just like the intent used to the google maps.

Just use the search function of the forum
 

little3399

Active Member
Licensed User
Hi,
I using the follow code ... using URI method call another app , but it show following message ... need Help ...

B4A code :

Dim In As Intent
Dim pm As PackageManager

Dim Bd_uri As String="intent://map/geocoder?address=北京市海淀区上地信息路9号奎科科技大厦&src=urc|B4ATest#Intent;scheme=bdapp;package=com.baidu.BaiduMap;end"
In.Initialize(In.ACTION_VIEW,Bd_uri)
In.SetComponent("com.baidu.BaiduMap")
If In.IsInitialized Then
StartActivity(In)
End If


Java Code :

//
intent = Intent.getIntent("intent://map/geocoder?address=北京市海淀区上地信息路9号奎科科技大厦&src=yourCompanyName|yourAppName#Intent;scheme=bdapp;package=com.baidu.BaiduMap;end");
startActivity(intent);

Error message ...
 

Attachments

little3399

Active Member
Licensed User
Hi, Erel

I have already adjusted according to your advice... but the result still the same

upload_2015-2-12_16-33-5.png
 
Top