Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation "com.github.HmimssaSoufiane:PrivacyPolicyDialog:5.0.0"
}
Bundle args = new Bundle();
args.putString("storeName", "ArchaSoft ");
args.putString("PrivacyURL", "https://github.com/HmimssaSoufiane/PrivacyPolicyDialog");
PrivacyPolicyDialog dialog = new PrivacyPolicyDialog();
dialog.setArguments(args);
dialog.show(getSupportFragmentManager(), "Text");
//
final Intent goNextActivity = new Intent(this, Main2Activity.class);
Thread daemonThread = new Thread(new Runnable() {
@Override
public void run() {
try {
while (!PrivacyPolicyDialog.isDismiss) {
Log.i("thread", "while");
Thread.sleep(1000);
}
} catch (Exception e) {
Log.i("thread", "Exception" + e.getMessage());
} finally {
startActivity(goNextActivity);
Log.i("thread", "Fin");
finish();
}
}
}, "Demon");
daemonThread.start();
Salah chnitfa and Hmimssa Soufiane