Not much nonsense, first on the code https://git.oschina.net/alexgaoyh/AndriodTest
Concrete implementation, there are too many tutorials on the web, the following is just a few of the problems encountered in the middle:
1:
Preferences = Getsharedpreferences ("Launchcount", mode_world_readable);
The method is to generate the corresponding file in the/data/data/{package path}, which is not visible by default, so my solution here is that cmd goes into adb.exe and then gives 755 Read permission
Then, in Eclipse, using the Ddms view, after switching, you will see the corresponding file path, there is a launchcount.xml file, this is his corresponding file
2: Another point of attention, is in the Androidmanifest.xml, because Mainactivity.java to determine whether the user has logged on, whether to use the intent start the system to build, so that he will add in the XML configuration items, as follows:
<?xml version= "1.0" encoding= "Utf-8"? ><manifest xmlns:android= "http://schemas.android.com/apk/res/ Android "package=" Com.alexgaoyh.andriodtest "android:versioncode=" 1 "android:versionname=" 1.0 "> <uses-s DK android:minsdkversion= "8" android:targetsdkversion= "/>" <application android:allow Backup= "true" android:icon= "@drawable/ic_launcher" android:label= "@string/app_name" Android:theme= "@s Tyle/apptheme "> <activity android:name=" Com.alexgaoyh.andriodtest.launchGuide.LaunchGuideViewActivit Y "><intent-filter> <action android:name=" Com.alexgaoyh.andriodtest.MainActivity "/><category Android:name= "Android.intent.category.DEFAULT"/></intent-filter> </activity> <activity Android:name= ". Mainactivity "android:label=" @string/app_name "> <intent-filter> <action Android:name= "android.inTent.action.MAIN "/> <category android:name=" Android.intent.category.LAUNCHER "/> </ Intent-filter> </activity> </application></manifest>
Note the Intent-filter section.
In this way, Andriod's boot page functionality is simple to implement, but there are some problems:
1: The last boot page lacks the ' experience now ' button;
2: Home function is not implemented.
Later implement and update Git
Android Boot page implementation (first time login)