public static void initialize ( final Context context ) { if ( ! initialized . compareAndSet ( false , true ) ) { return ; } applicationContext = context . getApplicationContext ( ) ; final String packageName = applicationContext . getPackageName ( ) ; localAppName = packageName ; final PackageManager manager = applicationContext . getPackageManager ( ) ; try { final PackageInfo pkgInfo = manager . getPackageInfo ( packageName , 0 ) ; localAppVersion = pkgInfo . versionName ; } catch ( final NameNotFoundException e ) { Log . d ( TAG , "Failed to get version of application, will not send in device info." ) ; } Log . d ( TAG , "Initialized android SDK" ) ; }
Initializes the Stitch SDK so that app clients can be created .