Android Question intent = Intent.getIntent

little3399

Active Member
Licensed User
Longtime 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
Longtime 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
 
Upvote 0

little3399

Active Member
Licensed User
Longtime 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

  • B4ATEST.png
    B4ATEST.png
    9.9 KB · Views: 274
Upvote 0
Top