You are on page 1of 11

Opening up!

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

Stand-alone > File Manager:


• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:file_browser"))

Stand-alone > DVB-T:


• Intent("android.intent.action.LAUNCH_AVOS",
Uti.parse("ACTION:dvbt"))
Internals
Brand: Build.Brand = archos
Model: Build.Model = Archos5
Product Key = XXXX-XXXX-XXXX-XXXX-XX
• Settings.System.getString(getContentResolver(),"archos.pro
duct_key")
Online registration:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:online_registration"))
Online firmware update:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:firmware_udpate_online"))
Internals con’t

Archos library update:


• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:arclib_update"))
Sound settings:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:sound_settings"))
Archos theme color:
• Intent("android.intent.action.LAUNCH_AVOS",
Uri.parse("ACTION:theme_color"))
Multimedia widget shortcuts
XML file detailing multimedia shortcuts
• /data/thumbs/home_shortcuts.xml
• Do not modify file just use it and let mediacenter edit it
• File syntax
Shortcut for directory/filename.ext
<home_shortcuts>
<file_version>0</file_version>
<shortcut>
<shortcut_type>SHORTCUT_(VIDEO|MUSIC|PHOTO)</shortcut_type>
<shortcut_etype>(RESUME|BOOKMARK)</shortcut_etype>
<file_type>TYPE_(VID|AUD|PIC)</file_type>
<file_etype>ETYPE_(AVI|MP4|MP3|JPG|...)</file_etype>
<file_name><![CDATA[filename]]></file_name>
<file_url><![CDATA[(videoentries|album|photoentries):directory/filename.ext]]></file_url>
<start_time>0</start_time>
<audio_track>0</audio_track>
<thumbnail_url><![CDATA[/data/thumbs/filename.ext.ATF]]></thumbnail_url>
</shortcut>
</home_shortcuts>
Launch item from shortcut xml file

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

Thumbnails image proprietary format:


• ATF contains a raw YUV422 image field that can be
displayed (cf. ArchosAPIdemo code)

BitmapDrawable dw = null;
AtfFactory ATFObject = new
AtfFactory(ThumbnailUrl);
dw = ATFObject.getDrawable();

You might also like