Friday, 26 February 2016

Concept of Services in Android

Services in Android

  1. The invisible workers of your application. Service components run in the background, updating your data sources and visible Activities and triggering Notifications. 
  2. They’re used to perform regular processing that needs to continue even when your application’s Activities aren’t active or visible.

Effectiveness of the security model of Windows Phone 7 against threats


  1. The need for protection 
  2. Chambers
    • Trusted Computing Base (TCB)
    • Elevated Rights Chamber (ERC)
    • Standard Rights Chamber (SRC)
    • Least Privileged Chamber (LPC)
  3. Capabilities: Each application discloses its capabilities to the user, including;
    • Disclosure on the application details page in the Windows Phone Marketplace.
    • Disclosure with an explicit prompt upon application purchase, for those capabilities that have legal requirements for explicit disclosure and specific consent collection. 
    • Disclosure within the application, when the user is about to use the location capability for the first time.
  4. Sandbox
    • Every application on Windows Phone 7 runs in its own isolated chamber, and is defined by the declared capabilities that the application needs to function.
    • Applications developed by other companies that are distributed via the Windows Phone Marketplace cannot remain active in the background.
  5. Application Deployment
    • Application developers must register with Microsoft before an application can be submitted to the Marketplace Hub. 
    • All applications are code-signed by VeriSign.
    • The application development model’s use of “managed code only” in addition to the least privilege and isolation aspects of the Windows Phone OS 7.0 security model provide strong protections against security attacks

Network architecture of BlackBerry enterprise services


  1. All BlackBerry (BB) connect to (Research In Motion) RIM’s central NOC through Carrier
  2. NOC connected to all Blackberry Enterprise Server (BES) on site
  3. BES can attach to additional middleware services
  4. MDS (Mobile Data Services)















MDS (Mobile Data Services)
  • MDS focuses mainly on web and enterprise services
    • MDS is a runtime container for processing pushed data
    • Ideal for Rapid Application Development
    • Minimal coding required (sometimes none)
  • BB enterprise servers perform all the data processing and management
    • WSDL, Database, etc.
  • Can be arbitrarily complex on the backend

Java Native Interface (JNI) in Android


  1. Java Native Interface (JNI) enables programmers to write native methods to handle situations when an application cannot be written entirely in the Java programming language.
  2. It is also used to modify an existing application—written in another programming language.

Use of Cursors in Content Providers in Android

Cursors: This interface provides random read-write access to the result set returned by a database query.

Cursor Adapters: This adapter exposes data from a Cursor to a ListView Widget.

Code

public class MainActivity extends ListActivity {
/** Called when the activity is first created. */

@Override

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

Uri allContacts = Uri.parse(“content://contacts/people”);
Cursor c = managedQuery(allContacts, null, null, null, null);