Android Boot page implementation (first time login)

Source: Internet
Author: User


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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.