public final class

AppIdentifierHelper

extends Object
java.lang.Object
   ↳ com.amazon.identity.auth.device.authorization.api.AppIdentifierHelper

Class Overview

Summary

Public Methods
static AppInfo getAppInfo(String packageName, Context context)
Return an AppInfo object containing information about the specified app, or null if the specified package doesn't have a valid API Key.
static boolean isAPIKeyValid(String packageName, Context context)
Check to see if the passed in package has a valid Amazon API Key.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static AppInfo getAppInfo (String packageName, Context context)

Return an AppInfo object containing information about the specified app, or null if the specified package doesn't have a valid API Key. NOTE: this method always computes AppInfo from the package

Parameters
packageName Name of package to get AppInfo from
Returns
  • A valid AppInfo or null if app doesn't have a valid API Key or package doesn't exist on device

public static boolean isAPIKeyValid (String packageName, Context context)

Check to see if the passed in package has a valid Amazon API Key. If it has, check and see if the signature of the calling app matches the signature in the API Key.

Parameters
packageName Name of package to verify
Returns
  • true if the app was verified, false otherwise