@@ -58,7 +58,7 @@ protected pingMeLive(Builder builder) {
5858 this .builder = builder ;
5959 }
6060
61- public static void install (@ Nullable final Context context ,boolean errorEvents , final String errorEventTitle , String APIKEY ,String appId ) {
61+ public static void install (@ Nullable final Context context ,boolean errorEvents , final String errorEventTitle , String API_KEY ,String PROJECT_ID ) {
6262
6363 if (errorEvents ) {
6464 try {
@@ -73,23 +73,23 @@ public static void install(@Nullable final Context context,boolean errorEvents,
7373 return ;
7474 }
7575
76- if (APIKEY == null || APIKEY .trim ().length () <= 0 ) {
76+ if (API_KEY == null || API_KEY .trim ().length () <= 0 ) {
7777 Log .e (TAG , "API KEY needed check your application class" );
7878 Log .e (TAG , "pingMeLive not installed." );
7979 return ;
8080 }
8181
82- if (appId == null || appId .trim ().length () <= 0 ) {
83- Log .e (TAG , "appId needed check your application class" );
82+ if (PROJECT_ID == null || PROJECT_ID .trim ().length () <= 0 ) {
83+ Log .e (TAG , "PROJECT_ID needed check your application class" );
8484 Log .e (TAG , "pingMeLive not installed." );
8585 return ;
8686 }
8787
8888 dbHelper = DBHelper .getInstance (context );
8989 pingMePref = com .pingmelive .pingMePref .getInstance (context );
9090
91- pingMePref .setAPIKey (APIKEY );
92- pingMePref .setAppId (appId );
91+ pingMePref .setAPIKey (API_KEY );
92+ pingMePref .setAppId (PROJECT_ID );
9393
9494 //INSTALL!
9595 final Thread .UncaughtExceptionHandler oldHandler = Thread .getDefaultUncaughtExceptionHandler ();
@@ -144,13 +144,13 @@ public void uncaughtException(Thread thread, final Throwable throwable) {
144144 }
145145 else {
146146
147- if (APIKEY == null || APIKEY .trim ().length () <= 0 ) {
147+ if (API_KEY == null || API_KEY .trim ().length () <= 0 ) {
148148 Log .e (TAG , "API KEY needed check your application class" );
149149 Log .e (TAG , "pingMeLive not installed." );
150150 return ;
151151 }
152152
153- if (appId == null || appId .trim ().length () <= 0 ) {
153+ if (PROJECT_ID == null || PROJECT_ID .trim ().length () <= 0 ) {
154154 Log .e (TAG , "appId needed check your application class" );
155155 Log .e (TAG , "pingMeLive not installed." );
156156 return ;
@@ -162,8 +162,8 @@ public void uncaughtException(Thread thread, final Throwable throwable) {
162162 dbHelper = DBHelper .getInstance (context );
163163 pingMePref = com .pingmelive .pingMePref .getInstance (context );
164164
165- pingMePref .setAPIKey (APIKEY );
166- pingMePref .setAppId (appId );
165+ pingMePref .setAPIKey (API_KEY );
166+ pingMePref .setAppId (PROJECT_ID );
167167
168168 dbHelper .sendData ();
169169 }
@@ -255,7 +255,7 @@ public static class Builder {
255255 boolean ErrorEventEnabled = true ;
256256 String ErrorEventTitle = null ;
257257 String API_KEY = null ;
258- String APP_ID = null ;
258+ String PROJECT_ID = null ;
259259 Context context ;
260260
261261 public Builder (Context context )
@@ -290,17 +290,17 @@ public Builder setAPI_KEY(String API_KEY) {
290290 return this ;
291291 }
292292
293- String getAPP_ID () {
294- return APP_ID ;
293+ public String getPROJECT_ID () {
294+ return PROJECT_ID ;
295295 }
296296
297- public Builder setAPP_ID (String APP_ID ) {
298- this .APP_ID = APP_ID ;
297+ public Builder setPROJECT_ID (String PROJECT_ID ) {
298+ this .PROJECT_ID = PROJECT_ID ;
299299 return this ;
300300 }
301301
302302 public void install () {
303- pingMeLive .install (context ,isErrorEventEnabled (),getErrorEventTitle (),getAPI_KEY (),getAPP_ID ());
303+ pingMeLive .install (context ,isErrorEventEnabled (),getErrorEventTitle (),getAPI_KEY (),getPROJECT_ID ());
304304 }
305305 }
306306}
0 commit comments