Android API document Query---context, toast, sharedpreferences

Source: Internet
Author: User

/* Consult API---Context
1.abstract Assetmanager getassets ()

Returns an Assetmanager instance for the application ' s package.


Get the resources under the assets directory

2.abstract File Getcachedir ()

Returns the absolute path to the application specific cache directory on the filesystem.

Get Cache Directory

3.abstract Packagemanager Getpackagemanager ()

Return Packagemanager instance to the find global package information.

Get some information about the package name version number

4.abstract String Getpackagename ()

Return the name of this application ' s package.


Abstract String Getpackageresourcepath ()

Return the full path to this context ' s primary Android package.


5.
Abstract FileInputStream openfileinput (String name)

Open a private file associated with the This Context ' s application package for reading.


Abstract FileOutputStream openfileoutput (String name, int mode)

Open a private file associated with the This Context ' s application package for writing.



*/



/*toast*/
1.toast.maketext (Mtext, "Stri ng", Toast. Select time). Show
2.mcontext=this, is to create a data

/*sharedpreferences

Developer Guides

For more information on using sharedpreferences, read the Data Storage Developer Guide. Jump in from here to see examples, more information

*/

Android API document Query---context, toast, sharedpreferences

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.