home screen widgets

Download Home Screen Widgets

If you can't read please download the document

Upload: joshdobbs

Post on 16-Apr-2017

2.629 views

Category:

Technology


0 download

TRANSCRIPT

Recommendation of a Strategy

Intro to Android Home Screen Widgets

So Cal Code CampJan 29 2011

Josh Dobbs

What's a widget?

Music Widgets

Info Widgets

More Widgets

Why build a widget?

Give users information at a glance

Control apps that run in the background

Toggle settings(wifi, ringer, bluetooth, etc)

Give users quick access to core functionality

Need another reason?

Keep your apps in front of your users and they are less likely to forget about them

Design Guidelines

https://docs.google.com/document/d/1xjkCt2V84gQZCDRie1rA0cDKSsYMHinB7TytOuk_dFY/edit?hl=en#

Design Guidelines

3 recommended sizes

Widget frames

Graphic tips

Design Guidelines

Android 1.6 (Donut)White Theme

Android 2.2 (Froyo)Dark theme

Simple WebCam Viewer Widget

Android 1.6 (Donut)White Theme

Android 2.2 (Froyo)Dark theme

four things needed to add a widget to your app

AppWidgetProvider(xml)

WidgetLayout(xml)

AppWidgetProvider Implementation(java)

Update the manifest

Tells the Android OS that your app has a widget

dip?

!=

What's a dip

Dip = density independent pixel

one dip is 1 pixel on a 160 dpi screen(ex screen size 240 x 320 1.5 x 2 inches is approx 1 dip = 1 pixel

AppWidgetProvider

Widgets are remote views(not applications)

How do widgets get updated?

The app that supplies the UI for the widget is a broadcast receiver

What does a widget receive?

intents(pending intents) that are sent by sendBroadcast

Four main intents

ACTION_APPWIDGET_UPDATE

ACTION_APPWIDGET_DELETED

ACTION_APPWIDGET_ENABLED

ACTION_APPWIDGET_DISABLED

Thank You

Josh Dobbshttp://[email protected]