Android traversal sqllite Cursor object:

Source: Internet
Author: User


1.
Cursor C = ...;
For (C.movetofirst ();! c.isafterlast (); C.movetonext ()) {
C...
}
2.
Cursor CURSOR=...L
For (Cursor.movetofirst ();!cursor.isafterlast (); Cursor.movetonext ()) {
Cursor.getstring (Cursor.getcolumnindex ("Name"));
Cursor.getint (Cursor.getcolumnindex ("CellPhone"));
Cursor.getint (Cursor.getcolumnindex ("Phone"));
Cursor.getstring (Cursor.getcolumnindex ("Address"));
}

Avoid: Do not traverse cursor directly to obtain data, such as: Cursor.getint (Cursor.getcolumnindex ("CellPhone"));

Android development, how to make eclipse file explore have root access to access to the Data folder

In Eclipse, which integrates the DDMS tool, only the data document of the phone simulator can be accessed if the connection to the peripheral is inaccessible, only through the command line of the CMD console to gain root access
After the phone root, use
R.E. Manager to the data, Data\data, data\data\xxxx your project these folders right to read and writable

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.