intent = new Intent(Intent.ACTION_VIEW, Uri.parse("geo:0,0?q= г.Барнаул, ул. Г.Исакова 200")); startActivity(intent); 

When launching this, android offers to choose either google maps or yandex cards, I still have 2gs installed, why can't I choose it, I don’t think that there’s no such thing in the 2gs application? Or on another - what link to generate to open the website 2gis with this address?

On site 2g Chot not found.

    1 answer 1

    If a geo-request issued in the form of Intent is in Geo URI format, then according to the documentation the geo application is called (by default, Google Maps).

    In the particular case, again according to the 2GIS documentation, the fig does not support Geo URI - which is generally strange, since it seems to support Geo URI simply, it is enough to state in the manifest a declaration that there is an activating processing Geo URI:

     <activity android:name=".2GisActivity"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT"/> <data android:scheme="geo"/> </intent-filter> </activity> 

    And in the very activation, parse the Geo URI - which is completely trivial and all.

    In general, a mystery.

    Update

    Yes, regarding the very question itself - if it’s already a hunt to launch 2GIS, then you need to write a simple application (such as a bridge / bridge) from the 1st activation, which declares that it can handle Geo URI (as described above) then it starts 2GIS through the request in the format: http://catalog.api.2gis.ru/geo/search (see API 2GIS documentation above)