Android Question Translate from JAVA

Discussion in 'Android Questions' started by vfafou, Feb 8, 2015.

  1. vfafou

    vfafou Active Member Licensed User

    Hello!
    I have this code from JAVA

    Code:
    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!
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Check PackageManager from the Phone library.
     
    vfafou likes this.
  3. vfafou

    vfafou Active Member Licensed User

    OK, Erel!
    Thank you for your reply!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice