11package com .anotherdev .sample .firebase .auth ;
22
33import android .content .Intent ;
4+ import android .content .pm .ApplicationInfo ;
45import android .os .Bundle ;
56import android .util .Log ;
67import android .view .Menu ;
@@ -83,9 +84,11 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
8384
8485 firebaseAuth = FirebaseAuthRest .getInstance (FirebaseApp .getInstance ());
8586
86- String libInfo = String .format ("Library: %s %s" ,
87+ String libInfo = String .format ("Library: %s %s\n BuildType: %s \n Hash: %s " ,
8788 getString (com .anotherdev .firebase .auth .core .R .string .anotherdev_firebase_auth_rest_sdk_name ),
88- com .anotherdev .firebase .auth .core .BuildConfig .VERSION_NAME );
89+ com .anotherdev .firebase .auth .core .BuildConfig .VERSION_NAME ,
90+ com .anotherdev .firebase .auth .core .BuildConfig .BUILD_TYPE ,
91+ com .anotherdev .firebase .auth .core .BuildConfig .GIT_SHA );
8992 authLibraryTextView .setText (libInfo );
9093
9194 onDestroy .add (firebaseAuth .currentUser ()
@@ -101,7 +104,11 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
101104 })
102105 .subscribe (Functions .emptyConsumer (), RxUtil .ON_ERROR_LOG_V3 ));
103106
104- String appInfo = String .format ("%s\n %s" , getString (R .string .app_title ), BuildConfig .VERSION_NAME );
107+ final boolean isDebugBuild = (getApplicationInfo ().flags & ApplicationInfo .FLAG_DEBUGGABLE ) != 0 ;
108+ String appInfo = String .format ("%s\n %s\n BuildType: %s" ,
109+ getString (R .string .app_title ),
110+ BuildConfig .VERSION_NAME ,
111+ isDebugBuild ? "debug" : "release" );
105112 appInfoTextView .setText (appInfo );
106113
107114 googleSignInClient = GoogleSignIn .getClient (this ,
0 commit comments