[XPERIA X10 Android Development] alzbac:
It works but i did something wrong.Still video and picture buttons aren't working.:(

How can I know component name?

I replaced sonyericson blablagallery with this

const-string v3, "com.cooliris.media"

const-string v4, "com.cooliris.media"

Here is the full version:

.class public Lcom/sonyericsson/mediawidget/MediaAppWidgetProvider;

.super Landroid/appwidget/AppWidgetProvider;

.source "MediaAppWidgetProvider.java"

# static fields

.field private static final ACTIVITY_GALLERY:Ljava/lang/String; = "com.sonyericsson.gallery.Gallery"

.field private static final PACKAGE_GALLERY:Ljava/lang/String; = "com.sonyericsson.gallery"

# direct methods

.method public constructor <init>()V

.locals 0

.prologue

.line 31

invoke-direct {p0}, Landroid/appwidget/AppWidgetProvider;-><init>()V

return-void

.end method

.method private setMusicIntent(Landroid/content/Context;Landroid/widget/RemoteViews;)V

.locals 4

.parameter "context"

.parameter "views"

.prologue

const/4 v3, 0x0

.line 55

new-instance v0, Landroid/content/Intent;

const-string v2, "android.intent.action.MUSIC_PLAYER"

invoke-direct {v0, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

.line 57

.local v0, musicIntent:Landroid/content/Intent;

invoke-static {p1, v3, v0, v3}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

move-result-object v1

.line 59

.local v1, pendingMusicIntent:Landroid/app/PendingIntent;

const v2, 0x7f060001

invoke-virtual {p2, v2, v1}, Landroid/widget/RemoteViews;->setOnClickPendingIntent(ILandroid/app/PendingIntent;)V

.line 60

return-void

.end method

.method private setPhotoIntent(Landroid/content/Context;Landroid/widget/RemoteViews;)V

.locals 6

.parameter "context"

.parameter "views"

.prologue

const/4 v5, 0x0

.line 63

new-instance v2, Landroid/content/Intent;

const-string v3, "android.intent.action.MAIN"

invoke-direct {v2, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

.line 64

.local v2, photoIntent:Landroid/content/Intent;

const-string v3, "android.intent.category.LAUNCHER"

invoke-virtual {v2, v3}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;

.line 66

new-instance v0, Landroid/content/ComponentName;

const-string v3, "com.cooliris.media"

const-string v4, "com.cooliris.media"

invoke-direct {v0, v3, v4}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V

.line 67

.local v0, galleryComponentName:Landroid/content/ComponentName;

invoke-virtual {v2, v0}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;

.line 68

invoke-static {p1, v5, v2, v5}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

move-result-object v1

.line 70

.local v1, pendingPhotoIntent:Landroid/app/PendingIntent;

const/high16 v3, 0x7f06

invoke-virtual {p2, v3, v1}, Landroid/widget/RemoteViews;->setOnClickPendingIntent(ILandroid/app/PendingIntent;)V

.line 71

return-void

.end method

.method private setVideoIntent(Landroid/content/Context;Landroid/widget/RemoteViews;)V

.locals 5

.parameter "context"

.parameter "views"

.prologue

const/4 v4, 0x0

.line 74

new-instance v1, Landroid/content/Intent;

const-string v2, "android.intent.action.VIEW"

invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

.line 75

.local v1, videoIntent:Landroid/content/Intent;

sget-object v2, Landroid/provider/MediaStore$Video$Media;->EXTERNAL_CONTENT_URI:Landroid/net/Uri;

const-string v3, "vnd.android.cursor.dir/video"

invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->setDataAndType(Landroid/net/Uri;Ljava/lang/String;)Landroid/content/Intent;

.line 78

invoke-static {p1, v4, v1, v4}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

move-result-object v0

.line 80

.local v0, pendingVideoIntent:Landroid/app/PendingIntent;

const v2, 0x7f060002

invoke-virtual {p2, v2, v0}, Landroid/widget/RemoteViews;->setOnClickPendingIntent(ILandroid/app/PendingIntent;)V

.line 81

return-void

.end method

# virtual methods

.method public onUpdate(Landroid/content/Context;Landroid/appwidget/AppWidgetManager;[I)V

.locals 6

.parameter "context"

.parameter "appWidgetManager"

.parameter "appWidgetIds"

.prologue

.line 39

array-length v2, p3

.line 41

.local v2, length:I

const/4 v1, 0x0

.local v1, i:I

:goto_0

if-ge v1, v2, :cond_0

.line 42

aget v0, p3, v1

.line 44

.local v0, appWidgetId:I

new-instance v3, Landroid/widget/RemoteViews;

invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

move-result-object v4

const/high16 v5, 0x7f03

invoke-direct {v3, v4, v5}, Landroid/widget/RemoteViews;-><init>(Ljava/lang/String;I)V

.line 46

.local v3, views:Landroid/widget/RemoteViews;

invoke-direct {p0, p1, v3}, Lcom/sonyericsson/mediawidget/MediaAppWidgetProvider;->setMusicIntent(Landroid/content/Context;Landroid/widget/RemoteViews;)V

.line 47

invoke-direct {p0, p1, v3}, Lcom/sonyericsson/mediawidget/MediaAppWidgetProvider;->setPhotoIntent(Landroid/content/Context;Landroid/widget/RemoteViews;)V

.line 48

invoke-direct {p0, p1, v3}, Lcom/sonyericsson/mediawidget/MediaAppWidgetProvider;->setVideoIntent(Landroid/content/Context;Landroid/widget/RemoteViews;)V

.line 50

invoke-virtual {p2, v0, v3}, Landroid/appwidget/AppWidgetManager;->updateAppWidget(ILandroid/widget/RemoteViews;)V

.line 41

add-int/lit8 v1, v1, 0x1

goto :goto_0

.line 52

.end local v0 #appWidgetId:I

.end local v3 #views:Landroid/widget/RemoteViews;

:cond_0

return-void

.end method

Pls help.