We all know that in the Android system, the relevant operation of the SQLite database is encapsulated as content Provider, can help those who do not have SQL language developers quickly implement the database operation on the Android platform, However, we usually return the cursor object when we query, in essence, these two APIs are provided by different classes. Android123 hints such as contentresolver.query (), and activity.managedquery () so, we see a query method that is provided by Contentresolver, is located in Android.content.ContextWrapper.getContentResolver () and the other is activity.
The parameters of the two methods are the same, but the activity class's methods are affected by the activity throughout the declaration cycle, while conventional processing of the data logic may be separated into a single class, passing the instance handle directly using the context object, while the Android Development Network also suggests that For database query operations if the data is large, use the asynchronous Asyncqueryhandler method to prevent blocking the thread as much as possible.
This article link: http://www.elexcon.com/news/54294.html
The difference between managedquery and query,