News

Spy-App: Part One

1 min read Updated on:

Spy-App

The spying phone! How to develop an App that turns a mobile phone into a perfect digital bug

Android gives developers a lot of freedom. Let's now create a perfect bug for mobile phones.

CONTENT PROVIDER is a part of an Android application that is responsible for making data available to other applications installed on the system. Every type of content exposed through a content provider is identified by a URI, i.e. a unique address. The typical form is as follows:

content://base-reference/etc/etc

Android has several contents. An example:

content://com.android.contacts/contacts

Once you know the uri of a content type, interacting with the provider that supplies it is more or less like making queries to a database. As a first step, you need to retrieve an instance of the android.content.ContentResolver() object. Example:

ContentResolver contentResolver = getContentResolver();

These objects allow you to query through their method:

public Cursor query( Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)

The parameters to provide are:

  • uri: address that identifies the content type;
  • projection: list with the names of the columns whose values must be included in the response.
  • selection: is the WHERE clause
  • selectionArgs is the list of arguments for the WHERE clause
  • sortorder: is the SQL ordering clause, as you can clearly see.

Frequently asked questions

È una parte di un'applicazione Android che si occupa di rendere disponibili dei dati alle altre applicazioni installate nel sistema.
Ogni tipo di contenuto esposto mediante content provider viene identificato attraverso un URI, cioè un indirizzo univoco.
Una volta noto l'uri di una tipologia di contenuto, interagire con il provider che la eroga è più o meno come fare delle interrogazioni a un database, recuperando prima un'istanza di android.content.ContentResolver().
Richiede uri, projection (le colonne da includere), selection (la clausola WHERE), selectionArgs (gli argomenti del WHERE) e sortOrder (la clausola di ordinamento).
Sì, Android lascia molta libertà allo sviluppatore e permette di creare un'App che trasforma il telefonino in una perfetta cimice informatica.

Do you have a project in mind?

Tell us what you want to build: we'll reply with a free, no-obligation quote.

Request a quote
  • Websites and eCommerce
  • SEO and Google Ads
  • Apps and software