Broadcast Receiver Android Club 2015. Agenda Broadcast Receiver Widget.

Slides:



Advertisements
Similar presentations
Android Application Development Tutorial. Topics Lecture 6 Overview Programming Tutorial 3: Sending/Receiving SMS Messages.
Advertisements

Programming with Android: Notifications, Threads, Services
WiFi in Android.
Mobile Computing Lecture#13. Lecture Contents 2 Widgets  Creating App Widget  Unsupported/Supported Views/Layouts  Widget Layout  Widget Settings.
Y A S O O B A L I b o r n o n 1 9 t h F e b r u a r y i n K a n p u r d i s t r i c t o f U t t a r P r a d e s h. H e s t a r t e d s i n g i.
CSS216 MOBILE PROGRAMMING Android, Chapter 10 Book: “Professional Android™ 2 Application Development” by Reto Meier, 2010 by: Andrey Bogdanchikov (
BroadcastReceiver.  Base class for components that receive and react to events  Events are represented as Intent objects  Intents received as parameter.
Cosc 5/4730 Android SMS. A note first Depending on the API level, an import changes because of a deprecated API 3 uses – import android.telephony.gsm.SmsManager;
System broadcasts and services. System broadcast events. EventDescription Intent.ACTION_BOOT_COMPLETEDBoot completed. Requires the android.permission.RECE.
SMS. Short Message Service – Primarily text messages between mobile phones – First one sent December 3, 1982 “Merry Christmas” – In 2008 Approximately.
Android Development (Basics)
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
© Keren Kalif Intro to Android Development Written by Keren Kalif, Edited by Liron Blecher Contains slides from Google I/O presentation.
Mobile Computing Lecture#08 IntentFilters & BroadcastReceivers.
Debugging for Android 1 CS440. Debugging for Android  You have three options:  Android Debug Bridge (ADB)  Dalvik Debug Monitor Device (DDMS)  Device.
Cosc 5/4730 Introduction: Threads, Android Activities, and MVC.
Homescreen Widgets Demystified Pearl AndroidTO // Oct 26, 2010.
Mobile Programming Lecture 17 Creating Homescreen Widgets.
Integrating with Android Services. Introduction  Android has numerous built-in functionality that can be called from within your applications  SMS/MMS.
Using Intents to Broadcast Events Intents Can be used to broadcast messages anonymously Between components via the sendBroadcast method As a result Broadcast.
Cosc 5/4730 Broadcast Receiver. Broadcast receiver A broadcast receiver (short receiver) – is an Android component which allows you to register for system.
Android ICC Part II Inter-component communication.
Mobile Programming Lecture 6
CS378 - Mobile Computing Intents.
16 Services and Broadcast Receivers CSNB544 Mobile Application Development Thanks to Utexas Austin.
Cosc 5/4730 Android App Widgets. App Widgets App Widgets are miniature application views that can be embedded in other applications (such as the Home.
CS378 - Mobile Computing Intents. Allow us to use applications and components that are part of Android System – start activities – start services – deliver.
Step 1 – Go to the TRANServe Online Application log in screen Step 2 – Do not attempt to log in, instead, click on the “Register” button. This step applies.
User notification Android Club Agenda Toast Custom Toast Notification Dialog.
Activity Android Club Agenda Hello Android application Application components Activity StartActivity.
Mobile Programming Midterm Review
Android ImageView and Splash Screen 1. After copying an image file (Ctrl-c or right click copy), right click and paste it into one of the res/drawable.
HW#9 Clues CSCI 571 Fall, HW#9 Prototype
MOBILE COMPUTING D10K-7D02 MC05: Android UI Design Dr. Setiawan Hadi, M.Sc.CS. Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran.
Fragment Android Club Agenda Fragment Static fragment Dynamic fragment ViewPager.
Lecture 2: Android Concepts
Contents Searches related to Android RatingBar Basics Android ratingbar example Android custom ratingbar.
Speech Service & client(Activity) 오지영.
Mobile Software Development for Android - I397 IT COLLEGE, ANDRES KÄVER, WEB:
Android intro Building UI #1: interactions. AndroidManifest.xml permissions 2.
Messaging and Networking. Objectives Send SMS messages using the Messaging app Send SMS messages programmatically from within your app Receive and consume.
Developing Android Services. Objectives Creating a service that runs in background Performing long-running tasks in a separate thread Performing repeated.
CS371m - Mobile Computing Intents 1. Allow us to use applications and components that are already part of Android System – start activities – start services.
Cosc 4735 Nougat API 24+ additions.
Lab7 – Appendix.
Lecture 2: Android Concepts
Tracking device movements
CS499 – Mobile Application Development
Broadcast receivers.
CS371m - Mobile Computing Services and Broadcast Receivers
Android – Event Handling
Messaging Unit-4.
What's Happening Today Working with Images
Android Widget Tutorial
Broadcast Receivers A Android Component where you can register for system or application events, receive and react to broadcast intent. Each broadcast.
Android Introduction Camera.
Android Programming Lecture 9
Welcome App Android How to Program
Android Notifications (Part 2) Plus Alarms and BroadcastReceivers
Android App Developing with communication included
دانشگاه شهیدرجایی تهران
Many thanks to Jun Bum Lim for his help with this tutorial.
تعهدات مشتری در کنوانسیون بیع بین المللی
Course: Design & Technology
بسمه تعالی کارگاه ارزشیابی پیشرفت تحصیلی
1 To go to the next slide, click this button instead. A random slide will come up.
What is Justinmind? Prototyping tool Create user interfaces Widgets
Android Developer Fundamentals V2 Lesson 5
Lecture 2: Android Concepts
Mobile Programming Broadcast Receivers.
Presentation transcript:

Broadcast Receiver Android Club 2015

Agenda Broadcast Receiver Widget

BroadcastReceiver: 4 steps Register BroadcastReceiver Broadcast an Intent Android delivers Intent to BroadcastReceiver onReceive()

2 types of registration Static Dynamic

Static registration: example

Static registration: practice AndroidManifest.xml: create receiver Create intent-filter with TIMEZONE_CHANGED action Create BroadcastReceiver: show Toast “Time zone changed”

Dynamic registration: example IntentFilter receiverFilter = new IntentFilter(Intent.ACTION_HEADSET_PL UG); HeadsetPlugReceiver receiver = new HeadsetPlugReceiver(); registerReceiver(receiver, receiverFilter);

Dynamic registration: practice Create intent with ACTION_USER_PRESENT Create BroadcastReceiver: UnlockReceiver registerReceiver In reciver show toast “Welcome back, [YOUT_NAME]

Widget: example ComponentName watchWidget = new ComponentName(context, ClubWidget.class); Intent intent = new Intent(context, ClubWidget.class); intent.setAction(WIFI_WIDGET_CLICKED); PendingIntent pending = PendingIntent.getBroadcast(context, 0, intent, 0); views.setOnClickPendingIntent(R.id.appwidget_te xt, pending); appWidgetManager.updateAppWidget(appWidgetI d, views);

Widget: practice Create App Widget: TossWidget On layout put ImageView with Toss When user click toss, show Toast values from 1 to 6 Random r = new Random(); int value = r.nextInt(6)+1;

Homework Create Widget It should have 1 ImageView, 1 Button When user clicks on button ImageView image should be changed

Questions? Any questions?

Thank you Thank you for your attention