-
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
Showing
2 changed files
with
3 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,6 @@ | |
public class MainActivity extends AppCompatActivity implements ZXingScannerView.ResultHandler { | ||
|
||
private static final int PERMISSION_CODE = 100; | ||
//private static final String TAG = "ConfigCat"; | ||
private static final String FLASH_STATE = "FLASH_STATE"; | ||
private static long pressedTime; | ||
private boolean flashlight; | ||
|
@@ -50,7 +49,6 @@ protected void onCreate(Bundle savedInstanceState) { | |
MobileAds.initialize(this, initializationStatus -> { | ||
|
||
}); | ||
new Utils().interstitialAdsShow(this); | ||
AdRequest adRequest = new AdRequest.Builder().build(); | ||
binding.adView.loadAd(adRequest); | ||
|
||
|
@@ -59,8 +57,6 @@ protected void onCreate(Bundle savedInstanceState) { | |
|
||
flashOn(); | ||
flashOff(); | ||
|
||
//ConfigCat(); | ||
} | ||
|
||
private void flashOn() { | ||
|
@@ -151,30 +147,9 @@ public boolean onOptionsItemSelected(@NonNull MenuItem item) { | |
public void onBackPressed() { | ||
if (pressedTime + 2000 > System.currentTimeMillis()) { | ||
finishAndRemoveTask(); | ||
if (Utils.interstitialAd.isLoaded()) { | ||
Utils.interstitialAd.show(); | ||
} else { | ||
super.onBackPressed(); | ||
finish(); | ||
} | ||
finishAndRemoveTask(); | ||
} else { | ||
Toast.makeText(this, "Press once again to exit", Toast.LENGTH_SHORT).show(); | ||
} | ||
pressedTime = System.currentTimeMillis(); | ||
} | ||
|
||
/*private void ConfigCat() { | ||
String SDK = BuildConfig.SDK; | ||
ConfigCatClient client = ConfigCatClient.newBuilder() | ||
.logLevel(LogLevel.INFO) | ||
.logLevel(LogLevel.DEBUG) | ||
.build(SDK); | ||
User user = User.newBuilder() | ||
.email("[email protected]") | ||
.build(SDK); | ||
Log.d(TAG, "ConfigCat: " + client + user); | ||
}*/ | ||
} |
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