[android-developers] using getSurfaceFrame to get display width/height?

2010-12-31 Thread Daniel Quach
So I'm trying out making a live wallpaper and I'm using the sample code provided in the SDK for the cube live wallpaper I wanted to use this code to get the height/width of the display @Override public void onCreate(SurfaceHolder surfaceHolder) { super.onCreate(surfaceHolder);

[android-developers] ImageView not refreshing/reflecting changes

2010-12-16 Thread Daniel Quach
I'm using a photo picker intent to choose an image and write it to an application-private file created via: FileOutputStream fos = openFileOutput(temp.jpg, Context.MODE_WORLD_WRITEABLE); fos.close(); return getFileStreamPath(temp.jpg); upon activity result, I set the ImageView's image URI to this

[android-developers] application crashes when trying to play media in res/raw

2010-11-15 Thread Daniel Quach
I have a small mp3 (326KB) in my res/raw folder. In my code, I have mPlayer = MediaPlayer.create(FakeCallScreen.this, R.raw.sample); mPlayer.prepare(); mPlayer.start(); The application just crashes when it tries to start the activity, I cannot figure out why. -- You received this message

[android-developers] Re: Phone Call Simulator App

2010-11-15 Thread Daniel Quach
ok, so I have this code to ensure that the launched fake call screen will activate even through a lock screen: getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); getWindow().addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON); Now, when the activity launches, I want the