Android Question Translate from JAVA

vfafou

Well-Known Member
Licensed User
Longtime User
Hello!
I have this code from JAVA

B4X:
if (PackageUtils.queryInstalledPackage(context, "com.pac1.txapi") != null) {
            geoIntent.setPackage("com.pac1.txapi");
        } else if (PackageUtils.queryInstalledPackage(context, "com.pac2.txapi") != null) {
            geoIntent.setPackage("com.pac2.txapi");
        } else {
            geoIntent.setPackage("com.google.android.apps.maps");
        }

        context.startActivity(geoIntent);
     }

GeoLocation location = item;
            String uri = "geo:0,0?q=" + location.getFormattedLatitude() + ","
                    + location.getFormattedLongitude() + "(" + item.toString()
                    + ")";
       
    startNaviActivity(this, uri);

and I can't figure out how to make it working at B4A.
Does anyone can help?

Thank you in advance!
 
Top