Professional Documents
Culture Documents
Objective:
• Detail Archos multimedia API in order to provide means for
developers to express their creativity and offer alternative
multimedia launcher widgets
Means:
• Publication of a simple
demo application
ArchosAPIdemo available
as a standard apk with
source code at
http://www.archos.com
Video widget items
Video > Internal Storage:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:video_internal"))
Video > Network:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:video_network"))
Video > TV Scheduler:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:video_tv_scheduler"))
Video > Video Recorder:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:video_rec"))
Music widget items
Music > Internal Storage:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:music_internal"))
Music > Network:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:music_network"))
Music > FM Radio:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:music_fm_radio"))
Photo/Games widget items
Photo > Internal Storage:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:photo_internal"))
Photo > Network:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:photo_network"))
Games > Flash:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:games_flash_apps"))
Games > playin'tv:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:games_playintv"))
Media club widget items
Media Club > Web TV:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:media_club_web_tv"))
Media Club > Web Radio:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:media_club_web_radio"))
Media Club > Video:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:media_club_vod"))
Media Club > Music:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:media_club_music"))
Media Club > Archos Store:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:media_club_archos_store"))
Miscellaneous
Basic definitions
String ACTION_LAUNCH_AVOS = "android.intent.action.LAUNCH_AVOS";
// Inferred from <shortcut_type> tag in home_shortcuts.xml
String MediaPlay[] = { "video_play", "music_play", "photo_play" }
// Tag <shortcut_etype> in home_shortcuts.xml
String ShortcutEtype[] = { "bookmark", "resume"};
// Tag <file_url> in home_shortcuts.xml
String FileUrl;
Play shortcut:
String avosCommand = "ACTION:" + MediaPlay[0|1|2];
avosCommand += ",url=" + FileUrl;
avosCommand += ",etype=" + ShortcutEtype[0|1];
final Intent startAvos = new Intent(Intent.ACTION_LAUNCH_AVOS,
Uri.parse(avosCommand));
startAvos.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK );
startActivity(startAvos);
Remove shortcut:
String avosCommand = "ACTION" + MediaPlay[0|1|2];
avosCommand+=",url=" + FileUrl;
avosCommand+=",etype=" + ShortcutEtype[0|1];
avosCommand+=",cmd=remove";
final Intent sendAvos = new Intent(Intent.ACTION_LAUNCH_AVOS, Uri.parse(avosCommand));
sendBroadcast(sendAvos);
Thumbnails image format and display
BitmapDrawable dw = null;
AtfFactory ATFObject = new
AtfFactory(ThumbnailUrl);
dw = ATFObject.getDrawable();