[android-developers] Re: How to customize the lock screen?

2009-08-30 Thread alucard20004

As until now I still can't find the solution myself so allow me to do
this final bump.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to customize the lock screen?

2009-08-30 Thread alucard20004

As until now I still can't find the solution myself so allow me to do
this final bump.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to customize the lock screen?

2009-08-28 Thread alucard20004

I'm building a custom Home app. I want to change the lock screen to
match my theme.

Forexample changing the wallpaper.

What I see in the lock screen now is the default wallpaper.

I've tried searching this forum but can't find the solution. Yet I
found some apps on the market that can do this.

Thank you in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to customize the lock screen?

2009-08-28 Thread alucard20004

Anyone?

Or is it impossible with the sdk?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: OpenGL texture corrupted when there's an interruption.

2009-08-11 Thread alucard20004

Hi. Thank you for your reply.

Actually I've done as you suggested. Here's my full onSurfaceCreated()
and my activity's onPause():

public void onSurfaceCreated(GL10 gl, EGLConfig config) {

frontTextureId = loadTexture(gl, frontTextureBitmap);
gl.glEnable(GL10.GL_TEXTURE_2D);
gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
gl.glShadeModel(GL10.GL_SMOOTH);
gl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
gl.glClearDepthf(1.0f);
gl.glEnable(GL10.GL_DEPTH_TEST);
gl.glDepthFunc(GL10.GL_LEQUAL);
gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);
}

@Override
protected void onPause() {
super.onPause();
mySurfaceView.onPause();
}

While waiting for your answer I'll take a look at
TriangleRenderer.java again to see what is the difference between that
code and mine.

Thanks again.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] OpenGL texture corrupted when there's an interruption.

2009-08-10 Thread alucard20004

I took the source from API demos (TriangleRenderer.java)

Here's the code on how textures are loaded in onSurfaceCreated():


/*
 * Create our texture. This has to be done each time the
 * surface is created.
 */

int[] textures = new int[1];
gl.glGenTextures(1, textures, 0);

mTextureID = textures[0];
gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureID);

gl.glTexParameterf(GL10.GL_TEXTURE_2D,
GL10.GL_TEXTURE_MIN_FILTER,
GL10.GL_NEAREST);
gl.glTexParameterf(GL10.GL_TEXTURE_2D,
GL10.GL_TEXTURE_MAG_FILTER,
GL10.GL_LINEAR);

gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,
GL10.GL_CLAMP_TO_EDGE);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,
GL10.GL_CLAMP_TO_EDGE);

gl.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE,
GL10.GL_REPLACE);

InputStream is = mContext.getResources()
.openRawResource(R.drawable.robot);
Bitmap bitmap;
try {
bitmap = BitmapFactory.decodeStream(is);
} finally {
try {
is.close();
} catch(IOException e) {
// Ignore.
}
}

GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);
bitmap.recycle();





And here's how I mapped my texture:

/
public void onDrawFrame(GL10 gl) {

//Init
gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
gl.glMatrixMode(GL10.GL_MODELVIEW);
gl.glLoadIdentity();

//Draw Cube
gl.glPushMatrix();
gl.glTranslatef(0, 0, -2);
gl.glRotatef(azimuthZ, 0, 0, 1); //azimuthZ is
from the sensors
//texBuff and boxBuff are texture and box coordinates
gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, texBuff);
gl.glVertexPointer(3, GL10.GL_FLOAT, 0, boxBuff);

//top
gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, 4);
//bottom
gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 4, 4);
// followed by left, right, front and back
sides...
   gl.glPopMatrix();

/
Problem:
1. The box is rendering normally.
2. I press 'Call' button, the Dialer app comes up.
3. I press 'Back' button. My box app comes up.
4. The texture became corrupted...

- This does not happen if I press back while in the box app, and re-
launch the box app.

- This also does not happen in the Textured Triangle in API demos.

I've no idea what did I do wrong. -_-

Thank you in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] OpenGL ES - How to get the current ModelView matrix?

2009-08-03 Thread alucard20004

There's a function that gets the current matrix in OpenGL.

But there's no such function in OpenGL ES.

So I take a look at the API Demo app bundled with the SDK and found
MatrixGrabber.java with the getCurrentModelView function.

But... when I try to use it in my project, I got an error at this
line:

public void getCurrentModelView(GL10 gl) {
getMatrix(gl, GL10.GL_MODELVIEW, mModelView);
}

private void getMatrix(GL10 gl, int mode, float[] mat) {
MatrixTrackingGL gl2 = (MatrixTrackingGL) gl; // error at
this line
gl2.glMatrixMode(mode);
gl2.getMatrix(mat, 0);
 }

The error log was:
08-02 18:49:07.063: WARN/dalvikvm(1403): threadid=13: thread exiting
with uncaught exception (group=0x4000fe70)
08-02 18:49:07.063: ERROR/AndroidRuntime(1403): Uncaught handler:
thread GLThread exiting due to uncaught exception
08-02 18:49:07.063: ERROR/AndroidRuntime(1403):
java.lang.ClassCastException: android.opengl.GLErrorWrapper
08-02 18:49:07.063: ERROR/AndroidRuntime(1403): at
com.test.app.MatrixGrabber.getMatrix(MatrixGrabber.java:56)
08-02 18:49:07.063: ERROR/AndroidRuntime(1403): at
com.test.app.MatrixGrabber.getCurrentModelView(MatrixGrabber.java:43)
08-02 18:49:07.063: ERROR/AndroidRuntime(1403): at
com.test.app.MyRenderer.onDrawFrame(MyRenderer.java:454)


Here's MyRenderer.java's onDrawFrame() code:

public void onDrawFrame(GL10 gl) {
//Init
gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
gl.glMatrixMode(GL10.GL_MODELVIEW);
gl.glLoadIdentity();
mGrabber.getCurrentModelView(gl);


What did I do wrong? This method runs fine in API Demo. It accept the
GL10 object like I did in my project.

Thank you in advance. =)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Orientation Sensor return false values. And getRotationMatrix() also doesn't work. Is my ADP1 broke?

2009-08-01 Thread alucard20004

Hi. I have 2 main questions:

Question 1. Orientation Sensor return false values. Or my dev phone 1
broke?

The 'pitch' value skip between 70 to 110.

Please take a look at the log:

08-01 15:21:56.810: DEBUG/onSensorChanged(1605): Azimuth: 262.0,
Pitch: -72.0, Roll: -18.0
08-01 15:21:56.850: DEBUG/onSensorChanged(1605): Azimuth: 260.0,
Pitch: -73.0, Roll: -17.0
08-01 15:21:56.890: DEBUG/onSensorChanged(1605): Azimuth: 258.0,
Pitch: -74.0, Roll: -16.0
08-01 15:21:56.970: DEBUG/onSensorChanged(1605): Azimuth: 257.0,
Pitch: -106.0, Roll: -16.0
08-01 15:21:57.010: DEBUG/onSensorChanged(1605): Azimuth: 256.0,
Pitch: -106.0, Roll: -15.0
08-01 15:21:57.050: DEBUG/onSensorChanged(1605): Azimuth: 257.0,
Pitch: -105.0, Roll: -15.0
08-01 15:21:57.090: DEBUG/onSensorChanged(1605): Azimuth: 257.0,
Pitch: -106.0, Roll: -15.0
08-01 15:21:57.130: DEBUG/onSensorChanged(1605): Azimuth: 258.0,
Pitch: -107.0, Roll: -15.0
08-01 15:21:57.170: DEBUG/onSensorChanged(1605): Azimuth: 259.0,
Pitch: -108.0, Roll: -16.0
08-01 15:21:57.210: DEBUG/onSensorChanged(1605): Azimuth: 261.0,
Pitch: -109.0, Roll: -17.0
08-01 15:21:57.260: DEBUG/onSensorChanged(1605): Azimuth: 260.0,
Pitch: -109.0, Roll: -18.0
08-01 15:21:57.310: DEBUG/onSensorChanged(1605): Azimuth: 258.0,
Pitch: -107.0, Roll: -17.0
08-01 15:21:57.360: DEBUG/onSensorChanged(1605): Azimuth: 257.0,
Pitch: -106.0, Roll: -16.0
08-01 15:21:57.400: DEBUG/onSensorChanged(1605): Azimuth: 255.0,
Pitch: -75.0, Roll: -15.0
08-01 15:21:57.480: DEBUG/onSensorChanged(1605): Azimuth: 257.0,
Pitch: -73.0, Roll: -16.0
08-01 15:21:57.600: DEBUG/onSensorChanged(1605): Azimuth: 258.0,
Pitch: -73.0, Roll: -16.0
08-01 15:21:57.640: DEBUG/onSensorChanged(1605): Azimuth: 256.0,
Pitch: -74.0, Roll: -15.0
08-01 15:21:57.680: DEBUG/onSensorChanged(1605): Azimuth: 258.0,
Pitch: -74.0, Roll: -15.0
08-01 15:21:57.720: DEBUG/onSensorChanged(1605): Azimuth: 257.0,
Pitch: -75.0, Roll: -14.0
08-01 15:21:57.800: DEBUG/onSensorChanged(1605): Azimuth: 256.0,
Pitch: -75.0, Roll: -14.0
08-01 15:21:57.880: DEBUG/onSensorChanged(1605): Azimuth: 257.0,
Pitch: -74.0, Roll: -15.0
08-01 15:21:57.960: DEBUG/onSensorChanged(1605): Azimuth: 257.0,
Pitch: -75.0, Roll: -15.0
08-01 15:21:58.040: DEBUG/onSensorChanged(1605): Azimuth: 256.0,
Pitch: -76.0, Roll: -14.0
08-01 15:21:58.120: DEBUG/onSensorChanged(1605): Azimuth: 257.0,
Pitch: -105.0, Roll: -15.0
08-01 15:21:58.170: DEBUG/onSensorChanged(1605): Azimuth: 256.0,
Pitch: -75.0, Roll: -15.0
08-01 15:21:58.210: DEBUG/onSensorChanged(1605): Azimuth: 258.0,
Pitch: -75.0, Roll: -15.0
08-01 15:21:58.250: DEBUG/onSensorChanged(1605): Azimuth: 257.0,
Pitch: -105.0, Roll: -15.0
08-01 15:21:58.290: DEBUG/onSensorChanged(1605): Azimuth: 257.0,
Pitch: -104.0, Roll: -14.0
08-01 15:21:58.370: DEBUG/onSensorChanged(1605): Azimuth: 255.0,
Pitch: -105.0, Roll: -14.0
08-01 15:21:58.420: DEBUG/onSensorChanged(1605): Azimuth: 256.0,
Pitch: -105.0, Roll: -14.0

my code does nothing but to print out the values:
//
public void onSensorChanged(SensorEvent event) {
int type = event.sensor.getType();
switch(type){
case Sensor.TYPE_ORIENTATION:
Log.d(onSensorChanged, Azimuth:  + event.values[0] + , Pitch:  +
event.values[1] + , Roll:  + event.values[2]);
}
//


Question 2. How to get the getRotationMatrix() to work?

I read the SensorEvent docs and notice this:
Note: It is preferable to use getRotationMatrix() in conjunction with
remapCoordinateSystem() and getOrientation()  to compute these values;
while it may be more expensive, it is usually more accurate.

So I think may be this can help me with my sensor problem in question
1.

So I tried using it and it always return false. (not successful and
nothing is filled in R[])

I made sure I give it correct set of parameters. (R[], I[],
valuesFromAccelSensor[], valuesFromMagneticSensor[])

I tried both 9 and 16 sizes arrays for both R and I. The method still
return false.

Thank you in advance! =)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Orientation Sensor return false values. And getRotationMatrix() also doesn't work. Is my ADP1 broke?

2009-08-01 Thread alucard20004

Let me edit the log so it's more readable:

08-01 15:37:38.170: DEBUG/onSensorChanged(1653): Pitch: -67.0
08-01 15:37:38.210: DEBUG/onSensorChanged(1653): Pitch: -67.0
08-01 15:37:38.250: DEBUG/onSensorChanged(1653): Pitch: -67.0
08-01 15:37:38.290: DEBUG/onSensorChanged(1653): Pitch: -68.0
08-01 15:37:38.330: DEBUG/onSensorChanged(1653): Pitch: -69.0
08-01 15:37:38.420: DEBUG/onSensorChanged(1653): Pitch: -110.0
08-01 15:37:38.460: DEBUG/onSensorChanged(1653): Pitch: -111.0
08-01 15:37:38.500: DEBUG/onSensorChanged(1653): Pitch: -111.0
08-01 15:37:38.590: DEBUG/onSensorChanged(1653): Pitch: -111.0
08-01 15:37:38.750: DEBUG/onSensorChanged(1653): Pitch: -112.0
08-01 15:37:38.790: DEBUG/onSensorChanged(1653): Pitch: -112.0
08-01 15:37:38.830: DEBUG/onSensorChanged(1653): Pitch: -112.0
08-01 15:37:38.880: DEBUG/onSensorChanged(1653): Pitch: -112.0
08-01 15:37:38.920: DEBUG/onSensorChanged(1653): Pitch: -69.0
08-01 15:37:39.000: DEBUG/onSensorChanged(1653): Pitch: -68.0
08-01 15:37:39.040: DEBUG/onSensorChanged(1653): Pitch: -68.0
08-01 15:37:39.120: DEBUG/onSensorChanged(1653): Pitch: -68.0
08-01 15:37:39.200: DEBUG/onSensorChanged(1653): Pitch: -68.0
08-01 15:37:39.240: DEBUG/onSensorChanged(1653): Pitch: -67.0
08-01 15:37:39.280: DEBUG/onSensorChanged(1653): Pitch: -68.0
08-01 15:37:39.330: DEBUG/onSensorChanged(1653): Pitch: -68.0
08-01 15:37:39.380: DEBUG/onSensorChanged(1653): Pitch: -69.0
08-01 15:37:39.430: DEBUG/onSensorChanged(1653): Pitch: -69.0
08-01 15:37:39.480: DEBUG/onSensorChanged(1653): Pitch: -70.0
08-01 15:37:39.520: DEBUG/onSensorChanged(1653): Pitch: -70.0
08-01 15:37:39.560: DEBUG/onSensorChanged(1653): Pitch: -70.0
08-01 15:37:39.600: DEBUG/onSensorChanged(1653): Pitch: -71.0
08-01 15:37:39.640: DEBUG/onSensorChanged(1653): Pitch: -72.0
08-01 15:37:39.680: DEBUG/onSensorChanged(1653): Pitch: -73.0
08-01 15:37:39.730: DEBUG/onSensorChanged(1653): Pitch: -107.0
08-01 15:37:39.770: DEBUG/onSensorChanged(1653): Pitch: -106.0
08-01 15:37:39.810: DEBUG/onSensorChanged(1653): Pitch: -108.0
08-01 15:37:39.850: DEBUG/onSensorChanged(1653): Pitch: -109.0
08-01 15:37:39.890: DEBUG/onSensorChanged(1653): Pitch: -109.0
08-01 15:37:39.930: DEBUG/onSensorChanged(1653): Pitch: -72.0
08-01 15:37:39.970: DEBUG/onSensorChanged(1653): Pitch: -72.0
08-01 15:37:40.010: DEBUG/onSensorChanged(1653): Pitch: -72.0
08-01 15:37:40.050: DEBUG/onSensorChanged(1653): Pitch: -75.0
08-01 15:37:40.090: DEBUG/onSensorChanged(1653): Pitch: -76.0

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Orientation Sensor return false values. And getRotationMatrix() also doesn't work. Is my ADP1 broke?

2009-08-01 Thread alucard20004

*** Solved ***

I read this blog:
http://mysticlakesoftware.blogspot.com/

and try what he suggested:

changing

case Sensor.TYPE_MAGNETIC_FIELD:
mag = event.values;

to

case Sensor.TYPE_MAGNETIC_FIELD:
mag = event.values.clone();

for all sensor types. Now the getRotationMatrix works. Thank you. =)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How did they made those solve the math to dismiss the Alarm Clock type apps?

2009-07-30 Thread alucard20004

I saw few of them on the market.

Actually I didn't download any of them yet.(I'm not in the country
that can access paid app)

But I'm just curious so allow me to ask those have access to these
alarm clock apps.

1. User can just turn off the phone. How did the developer prevent
user from turning-off the device?

2. If the user CAN turn off the device, how did the developer schedule
the 'math' activity to start next time the device is turned on?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Modifying the built-in Alarm Clock. No way to return to the snooze/dismiss dialog.

2009-07-30 Thread alucard20004

(Please excuse my imperfect English)

Hi. I'll get straight to the point.

I downloaded the built-in Alarm Clock source and trying to modify it
so that user need to play mini game in order to stop the alarm.

What I did:
1. I removed the dismiss and snooze button. (so user will have no
choice but to play mini-game to stop the alarm)

2. I also remove all dismiss() and snooze() from the dispatchKeyEvent
() method. to ensure that the alarm won't stop even the user press
back button and return to Home screen.

3. Now I plan to put my game in place of this alarm alert dialog(the
one that come up when an alarm goes off)

All I did is just for that - user will have no choice but to play
mini-game to stop the alarm

Problem:
- alarm goes off.
- I press 'back' button. The alert dialog(which soon will be my mini-
game) disappear and return to Home screen.
- Now I have no way to return to the dialog(my mini-game). And the
alarm is still ringing...

May I have some pointers? I've tried
android:alwaysRetainTaskState=true but still no luck.

Thank you in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] [repo/git/Ubuntu] Do I need to 'make' entire Android platform if I only want the Launcher?

2009-07-30 Thread alucard20004

Hi.

My goal:
- Re-build the (built-in)Launcher application and modify/re-skin it
then publish as the new .apk.

My current situation:
1. I installed Ubuntu on my machine and follow the instructions on
this page: http://source.android.com/download
2. I successfully execute $ repo sync. Now the 2.1GB source is in my
PC.

My question:
Allow me to ask before I continue to build the entire platform (which
is said to take up to 6GB including the source).

Q1. If I only need the Launcher then do I need to build the entire
platform?

Q2. I also read the page Using Eclipse for Android platform
development here : http://source.android.com/using-eclipse
and it said

Important: You will still be using make to build the files you will
actually run (in the emulator or on a device). You will be using
Eclipse to edit files and verify that they compile, but when you want
to run something you will need to make sure files are saved in Eclipse
and run make in a shell. The Eclipse build is just for error
checking.

Does this also means I'll need to re-build the entire platform each
time I make changes to the source?


Thank you in advance.

P.S. My apology if I sound stupid in your eyes. I actually am an
artist and getting this far to install Ubuntu is already a miracle for
me lol. Thanks again.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Spent 3 weeks building 'Launcher'(Home) application. Please help. T_T

2009-07-28 Thread alucard20004

(Please excuse me for my imperfect English.)

Hi. this is me:
- My skill  :  80% artist / 20% programming.
- Now 6 months into Android development.
- My goal is to use my art skills to customize the Launcher
application.

Current situation: (please forgive this long story)
1. I'm trying to build the Launcher application.
2. took the source from  http://source.android.com/ using the Gitweb
web interface.
3. downloaded the source snapshot, the one with the tag: master)
4. The project cannot be built. There are a lot of errors in the
source code. I try to fix the source.

// Now let me brief what I found. I shouldn't include ALL code here,
right?

*** 4.1 I removed a lot of code that I cannot fix. (eg. everything
about the search widget, some wallpaper/notification-related code and
many more)

*** 4.2 I found these variables a lot: mScrollX, mScrollY, mLeft,
mRight, mTop, mBottom. They are being used in the source files but the
are NOT declared. So I declare them and try to give them value by
calling getSrollX, getLeft, getTop, ...

5. Finally the project can be built and run on the G1 device. But it
perform weird(as expected). the scrolling is not correct. Snapping to
screen does not work correctly as well.

6. I tried so hard messing around 'Workspace.java' file. Finally
things look a lot better now, better snapping and scrolling.

7. But trackball scrolling still produce weird behavior. There're
screen orientation change bugs too. The 'docked' desktop shortcuts and
widgets won't snap to screen.


End of my story. I won't ask for a solution to each bugs.

But since it took me 3 weeks now. I'd like to ask:

Anyone succeed in building this Launcher app? Could you share your
knowledge on how to do it?

I'm just an artist who want to publish my art skill. It'd be a
pleasure if anyone can point me to some error-free source code of this
Launcher app. So I can focus on my art.

I do hate asking for a solution like this. But I do believe I gave it
enough (programming)effort as an artist.

P.S. allow me to rant a bit: ... if the source code doesn't work then
why do they give us in the first place?
How can the public contribute back to google if we can not build the
project? I don't get how this open-source/accept public contribution
system work.  Am I missing something?

Thank you in advance.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Spent 3 weeks building 'Launcher'(Home) application. Please help. T_T

2009-07-28 Thread alucard20004

Hi. Thank you for the fast reply.

build the Android source tree from where I got Launcher's source ?

I assume that can't be done in Windows, correct? according to this
message from http://source.android.com/download

:

To build the Android source files, you will need to use Linux or Mac
OS. Building under Windows is not currently supported.

On Jul 28, 11:39 pm, Romain Guy romain...@google.com wrote:
 The source code works but cannot be compiled with the SDK. You need to
 build the Android source tree from where you got Launcher's source
 code and build Launcher in that tree.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to compare two (simple) images?

2009-07-20 Thread alucard20004

(please forgive my imperfect English.)

Hi. I'll get straight to the point.

Please note that I haven't code anything in this project just yet.
This is only an idea.

In  human language, my goal is to:

1. Take a picture of a blank white A4 paper.
2. Verify (by code) that the picture is White. (this's why I include
'simple' in the topic)

I mean, the program should be able to tell if the user just took the
picture of white paper and not any other colors.


For the code...
I can guess that the actual process should be:

1. Use Camera API to take a picture. // this step should be easy
2. Convert it to Bitmap. // this step should also be easy
3. Verify that it is White. //*** now I need some help here.

How can I do step 3? I look up the docs and found this is the Bitmap
class:

getPixels  (int[] pixels, int offset, int stride, int x, int y, int
width, int height)

I can use this and compare the data pixel-by-pixel but it seems
expensive.

Could anyone recommend me a more proper way(if there is) to do this
please?

Thank you in advance.



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to get the list of built-in applications?

2009-07-09 Thread alucard20004

Hi. My apology for my imperfect English.

I'm trying to change the icons of the built-in applications.

I built the Launcher source obtained from the Android open source
project (ofcourse it doesn't work rightaway, need to make a lot of
modifications).



The list of built-in applications for Android 1.5 can be found in this
page:

http://developer.android.com/sdk/android-1.5.html



Now I can change these icons by comparing their name (eg. Alarm
Clock).

But this is a very bad solution. I don't know if it'll work with other
locales. Forexample, if the device is using Spanish locale, I don't
think the word Alarm Clock will work anymore.


So, topic.

Here's the code snippet found in LauncherModel.java where I can use my
own stupid method to alter the built-in apps icons.


//
for (int i = 0; i  count  !mStopped; i++) {
ResolveInfo info = apps.get(i);
ApplicationInfo application =
makeAndCacheApplicationInfo(manager,
appInfoCache, info);

// from here, this is what I don't want to do:
if(application.title.toString().equals(Alarm Clock));
application.icon = context.getResources
().getDrawable(R.drawable.icon_custom);

Thank you in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] - OpenGL - Question about gluProject().

2009-07-01 Thread alucard20004

Hi.

My apology for my imperfect English.

I'm new to OpenGL.

Now I have 9 objects rotating / changing their color on the screen.

Next, I'm trying to check if I touched them / which one of them just
got touched. Or if I touched the empty spaces between them.

I've read the document about

http://developer.android.com/reference/android/opengl/GLU.html#gluProject%28float,%20float,%20float,%20float[],%20int,%20float[],%20int,%20int[],%20int,%20float[],%20int%29

but still have no idea about the required parameters or how/where to
get them.

I don't ask for the solution. But it'd be great if you can recommend
me if I'm taking the right direction? Or please guide me to good
places/resources where I can learn more about this.

Thank you in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Is it legal to customize and publish the built-in applications?

2009-06-01 Thread alucard20004

Like the Alarm Clock, Calculator, etc.

I see that the source is available at :

http://source.android.com/

For example, the alarm clock I'm going to modify will look exactly
the same as the built-in one, but there'll be a lot more functions.

Is it legal to extend the functionality of the Alarm Clock and publish
it as paid application?

I'm new to the open-souce stuff. I believe it's 99% doable but still
want to ask just to make sure.

Thanks in advance.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Is Idea protected by copyright?

2009-06-01 Thread alucard20004

If I publish a paid application with very good idea and concept. And
realize later that someone already publish an app with this idea. What
will happen?

I understand that this may be difficult to answer.

Perhaps I'm not posting this seeking for absolute answer, but for
recommendations or a place where I can find more information and learn
more about this kind of stuff.

Thanks in advance. =)




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Copyright question.

2009-06-01 Thread alucard20004

Hello.

Is it ok if:
1. I took the source code of the built-in applications that come with
the phone(like Alarm Clock, Dialler, etc.), extend it and publish as
paid application.

Well some of them will remain almost the same look. The user will
know that I copied these apps from the built-in ones. But There will
be many more functions added to the final apps, compared to the built-
in ones.

the source for built-int application can be found here:

http://source.android.com/

or

2. I invented and publish(as paid app) some great app wtih great idea.

For example, an alarm clock where user have to ... to stop the
alarm, where ... is a very unique idea that make my app sell so
well.

But found out later that someone already published paid app using the
same idea(which maybe on iPhone / JavaME or any other platform
including Android itself).



Question: Will I get into any copyright problem?



I believe it's ok(especially in case No.1) but I still want to ask
experts to make sure. Better safe than sorry, right?

Please recommend a good place to find more information / learn more
about how to avoid getting involved in this copyright/idea stealing
stuff.

If possible, please recommend a checklist of things to do before
publishing your paid application. I do realize that Google have this
list available in their Android Developer site. But that list said
nothing about copyright stuff.

My apology if it's stupid question. I'm quite new here.

Thanks in advance. =)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---