-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f139886
commit a00a8ea
Showing
9 changed files
with
73 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 21 additions & 6 deletions
27
app/src/main/java/com/bayardpresse/stickers/mortelleadele/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,45 @@ | ||
package com.bayardpresse.stickers.mortelleadele; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import android.content.Intent; | ||
import android.os.Bundle; | ||
|
||
import com.batch.android.Batch; | ||
import com.batch.android.BatchActivityLifecycleHelper; | ||
import com.batch.android.Config; | ||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import com.google.android.gms.common.ConnectionResult; | ||
import com.google.android.gms.common.GoogleApiAvailability; | ||
|
||
public class MainActivity extends AppCompatActivity { | ||
|
||
public static final int REQUEST_GOOGLE_PLAY_SERVICES = 1972; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
GoogleApiAvailability.getInstance().makeGooglePlayServicesAvailable(this); | ||
//checkPlayServices(); | ||
startPacksListActivity(); | ||
} | ||
|
||
@Override | ||
protected void onNewIntent(Intent intent) { | ||
super.onNewIntent(intent); | ||
Batch.onNewIntent(this, intent); | ||
// Batch.onNewIntent(this, intent); | ||
} | ||
|
||
private void startPacksListActivity() { | ||
Intent intent = new Intent(getApplicationContext(), ItemListActivity.class); | ||
this.startActivity(intent); | ||
} | ||
|
||
private boolean checkPlayServices() { | ||
GoogleApiAvailability googleAPI = GoogleApiAvailability.getInstance(); | ||
int result = googleAPI.isGooglePlayServicesAvailable(this); | ||
if(result != ConnectionResult.SUCCESS) { | ||
if(googleAPI.isUserResolvableError(result)) { | ||
googleAPI.getErrorDialog(this, result, REQUEST_GOOGLE_PLAY_SERVICES).show(); | ||
} | ||
return false; | ||
} | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters