Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As suggested in the page that you linked</p> <blockquote> <p>"Instead, you're encouraged to use insert(String, String, ContentValues), update(String, ContentValues, String, String[]), et al, when possible."</p> </blockquote> <p>you should use <code>insert()</code> when it is possible. </p> <blockquote> <p>To avoid SQL injection requests, you need to clearly delineate between the SQL statement and the data it includes. The ContentProvider’s query(), update(), and delete()methods and Activity’s managedQuery() method all support parameterization. These methods all take the “String[] selectionArgs” parameter, a set of values that get substituted into the query string in place of “?” characters, in the order the question marks appear. This provides clear separation between the content of the SQL statement in the “selection” parameter and the data being included. [Mobile Application Security]</p> </blockquote> <p>So, <code>insert()</code> method like <code>update()</code> or <code>delete()</code> should be sql-injection free. </p> <p>You should always use parametrized query methods, supported by Content Provider: </p> <blockquote> <p>When accessing a content provider, use parameterized query methods such as query(), update(), and delete() to avoid potential SQL injection from untrusted sources. Note that using parameterized methods is not sufficient if the selection argument is built by concatenating user data prior to submitting it to the method.</p> </blockquote> <p>reference <a href="http://developer.android.com/training/articles/security-tips.html" rel="nofollow">here</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload