Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMP 365 Android Development.  Every android application has a manifest file called AndroidManifest.xml  Found in the Project folder  Contains critical.

Similar presentations


Presentation on theme: "COMP 365 Android Development.  Every android application has a manifest file called AndroidManifest.xml  Found in the Project folder  Contains critical."— Presentation transcript:

1 COMP 365 Android Development

2  Every android application has a manifest file called AndroidManifest.xml  Found in the Project folder  Contains critical concerning the entire application and acts as an identifier for numerous properties

3  Declares the Java package the application is identified by.  Declares each component of the Android application 1. Activity 2. Service 3. Broadcast Receiver 4. Content Provider  Lists the permissions the application requires to prompt the user and declares permissions that other programs require to interact with itself.

4  Declares the minimum level of Android API required to run this application.  Lists the libraries that the application must be linked to.  Declares which processes will host the application components.

5  Structured similarly to other XML files in Android development.  Begins with the XML header, following with the element header and numerous elements under it.  Under the element is where you will find component declaration.

6 <activity android:name= “com.example.androidpracticeproj.MainActivity” android:label= “@string/app_name”> Note: The java package is called com.example.androidpracticeproj. However, you can shorthand the package name like depicted below: <activity android:name= “.MainAcivity” … />

7  An Intent is an action or operation to be performed.  Similar to Java Events in that they carry information and a specialized string constant for a particular action that needs to be performed.  Has two data structures 1. Intent.action 2. Intent.data  Intents are primarily used to send data between two app components.

8  The general action to be performed, contains a string constant that specifies what action needs to be performed.

9  Data to operate on, for example a person record in the contacts database, expressed as a URI. URI stands for Uniform Resource Identifier, which is like a URL but for a file system.

10  Intents are usually used in one of these three ways: 1. Starting an Activity 2. Starting a Service 3. Deliver a broadcast

11  As described before, an Activity is a single screen in an application. This is done by passing a new instance of an Activity to an Intent to startActivity(). Here the Intent specifies which activity to start and any data required by the new Activity.

12  A service is a background program that can process without user input. To start a service, pass an Intent to startService(). Once again, the Intent carries the service and the data. You can also bind the service to a user interface using bindService().

13  A broadcast is a message that an application can receive, and is broadcast when certain events occur, like the phone booting up, or being placed to charge. You can broadcast a broadcast by passing an Intent to sendBroadcast(), sendOrderedBroadcast(), or sendStickyBroadcast().

14  You can easily integrate your Activity with Android functions by using the Intent object.  Numerous Intents will let you utilize numerous functions of Android, like Android's Camera, Contact list, Messaging, retrieving and sending text/pictures, and so on.

15

16  Start as a main entry point, does not expect to receive data.

17  Data: URI for action to be performed on  Display data to the user.  This Intent is very versatile as it displays in different information depending on the uri input. Ex. If used on a contact entry, it will display the contact entry.

18  Data: URI to be edited  Gives explicit access to the data provided.  Edit functionality depends on the URI and what kind of data is being edited.

19  Data: URI representing a directory from which to pick data  Allows a user to pick from a data from the directory and returns it

20  Data: Dial the URI provided, brings up an empty caller if no URI  Dials a number in the dialer, but asks for permission before calling

21  Data: Call the URI provided, brings up an empty caller if no URI  Calls a number- requires permissions in the manifest file

22  Works with both images and videos  MediaStore.ACTION_IMAGE_CAPTURE - Captures an image using the camera and returns it  MediaStore.ACTION_VIDEO_CAPTURE - Captures a video using the camera and returns it

23  Data: URI representing the directory from which the user should select data  This allows the user to select a piece of data and then return it using the MIME type to specify which kind of data should be selected.

24  Data: URI representing data to be sent  Sends data.  For example, if the data is a “mailto:” it will use the email application, if the data is a “sms”, it will use the messaging application, and etc.


Download ppt "COMP 365 Android Development.  Every android application has a manifest file called AndroidManifest.xml  Found in the Project folder  Contains critical."

Similar presentations


Ads by Google