Your SlideShare is downloading. ×
0
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Android webinar class_3
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Android webinar class_3

203

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
203
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Java compilers convert your code from human readable Java source files to something called “bytecode” in the Java world. “Bytecode” is interpreted by a JVM, which operates much like a physical CPU might operate on machine code, to actually execute the compiled code. Performance - Java performance in generally second only to C/C++ in common language performance comparisons. In the Java programming language and environment, a just-in-time (JIT) compiler is a program that turns Java bytecode (a program that contains instructions that must be interpreted) into instructions that can be sent directly to the processor.The just-in-time compiler comes with the virtual machine and is used optionally. It compiles the bytecode into platform-specific executable code that is immediately executed
  • such as development toolkits for other programming languages, and can write and contribute their own plug-in modules.
  • A PendingIntent itself is simply a reference to a token maintained by the system describing the original data used to retrieve it. This means that, even if its owning application's process is killed, the PendingIntent itself will remain usable from other processes that have been given it. If the creating application later re-retrieves the same kind of PendingIntent (same operation, same Intent action, data, categories, and components, and same flags), it will receive a PendingIntent representing the same token if that is still valid, and can thus call cancel() to remove it.
  • Transcript

    • 1. Communication Between Activities
    • 2. Intents• An intent is an abstract description of an operation to be performed.• Late runtime binding between the code in different applications is performed by the use of Intents.• Its most significant use is in the launching of activities.
    • 3. Switching between Activities• Any Android application will comprise of many activities.• How do they Interact with one another.Intent intent = new Intent(CallingActivity.this, NewActivity.class);startActivity(intent);
    • 4. Passing Data-Using Intent Extras• Any Android application will comprise of many activities.• Data needs to be send from one activity to another. Intent intent = new Intent(CallingActivity.this, NewActivity.class); Use intent.putExtra(“key", val); startActivity(intent);
    • 5. Bundle• Bundle is generally used for passing data between Activities. It can hold all types of values and can pass them to the new activity.• You can receive data in another Activity like this:Bundle extras = intent.getExtras();String dataReceived = extras.getString(“key");
    • 6. Shared Preferences• Provides a way to capture user preferences on the settings of a specific application or an activity• Preferences are typically name value pairs
    • 7. Example - Shared Preferences
    • 8. Starting Activity For Result
    • 9. What is Activity Result?• Most application consists of multiple activities.• There comes a need for getting some result form the called activity• Could be the list item selected on any activity etc.
    • 10. Usage• Call the StartactivityForResult() from the calling Activity with a unique request code.• Create the overridden method OnActivityResult() in the calling Activity.• Set the result to RESULT_OK with the selection stored in the intent.
    • 11. Example 1:
    • 12. Example 2:
    • 13. Notifications in Android
    • 14. NotificationManager• To show notifications we use NotificationManager Class – NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);• We use a PendingIntent to specify the action which should be performed once the user select the notification.• You can Receive the activity via PendingIntent.getActivity()
    • 15. Notification Extras• Notification.Builder allows to define actions to the notification.• A PendingIntent itself is simply a reference to a token maintained by the system.• This means that, even if its owning applications process is killed, the PendingIntent itself will remain usable from other processes.
    • 16. Notifications
    • 17. Media in Android
    • 18. Android Media Player• MediaPlayer is the easier way, if you just want to play an audio file in the background, somewhere in an application• MediaPlayer class can be used to control playback of audio/video files and streams
    • 19. Usage:• MediaPlayer mp;• mp = MediaPlayer.create(this, R.raw.song);• mp.start();
    • 20. Video Player-Usage• VideoView myVideoView =(VideoView)findViewById(R.id.myvideoview);• myVideoView.setVideoURI(Uri.parse(SrcPath));• myVideoView.setMediaController(new MediaController(this));• myVideoView.requestFocus();• myVideoView.start();
    • 21. Video Player
    • 22. •Q & A..?

    ×