[android-developers] Set Call Forward

2010-05-24 Thread Gameboy
Present I want to set call forward in my application rather in calling
settings of phone, but seems I can not find public api or intent to
use. Anyone knows that?

BTW, I search source code of android, there are similar code used by
android, however it needs to invoke internal class Phone:

package com.android.internal.telephony;

void setCallForwardingOption
(int commandInterfaceCFReason,
int commandInterfaceCFAction,
String dialingNumber,
int timerSeconds,
Message onComplete);

Does anyone know some replacement way to invoke from application by
using public api?

-- 
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] Problem: set projection matrix in GLSurfaceview.onDrawFrame

2009-10-16 Thread Gameboy

When I try to set projection matrix in GLSurfaceview.onDrawFrame, but
seems it does not work fine. The parameters of glOrthof does not
change size and shape of graphics elements, graph becomes very small.

Part of code as below, does anybody know the reason?

// Display something in second viewport at top-right of screen with
different projection mode
gl.glViewport(mWidth*3/4, mHeight*3/4, mWidth/4, mHeight/4);
gl.glMatrixMode(GL10.GL_PROJECTION);
gl.glPushMatrix() ;
gl.glLoadIdentity();
gl.glOrthof(-mWidth/mHeight/3, mWidth/mHeight/3, -1/3f, 1/3f, 0.8f,
2);
// gl draws something here
gl.glPopMatrix() ;

--~--~-~--~~~---~--~~
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] GLSurfaceView is black after incoming call

2009-09-30 Thread Gameboy

I do a test with incoming call when GLSurfaceView is on top of screen,
after cancel incoming call, but screen becomes black.

I try to put requestRender() in onResume(), debug with logcat, but
seems some times it works when Render.onSurfaceChanged(GL10, int, int)
is invoked. Any one knows the reason, and how can I make GLSurfaceView
redrawing after incoming call?
--~--~-~--~~~---~--~~
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] Issue of selection 3D vertex (gluUnProject)

2009-09-16 Thread Gameboy

I try to select 3D vertex (1, 1, 1) from 2D screen, basic thought is
get near and far points with gluUnproject, then use line through these
two points to intersect selection point, but seems has problem with
test code.

float[] win= new float[3] ;
float[] world = new float[3] ;
1) GLU.gluProject(1, 1, 1, modelview, 0, project, 0, viewport, 0, win,
0);
2) GLU.gluUnProject(win[0], win[1], win[2], modelview, 0, project, 0,
viewport, 0, world, 0);
3) GLU.gluProject(world[0], world[1], world[2], modelview, 0, project,
0, viewport, 0, win, 0);

1) returns correct values as screen selection, but 2) return world
coordinate is not (1, 1, 1), smaller than it. Maybe because
gltranslate and glrotate results on it. So 3) returns different
windows screen coordinate as 1)'s.

It looks gluUnproject is not invertible with gluProject.

Does anybody has experience and idea to tell me how to scale 2)'s
result to match real world coordinate (1, 1, 1)?

--~--~-~--~~~---~--~~
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 use gluUnProject

2009-09-07 Thread Gameboy

I'm trying to use gluUnProject for checking touch selection on a 3D
object, but seems I can not do with current 1.5 emulator.

The method needs to know current viewport, model view matrix and
project matrix, I'm trying to use G11 gl to query but get nothing with
below codes:

int[] viewport = new int[4] ;
gl.glGetIntegerv(GL11.GL_VIEWPORT, viewport, 0) ;
float[] modelview = new float[16] ;
gl.glGetFloatv(gl.GL_MODELVIEW_MATRIX, modelview, 0) ;
float[] project = new float[16] ;
gl.glGetFloatv(gl.GL_PROJECTION_MATRIX, project, 0) ;

Questions:
1) Is there other way to get these params?
2) Does current 1.5 emulator support these G11 feature?
--~--~-~--~~~---~--~~
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: GLSurfaceView does not invoke OnKeyDown(...)

2009-09-01 Thread Gameboy

Wow, it works only with setFocusableInTouchMode(true) (strange
meaning, I have not read details in android yet). Remember I have
tried with it but seems because the thread does not work to hide the
reason.

Well you all give me clues to have the second try, thanks a lot!

--~--~-~--~~~---~--~~
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] GLSurfaceView does not invoke OnKeyDown(...)

2009-08-29 Thread Gameboy

I'm trying to use SDK 1.5 for developing app on opengl feautre, but
GLSurfaceView does not invoke OnKeyDown(...) any more, what's reason?
App runs on windows emulator.

There is sample code in SDK document:

 class MyGLSurfaceView extends GLSurfaceView {

 private MyRenderer mMyRenderer;

 public void start() {
 mMyRenderer = ...;
 setRenderer(mMyRenderer);
 }

 public boolean onKeyDown(int keyCode, KeyEvent event) {
 if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
 queueEvent(new Runnable() {
 // This method will be called on the rendering
 // thread:
 public void run() {
 mMyRenderer.handleDpadCenter();
 }});
 return true;
 }
 return super.onKeyDown(keyCode, event);
 }
 }

--~--~-~--~~~---~--~~
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 there any interface for setting Z order of View

2009-01-04 Thread Gameboy

There is only few words in the api doc of class SurfaceView: The
surface is Z ordered..

Is there any interface for setting Z order of View?
--~--~-~--~~~---~--~~
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] Does SensorManager work on emulator of SDK1.0?

2008-12-04 Thread Gameboy

Seems I can not let SensorManager work on SDK1.0 emulator, just copy
some code from samples:

mSensorManager = (SensorManager)getSystemService
(Context.SENSOR_SERVICE);

mSensorManager.registerListener(mGraphView,
SensorManager.SENSOR_ACCELEROMETER |
SensorManager.SENSOR_MAGNETIC_FIELD |
SensorManager.SENSOR_ORIENTATION,
SensorManager.SENSOR_DELAY_FASTEST);

SensorListener is not trigged in its callbacks:
public void onSensorChanged(int sensor, float[] values)
public void onAccuracyChanged(int sensor, int accuracy)

Not sure it's emulator limitation or need other simulator tool to
active sensor change?

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: another new return of findViewById???

2008-11-25 Thread Gameboy

I add android:configChanges=orientation in AndroidManifest.xml, but
seems it does not work, onConfigurationChanged(Configuration
newConfig) is not invoked when rotating. And the activity is still be
detroyed and recreated again.

Copy andorid doc, not sure why not work:

---Otherwise, the activity will remain running and its
Activity.onConfigurationChanged  method called with the new
configuration.

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: adb Error: ADB server didn't ACK

2008-11-25 Thread Gameboy

I put following commands and fix it:

start emulator
telnet localhost 5554
kill

then seems everything recovers.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] another new return of findViewById???

2008-11-19 Thread Gameboy

I want to change content of edit text after changing orientaton, but
seems I get strange problem:

I use
mEditor = (EditText) findViewById(R.id.editor); in onCreate(), when
changing orientation, onCreate() will be invoked again, however seems
mEditor becomes new one after changing orientaton each time, mEditor
is not the same original instance before changing orientation, who can
tell me why and how can I get the original one?

I found another trick way but still look forward reason or better
path.


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: another new return of findViewById???

2008-11-19 Thread Gameboy

Thanks for clear out some my confusion. The real problem is after
rotation (second time), seems I lost control for mEditor, I can not
mEditor.setText(...), the edit text is set string same as before
rotation, very strange?!

Don't know what should do for layout xml either? And I'm afraid it may
be bug of android, I use winodws version, not try on Linux yet.

Layout for EditText:

EditText android:id=@+id/editor
android:layout_width=fill_parent
android:layout_height=0dip
android:autoText=true
android:capitalize=sentences
android:layout_weight=1
android:freezesText=true 
requestFocus /
/EditText

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---