• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Androidoverview 100405150711-phpapp01
 

Androidoverview 100405150711-phpapp01

on

  • 884 views

 

Statistics

Views

Total Views
884
Views on SlideShare
884
Embed Views
0

Actions

Likes
0
Downloads
23
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Adding SDK Components Android 2.1 Platform new! Android 1.6 PlatformAndroid 1.5 PlatformOlder PlatformsAndroid 2.0.1 PlatformAndroid 2.0 PlatformAndroid 1.1 PlatformSDK Tools, r5 new!USB Driver for Windows, r3Android Dev Phone 1 is available in 18 international markets, including the US, UK, Germany, Japan, India, Canada, France, Taiwan, Spain, Australia, Singapore, Switzerland, Netherlands, Austria, Sweden, Finland, Poland, and Hungary.
  • GPL – General Public License
  • Mount :All files accessible in a Unix system are arranged in one big tree, the file hierarchy, rooted at /. These files can be spread out over several devices. The mount command serves to attach the file system found on some device to the big file tree. Conversely, the umount(8) command will detach it again. The standard form of the mount command, is mount -t type device dirThis tells the kernel to attach the file system found on device (which is of type type) at the directory dir. The previous contents (if any) and owner and mode of dir become invisible, and as long as this file system remains mounted, the pathname dir refers to the root of the file system on device.===================================================================Sandbox:In computer security, a sandbox is a security mechanism for separating running programs. It is often used to execute untested code, or untrusted programs from unverified third-parties, suppliers and untrusted users.The sandbox typically provides a tightly-controlled set of resources for guest programs to run in, such as scratch space on disk and memory. Network access, the ability to inspect the host system or read from input devices are usually disallowed or heavily restricted. In this sense, sandboxes are a specific example of virtualization.
  • EDGE :EDGE is an abbreviation for Enhanced Data rates for GSM Evolution.The EDGE network is a data network used by AT&T and T-Mobile. It's not a true 3G network, as its speeds don't exceed 200 Kbps, but it is sometimes called a "high-speed" network.====================================================SSL :Transport Layer Security (TLS) and its predecessor, Secure Sockets Layer (SSL), are cryptographic protocols that provide security for communications over networks such as the Internet. TLS and SSL encrypt the segments of network connections at the Transport Layer end-to-end.Several versions of the protocols are in widespread use in applications like web browsing, electronic mail, Internet faxing, instant messaging and voice-over-IP (VoIP).====================================================Hypertext Transfer Protocol Secure (HTTPS) is a combination of the Hypertext Transfer Protocol with the SSL/TLS protocol to provide encryption and secure identification of the server. HTTPS connections are often used for payment transactions on the World Wide Web and for sensitive transactions in corporate information systems. HTTPS should not be confused with Secure HTTP (S-HTTP) specified in RFC 2660==============================================================HTTPS & SSL : http://developer.android.com/reference/javax/net/ssl/package-summary.htmlClasses HttpsURLConnection , SSLContext etc==========================================================HTTP :http://developer.android.com/reference/org/apache/http/package-summary.htmlClasses HttpConnection, HttpRequest etc.==========================================================
  • This includes reading or writing the user's private data (such as contacts or e-mails), reading or writing another application's files, performing network access, keeping the device awake, etc.
  • Android is a multi-process system, in which each application (and parts of the system) runs in its own process. Most security between applications and the system is enforced at the process level through standard Linux facilities, such as user and group IDs that are assigned to applications. Additional finer-grained security features are provided through a "permission" mechanism that enforces restrictions on the specific operations that a particular process can perform, and per-URI permissions for granting ad-hoc access to specific pieces of data.Uniform Resource Identifier (URI) is a string of characters used to identify a name or a resource on the Internet. Such identification enables interaction with representations of the resource over a network (typically the World Wide Web) using specific protocols. Schemes specifying a concrete syntax and associated protocols define each URI.
  • You can use the sharedUserId attribute in the AndroidManifest.xml'smanifest tag of each package to have them assigned the same user ID. By doing this, for purposes of security the two packages are then treated as being the same application, with the same user ID and file permissions. Note that in order to retain security, only two applications signed with the same signature (and requesting the same sharedUserId) will be given the same user ID.
  • Downloading the ADT PluginEclipse 3.5 (Galileo) :1. Start Eclipse, then select Help > Install New Software. 2. In the Available Software dialog, click Add....3. In the Add Site dialog that appears, enter a name for the remote site (for example, "Android Plugin") in the "Name" field. In the "Location" field, enter this URL:https://dl-ssl.google.com/android/eclipse/ Note: If you have trouble acquiring the plugin, you can try using "http" in the URL, instead of "https" (https is preferred for security reasons).Click OK.4. Back in the Available Software view, you should now see "Developer Tools" added to the list. Select the checkbox next to Developer Tools, which will automatically select the nested tools Android DDMS and Android Development Tools. Click Next. 5. In the resulting Install Details dialog, the Android DDMS and Android Development Tools features are listed. Click Next to read and accept the license agreement and install any dependencies, then click Finish. 6. Restart Eclipse. ===================================================================Configuring the ADT PluginOnce you've successfully downnloaded ADT as described above, the next step is to modify your ADT preferences in Eclipse to point to the Android SDK directory:1. Select Window > Preferences... to open the Preferences panel (Mac OS X: Eclipse > Preferences).2. Select Android from the left panel. 3. For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory. 4. Click Apply, then OK.
  • To create an AVD, use the "android" tool provided in the Android SDK. Open a command prompt or terminal, navigate to the tools/ directory in the SDK package and execute: android create avd --target 2 --name my_avdThe tool now asks if you would like to create a custom hardware profile. For the time being, press Return to skip it ("no" is the default response). That's it.This configures an AVD named "my_avd" that uses the Android 1.5 platform. The AVD is now ready for use in the emulator.In the above command, the --target option is required and specifies the deployment target to run on the emulator. The --name option is also required and defines the name for the new AVD.
  • http://developer.android.com/guide/tutorials/hello-world.htmlFill in the project details with the following values: Project name:HelloAndroidApplication name: Hello, AndroidPackage name:com.example.helloandroid (or your own private namespace)Create Activity:HelloAndroidMin SDK Version: 2Here is a description of each field:Project Name This is the Eclipse Project name — the name of the directory that will contain the project files. Application Name This is the human-readable title for your application — the name that will appear on the Android device. Package Name This is the package namespace (following the same rules as for packages in the Java programming language) that you want all your source code to reside under. This also sets the package name under which the stub Activity will be generated. Your package name must be unique across all packages installed on the Android system; for this reason, it's very important to use a standard domain-style package for your applications. The example above uses the "com.example" namespace, which is a namespace reserved for example documentation — when you develop your own applications, you should use a namespace that's appropriate to your organization or entity.Create Activity This is the name for the class stub that will be generated by the plugin. This will be a subclass of Android's Activity class. An Activity is simply a class that can run and do work. It can create a UI if it chooses, but it doesn't need to. As the checkbox suggests, this is optional, but an Activity is almost always used as the basis for an application. Min SDK Version This value specifies the minimum API Level required by your application. If the API Level entered here matches the API Level provided by one of the available targets, then that Build Target will be automatically selected (in this case, entering "2" as the API Level will select the Android 1.1 target). With each new version of the Android system image and Android SDK, there have likely been additions or changes made to the APIs. When this occurs, a new API Level is assigned to the system image to regulate which applications are allowed to be run. If an application requires an API Level that is higher than the level supported by the device, then the application will not be installed. Other fields: The checkbox for "Use default location" allows you to change the location on disk where the project's files will be generated and stored. "Build Target" is the platform target that your application will be compiled against (this should be selected automatically, based on your Min SDK Version).Notice that the "Build Target" you've selected uses the Android 1.1 platform. This means that your application will be compiled against the Android 1.1 platform library. If you recall, the AVD created above runs on the Android 1.5 platform. These don't have to match; Android applications are forward-compatible, so an application built against the 1.1 platform library will run normally on the 1.5 platform. The reverse is not true.Your Android project is now ready. It should be visible in the Package Explorer on the left. Open the HelloAndroid.java file, located inside HelloAndroid > src > com.example.helloandroid). It should look like this:================================================================Construct the UI-------package com.android.helloandroid;import android.app.Activity;import android.os.Bundle;import android.widget.TextView;public class HelloAndroid extends Activity {   /** Called when the activity is first created. */   @Override   public void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);       TextViewtv = new TextView(this);       tv.setText("Hello, Android");       setContentView(tv);   }}
  • class Hello white #FFFFFFButton Handler : myClickHandler=======================================================import android.app.Activity;import android.os.Bundle;import android.view.View;import android.widget.EditText;public class Hello extends Activity { private EditText text; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.main); // bind the layout to the activity text = (EditText) findViewById(R.id.EditText01);text.setText("No button pressed"); } // Will be connected with the buttons via XML public void myClickHandler(View view) { switch (view.getId()) { case R.id.Button01:text.setText("Button 1 was clicked"); break; case R.id.Button02:text.setText("Button 2 was clicked"); break; case R.id.Button03:text.setText("Button 3 was clicked"); break; } }}===============================================================Maps API Key — an alphanumeric string that uniquely identifies the certificate and developer registered with the service.Registering for a Maps API Key is simple, free, and has two parts: 1. Registering the MD5 fingerprint of the certificate that you will use to sign your application. The Maps registration service then provides you a Maps API Key that is associated with your application's signer certificate. 2. Adding a reference to the Maps API Key in each MapView, whether declared in XML or instantiated directly from code. You can use the same Maps API Key for any MapView in any Android application, provided that the application is signed with the certificate whose fingerprint you registered with the service.==========================================================
  • Maps API Key — an alphanumeric string that uniquely identifies the certificate and developer registered with the service.Activity class:CurrentLocationAndroidManifest.xml : User library = com.google.android.maps========================================================Layout  ===========================================================import android.content.Context;import android.location.Location;import android.location.LocationListener;import android.location.LocationManager;import android.os.Bundle;import android.widget.RelativeLayout;import android.widget.ZoomControls;import com.google.android.maps.GeoPoint;import com.google.android.maps.MapActivity;import com.google.android.maps.MapController;import com.google.android.maps.MapView;public class CurrentLocation extends MapActivity { private MapControllermapController; private MapViewmapView; private LocationManagerlocationManager; public void onCreate(Bundle bundle) {super.onCreate(bundle);setContentView(R.layout.main); // bind the layout to the activity // create a map viewRelativeLayoutlinearLayout = (RelativeLayout) findViewById(R.id.mainlayout);mapView = (MapView) findViewById(R.id.mapview);ZoomControlsmZoom = (ZoomControls) mapView.getZoomControls();linearLayout.addView(mZoom);mapController = mapView.getController(); // Zoon 1 is world viewmapController.setZoom(14);locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, new GeoUpdateHandler()); } @Override protected booleanisRouteDisplayed() { return false; } public class GeoUpdateHandler implements LocationListener { @Override public void onLocationChanged(Location location) {int lat = (int) (location.getLatitude() * 1E6);intlng = (int) (location.getLongitude() * 1E6);GeoPoint point = new GeoPoint(lat, lng);mapController.setCenter(point);// setContentView(mapView); } @Override public void onProviderDisabled(String provider) { } @Override public void onProviderEnabled(String provider) { } @Override public void onStatusChanged(String provider, int status, Bundle extras) { } }}
  • Fennec :Firefox for mobile (codenamed Fennec) is the name of the build of the Mozilla Firefox web browser for smaller non-PC devices, mobile phones and PDAs.

Androidoverview 100405150711-phpapp01 Androidoverview 100405150711-phpapp01 Presentation Transcript