Show the Intro Once Not working
See original GitHub issuePlease check off the following things BEFORE submitting a new issue. Any issues that do not properly follow this format will be closed without discussion. If you’re requesting to have your app added to the list, you can erase the list and provide your app’s name and play store listing link. Thanks!
[ ] What you’ve tried (include code snippets, or whole files as necessary):
added the Show intro once example code to my splash screen
// Declare a new thread to do a preference check
Thread t = new Thread(new Runnable() {
@Override
public void run() {
// Initialize SharedPreferences
SharedPreferences getPrefs = PreferenceManager
.getDefaultSharedPreferences(getBaseContext());
// Create a new boolean and preference and set it to true
boolean isFirstStart = getPrefs.getBoolean("firstStart", true);
// If the activity has never started before...
if (isFirstStart) {
// Launch app intro
Intent i = new Intent(SplashActivity.this, app_intro.class);
startActivity(i);
// Make a new preferences editor
SharedPreferences.Editor e = getPrefs.edit();
// Edit preference to make it false because we don't want this to run again
e.putBoolean("firstStart", false);
// Apply changes
e.apply();
}
}
});
// Start the thread
t.start();
[ ] What you thought should happen:
It should move from splashscreen activity to Main activity after the intro has been shown once
[ ] What actually happened:
unfortunately, it doesn’t go beyond the splashscreen activity. it freezes.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
how to show the intro image only once - Stack Overflow
If you are willing to show the intro only when the user visits the page for the first time, here is a workaround:...
Read more >How To Fix Xbox Game Bar Not Working/Not Opening in ...
In this video tutorial, I will show you guys how to fix Xbox Game Bar not working or Xbox gaming bar not opening...
Read more >Program Won't Open? How to Fix Apps not ... - YouTube
Program won't open or program not opening in Windows 10? This video will show you how to fix programs, apps and games that...
Read more >How to Fix Windows 11 Taskbar Not Working ... - YouTube
How to Fix Windows 11 Taskbar Not Working ? Taskbar Not Showing Issue ; 00:00 Intro ; 00:20 Restart Windows 11 ; 00:51...
Read more >Fix Samsung Smart TV Apps Not Working, Crashing, Not ...
Fix Samsung Smart TV Apps Not Working, Crashing, Not Opening #SamsungTV #Apps # NotWorking Netflix, Youtube, Amazon Prime Video, Spotify, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay Below is my Splash Activity and app_intro activity class.
Again, The Splash Activity is the first activity to be launched at start, then the app_intro activity (show only once - For 1st time use only), then to MainActivity. Thanks
SplashActivity.java
app_intro.java
Referencing this issue as it is related #250 If this issue has not being fixed, please reopen with something substantial.