1

i've tried to get the apk with apk info of youtube, i found: APK directory - /data/app/com.google.android.youtube-1/base.apk

but this doesn't work with robot framework appium. it says that:

An unknown server-side **error** occurred while processing the command. Original error: The application at '/data/app/com.google.android.youtube-1/base.apk' does not exist or is not accessible

and I don't know if my path is correct. How can i get it?

1 Answers1

0
   try {
        ApplicationInfo app = this.getPackageManager().getApplicationInfo("com.google.android.youtube", 0);        

        Drawable youtubeAppIcon = packageManager.getApplicationIcon(app);
        String youtubeAppName = packageManager.getApplicationLabel(app);
        return icon;
    } catch (NameNotFoundException e) {
        Toast toast = Toast.makeText(this, "error in getting icon", Toast.LENGTH_SHORT);
        toast.show();
        e.printStackTrace();
    }
Omkar T
  • 755
  • 8
  • 19