[android-developers] Re: how can i check landscap orientation ?
Hi make use of sensorListener and it will work . i have used the same .. when u use sensorlistener and sensormanager in ur view it has got an override method as onSizeChanged which return the width and height. so using change in size u will get the orientation Below is a code for u of orientation check . enjoy : import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.view.View; import android.hardware.SensorManager; import android.hardware.SensorListener; import android.util.Log; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.RectF; public class Midlet extends Activity { /** Tag string for our debug logs */ private static final String TAG = Sensors; private SensorManager mSensorManager; private GraphView mGraphView; private class GraphView extends View implements SensorListener { public GraphView(Context context) { super(context); } @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { System.out.println(on sizechanged); super.onSizeChanged(w, h, oldw, oldh); } @Override protected void onDraw(Canvas canvas) { } public void onSensorChanged(int sensor, float[] values) { } public void onAccuracyChanged(int sensor, int accuracy) { // TODO Auto-generated method stub } } /** * Initialization of the Activity after it is first created. Must at least * call {...@link android.app.Activity#setContentView setContentView()} to * describe what is to be displayed in the screen. */ @Override protected void onCreate(Bundle savedInstanceState) { // Be sure to call the super class. super.onCreate(savedInstanceState); mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); mGraphView = new GraphView(this); setContentView(mGraphView); } @Override protected void onResume() { super.onResume(); mSensorManager.registerListener(mGraphView, SensorManager.SENSOR_ACCELEROMETER | SensorManager.SENSOR_MAGNETIC_FIELD | SensorManager.SENSOR_ORIENTATION, SensorManager.SENSOR_DELAY_FASTEST); } @Override protected void onStop() { mSensorManager.unregisterListener(mGraphView); super.onStop(); } } On Wed, Mar 25, 2009 at 11:26 AM, Suman ipeg.stud...@gmail.com wrote: Hi Many thanks for replies. I actually want to do something if the screen orientation is landscap. Am trying something like this... if(getRequestedOrientation()== landscap) { { But it was not working. So if the way is correct then please tell me if(getRequestedOrientation()== ) Or suggest something another way. 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] Drawable or Uri for Notification icon
The Notification API allows to set a drawable resource id for the icon of a notification. This drawable resource id is used to put the icon in the status bar and in the expanded window shade. This is a limitation if the icon images are to be represented by a Drawable or from a content provider at runtime. I propose that the Notification class adds fields (or methods) that would allow to set a Drawable or an Uri for the notification icon. This Drawable or Uri would then be used by the system notification service to put the icon in the status bar and in the expanded window shade. Android team, could you provide your comments? --~--~-~--~~~---~--~~ 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 can I encrypt and decrypt the data
Hi, I want to write an app which encrypts the data and decrypts it into original data. But I dont know how to do it. can any one please guide me how to do it. if possible please show me some example. Thanks, Manoj. --~--~-~--~~~---~--~~ 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 show my ProgressBar
I still have some question on it. If I put the backgroundWork() in another thread, how can the main UI thread know background thread has finished? And how to pause the main UI thread to wait for backgroundWork(). On Mar 25, 12:44 pm, Marco Nelissen marc...@android.com wrote: The problem is that your 'backgroundWork() method is not actually running in the background, but in the main UI thread. You'll need to do the work in a separate thread. On Tue, Mar 24, 2009 at 8:02 PM, guishenl...@gmail.com guishenl...@gmail.com wrote: I want to show a ProgressBar while doing some background operation, but my code seems not to work. I hope someone can help me to solve this problem. Thank you in advance!Here is my code and explanation : public boolean onMenuItemSelected(int featureId, MenuItem item) { switch(item.getItemId()) { case CASEONE_ID: ProgressBar progress = (ProgressBar)findViewById (R.id.ProgressBar); progress.setVisibility(View.VISIBLE); progress.bringToFront(); progress.invalidate(); backgroundWork(); progress.setVisibility(View.GONE); progress.invalidate(); return true; } return super.onMenuItemSelected(featureId, item); }/*In fact I never see the progressbar by this code, instead the program will keep frozen until backgroundWork() finish. But what I want is the progressbar can appear in the screen while backgroungWork () is being processed. private void backgroundWork(){ for(int i=0;i1E8;i++); }/*This is not the exact work I did in my own program. I change it to this form is just to tell you my operation will occupy the processor for long time.*/- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 show my ProgressBar
Make use of Handlers to tell the main thread when the other thread has stopped or completed its task. final Handler handler = new Handler() { @Override public void handleMessage(Message message) { //do something here. Will be done on main thread } }; Use it in your thread like this handler.sendMessage(message); On 25-Mar-09, at 12:01 PM, guishenl...@gmail.com wrote: I still have some question on it. If I put the backgroundWork() in another thread, how can the main UI thread know background thread has finished? And how to pause the main UI thread to wait for backgroundWork(). On Mar 25, 12:44 pm, Marco Nelissen marc...@android.com wrote: The problem is that your 'backgroundWork() method is not actually running in the background, but in the main UI thread. You'll need to do the work in a separate thread. On Tue, Mar 24, 2009 at 8:02 PM, guishenl...@gmail.com guishenl...@gmail.com wrote: I want to show a ProgressBar while doing some background operation, but my code seems not to work. I hope someone can help me to solve this problem. Thank you in advance!Here is my code and explanation : public boolean onMenuItemSelected(int featureId, MenuItem item) { switch(item.getItemId()) { case CASEONE_ID: ProgressBar progress = (ProgressBar)findViewById (R.id.ProgressBar); progress.setVisibility(View.VISIBLE); progress.bringToFront(); progress.invalidate(); backgroundWork(); progress.setVisibility(View.GONE); progress.invalidate(); return true; } return super.onMenuItemSelected(featureId, item); }/*In fact I never see the progressbar by this code, instead the program will keep frozen until backgroundWork() finish. But what I want is the progressbar can appear in the screen while backgroungWork () is being processed. private void backgroundWork(){ for(int i=0;i1E8;i++); }/*This is not the exact work I did in my own program. I change it to this form is just to tell you my operation will occupy the processor for long time.*/- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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] DexClassLoader Feature in the Cupcake
Hi all, Can anyone please provide some information regarding the reflection API DexclassLoader, which will be includeed in cupcake release?? In the latest development of the cupcake, whether this feature is added or still to be done?? I f already included then any reference which will explain about how to download that cupcake source from the repo, compile that source and add in the current sdk. I am using windows plateform and running the applications on the emulator. --~--~-~--~~~---~--~~ 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 can i check landscap orientation ?
If you just want to find the current orientation of the screen, the sensor manager is just totally the wrong direction to take. What you want to do is use getResources().getConfiguration() (sorry I incorrectly previously posted to use getDisplayMetrics()). You can follow the docs on getRequestedOrientation() to see the (fairly large) set of possible values it returns and that usually it is not telling you the actual current orientation: http://developer.android.com/reference/android/app/Activity.html#getRequestedOrientation() http://developer.android.com/reference/android/content/pm/ActivityInfo.html#screenOrientation http://developer.android.com/reference/android/R.attr.html#screenOrientation So if you are getting SCREEN_ORIENTATION_PORTRAIT or SCREEN_ORIENTATION_LANDSCAPE from here, you are just finding out that you had told the system that you want to force the screen to be portrait or landscape while your activity is in the foreground. This is what you want to use if you just want to find out the current screen orientation: http://developer.android.com/reference/android/content/res/Resources.html#getConfiguration() http://developer.android.com/reference/android/content/res/Configuration.html#orientation On Tue, Mar 24, 2009 at 11:16 PM, suhas gavas suhas.ga...@gmail.com wrote: Hi make use of sensorListener and it will work . i have used the same .. when u use sensorlistener and sensormanager in ur view it has got an override method as onSizeChanged which return the width and height. so using change in size u will get the orientation Below is a code for u of orientation check . enjoy : import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.view.View; import android.hardware.SensorManager; import android.hardware.SensorListener; import android.util.Log; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.RectF; public class Midlet extends Activity { /** Tag string for our debug logs */ private static final String TAG = Sensors; private SensorManager mSensorManager; private GraphView mGraphView; private class GraphView extends View implements SensorListener { public GraphView(Context context) { super(context); } @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { System.out.println(on sizechanged); super.onSizeChanged(w, h, oldw, oldh); } @Override protected void onDraw(Canvas canvas) { } public void onSensorChanged(int sensor, float[] values) { } public void onAccuracyChanged(int sensor, int accuracy) { // TODO Auto-generated method stub } } /** * Initialization of the Activity after it is first created. Must at least * call {...@link android.app.Activity#setContentView setContentView()} to * describe what is to be displayed in the screen. */ @Override protected void onCreate(Bundle savedInstanceState) { // Be sure to call the super class. super.onCreate(savedInstanceState); mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); mGraphView = new GraphView(this); setContentView(mGraphView); } @Override protected void onResume() { super.onResume(); mSensorManager.registerListener(mGraphView, SensorManager.SENSOR_ACCELEROMETER | SensorManager.SENSOR_MAGNETIC_FIELD | SensorManager.SENSOR_ORIENTATION, SensorManager.SENSOR_DELAY_FASTEST); } @Override protected void onStop() { mSensorManager.unregisterListener(mGraphView); super.onStop(); } } On Wed, Mar 25, 2009 at 11:26 AM, Suman ipeg.stud...@gmail.com wrote: Hi Many thanks for replies. I actually want to do something if the screen orientation is landscap. Am trying something like this... if(getRequestedOrientation()== landscap) { { But it was not working. So if the way is correct then please tell me if(getRequestedOrientation()== ) Or suggest something another way. Thanks in advance. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ 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
[android-developers] Re: Drop entire database?
On Tue, Mar 24, 2009 at 10:53 PM, gudujarlson gudujarl...@gmail.com wrote: The context class is not where I would expect to find the function to delete a SQLite database. Wouldn't it be more intuitive to have this function on the SQLiteDatabase class? The Context class has a suite of functions for creating, opening, and deleting databases at the standard location of databases for your app. The SQLiteDatabase class can be used to access a databases at any absolute path. In that case, you are using an absolute path, so use File to delete the database file at that path. But unless you are putting your database on the SD card, you would be best off using the Context methods for your database access. On Mar 24, 11:24 pm, gudujarlson gudujarl...@gmail.com wrote: I have an automated test that creates a SQLite database. In the setup of the test I want to drop the database if it already exists. The problem is that I cannot find a function that deletes/drops a database. That seems like an odd omission. Help? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ 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: Screen Orientation.
Sorry I made a mistake, use getResources().getConfiguration(). On Tue, Mar 24, 2009 at 10:43 PM, for android forandr...@gmail.com wrote: Does that mean from the DisplayMetrics we need to check from the height and width? On Wed, Mar 25, 2009 at 10:55 AM, Dianne Hackborn hack...@android.comwrote: That returns the orientation mode your activity has requested. The actual current orientation is in getResources().getDisplayMetrics(). On Tue, Mar 24, 2009 at 10:01 PM, for android forandr...@gmail.comwrote: getRequestedOrientation() On Wed, Mar 25, 2009 at 9:34 AM, Suman ipeg.stud...@gmail.com wrote: Hi all... Thanks for replies. Can any one tell me by which method i can check the screen orientation? I mean i want to check whether it is land-scap mode or portrait mode. Thanks in advance. Suman. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ 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] photo picker Uri issue
In some code I call this; Intent photoPickerIntent = new Intent (Intent.ACTION_PICK); photoPickerIntent.setType(image/*); startActivityForResult(photoPickerIntent, 1); then implement this method protected void onActivityResult(int requestCode, int resultCode, Intent intent) { super.onActivityResult(requestCode, resultCode, intent); if (resultCode == RESULT_OK) { Uri photoUri = intent.getData(); Log.d(TAG, should be adding a photo); if (photoUri != null) { Log.d(TAG, photo uri is not blank); // do something with the content Uri //TODO figure out why this does not work!! Log.d(TAG, the photo URI is + photoUri.getPath()); Drawable thePic = Drawable.createFromPath (photoUri.getPath()); //thePic is Null if(thePic != null){ Log.d(TAG, the pic has loaded); myRecipe.addPic(thePic); ((RecipeAdapter)myListView.getAdapter ()).notifyDataSetChanged(); } } } } trying to get a image and load it in to a drawable object. The Uri that is returned seems logical 03-25 08:12:58.554: DEBUG/ConvertScaleScreen(174): the photo URI is / external/images/media/1 but when i start up a shell with adb the file location or even the root drive does not exitst, am I missing something here? should the be a symbolic link on the file system? --~--~-~--~~~---~--~~ 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 launch C program application at start-up
HI, We are trying to launch C program application (for example, Helloworld) at start-up on ARM-based target board. We copied the application in /system/bin and modified the init.rc script to add the entry of the application in on boot. But, still, the application does not launch at the start-up. Modifications in init.rc look like this: on boot . . #calling helloworld service helloworld /system/bin/helloworld onrestart Any suggestions on fixing the issue can be helpful. Thanks and Regards, Vrukesh --~--~-~--~~~---~--~~ 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 setup the DNS to access the external nework
Hi all, I can not access the external network because of DNS problem, below is my steps: 1. Setup DNS ./adb shell setprop net.dns1 xx.xx.xx.xx I can successful access the internal network withou setting the http_proxy, such as my.mycomany.com 2. Setup proxy Setup the http_proxy environment variable on the host, and setup the dns server in Android. Access the external network in browser, such as www.google.com. It report Web page not available, the log of logcat say that: I/InetAddress( 187): Unknown host www.google.com, throwing UnknownHostException E/browser ( 187): onReceivedError code:-2 The URL could not be found. Setting the http_proxy in sqlite3 /data/data/ com.android.providers.settings/databases/settings.db also does not work. I guess it is the dns issue. But strange that the DNS can work for internal network, but can not work for external network. Does anyone know how to fix this issue? Thanks, Lianwei --~--~-~--~~~---~--~~ 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 setup the DNS to access the external nework
More info, It can access the external network with IP address. 2009/3/25 lianwei lianwei.w...@gmail.com Hi all, I can not access the external network because of DNS problem, below is my steps: 1. Setup DNS ./adb shell setprop net.dns1 xx.xx.xx.xx I can successful access the internal network withou setting the http_proxy, such as my.mycomany.com 2. Setup proxy Setup the http_proxy environment variable on the host, and setup the dns server in Android. Access the external network in browser, such as www.google.com. It report Web page not available, the log of logcat say that: I/InetAddress( 187): Unknown host www.google.com, throwing UnknownHostException E/browser ( 187): onReceivedError code:-2 The URL could not be found. Setting the http_proxy in sqlite3 /data/data/ com.android.providers.settings/databases/settings.db also does not work. I guess it is the dns issue. But strange that the DNS can work for internal network, but can not work for external network. Does anyone know how to fix this issue? Thanks, Lianwei --~--~-~--~~~---~--~~ 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 setup the DNS to access the external nework
Push a Ipconfig file to you phone or emulator Best Regards Eric Chan On Wed, Mar 25, 2009 at 4:00 PM, lianwei Wang lianwei.w...@gmail.comwrote: More info, It can access the external network with IP address. 2009/3/25 lianwei lianwei.w...@gmail.com Hi all, I can not access the external network because of DNS problem, below is my steps: 1. Setup DNS ./adb shell setprop net.dns1 xx.xx.xx.xx I can successful access the internal network withou setting the http_proxy, such as my.mycomany.com 2. Setup proxy Setup the http_proxy environment variable on the host, and setup the dns server in Android. Access the external network in browser, such as www.google.com. It report Web page not available, the log of logcat say that: I/InetAddress( 187): Unknown host www.google.com, throwing UnknownHostException E/browser ( 187): onReceivedError code:-2 The URL could not be found. Setting the http_proxy in sqlite3 /data/data/ com.android.providers.settings/databases/settings.db also does not work. I guess it is the dns issue. But strange that the DNS can work for internal network, but can not work for external network. Does anyone know how to fix this issue? Thanks, Lianwei --~--~-~--~~~---~--~~ 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 launch C program application at start-up
try this, service helloworld /system/bin/helloworld user root oneshot On Wed, Mar 25, 2009 at 1:18 PM, vrukesh vrukesh.pa...@gmail.com wrote: HI, We are trying to launch C program application (for example, Helloworld) at start-up on ARM-based target board. We copied the application in /system/bin and modified the init.rc script to add the entry of the application in on boot. But, still, the application does not launch at the start-up. Modifications in init.rc look like this: on boot . . #calling helloworld service helloworld /system/bin/helloworld onrestart Any suggestions on fixing the issue can be helpful. Thanks and Regards, Vrukesh --~--~-~--~~~---~--~~ 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 do the services communicate with each other?
HI there, I am trying to send AT commands via Ril from LocationManager as there is only one AT port I can use. But it seems like that there is no ways to call the function refer to Ril. Can I just new a commandsinterface and to call ril's functions via it? Any ideas will be great appreciated. ThanksBestRegards, Nio --~--~-~--~~~---~--~~ 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 setup the DNS to access the external nework
Where can I find the Ipconfig? is it ifconfig? -Lianwei On Mar 25, 4:11 pm, Eric Chan jude...@gmail.com wrote: Push a Ipconfig file to you phone or emulator Best Regards Eric Chan On Wed, Mar 25, 2009 at 4:00 PM, lianwei Wang lianwei.w...@gmail.comwrote: More info, It can access the external network with IP address. 2009/3/25 lianwei lianwei.w...@gmail.com Hi all, I can not access the external network because of DNS problem, below is my steps: 1. Setup DNS ./adb shell setprop net.dns1 xx.xx.xx.xx I can successful access the internal network withou setting the http_proxy, such as my.mycomany.com 2. Setup proxy Setup the http_proxy environment variable on the host, and setup the dns server in Android. Access the external network in browser, such aswww.google.com. It report Web page not available, the log of logcat say that: I/InetAddress( 187): Unknown hostwww.google.com, throwing UnknownHostException E/browser ( 187): onReceivedError code:-2 The URL could not be found. Setting the http_proxy in sqlite3 /data/data/ com.android.providers.settings/databases/settings.db also does not work. I guess it is the dns issue. But strange that the DNS can work for internal network, but can not work for external network. Does anyone know how to fix this issue? Thanks, Lianwei --~--~-~--~~~---~--~~ 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 get the current matrix mode?
I will write a wrapper as you explain. It's not very beautifull but it's the only solution that I see now. Thank you. Thomas On Mar 24, 8:31 am, Anton socialhac...@gmail.com wrote: Thomas, I just tested this using the glGetIntegerv method that takes an int array instead of a Buffer. It also returned 0 for me. So I dug into the source and found that the implementation of glGetIntegerv doesn't have a case for GL_MATRIX_MODE. And it sets the GL error to GL_INVALID_ENUM (1280). And sure enough, 1280 is returned by a call to glGetError right after the call to glGetIntegerv. So it looks like you can't get the GL_MATRIX_MODE that way on Android. And upon further looking through the code I don't see anywhere that the matrixMode state variable is accessed. So I doubt that you'll have any luck getting it from the java API. If you control all of your OpenGL code you can work around this by using a wrapper to change GL state. It's not ideal, but it should work. That wrapper class could then be queried for the current matrix mode. -Anton On Mar 23, 7:39 am, tcassany tcass...@betomorrow.com wrote: Hello, I just would to know how can I get the currentmatrixmode. I try whit this : ByteBuffer buffer = ByteBuffer.allocate(4); buffer.order(ByteOrder.nativeOrder()); IntBuffer matrixMode = buffer.asIntBuffer(); gl.glGetIntegerv(GL11.GL_MATRIX_MODE, matrixMode); .. gl.glMatrixMode(matrixMode.get(0)) But it's alway return 0 instead of GL_MODELVIEW(5888) in my case. Thanks, Thomas --~--~-~--~~~---~--~~ 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: DexClassLoader Feature in the Cupcake
Please respond.. Whether DexFile class can solve this purpose? On Mar 25, 11:52 am, Asif k asifk1...@gmail.com wrote: Hi all, Can anyone please provide some information regarding the reflection API DexclassLoader, which will be includeed in cupcake release?? In the latest development of the cupcake, whether this feature is added or still to be done?? I f already included then any reference which will explain about how to download that cupcake source from the repo, compile that source and add in the current sdk. I am using windows plateform and running the applications on the emulator. --~--~-~--~~~---~--~~ 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 setup the DNS to access the external nework
Are you sure the DNS server you use is capable of returning IP addresses for non-local domains ? On Wed, Mar 25, 2009 at 8:53 AM, lianwei lianwei.w...@gmail.com wrote: Hi all, I can not access the external network because of DNS problem, below is my steps: 1. Setup DNS ./adb shell setprop net.dns1 xx.xx.xx.xx I can successful access the internal network withou setting the http_proxy, such as my.mycomany.com 2. Setup proxy Setup the http_proxy environment variable on the host, and setup the dns server in Android. Access the external network in browser, such as www.google.com. It report Web page not available, the log of logcat say that: I/InetAddress( 187): Unknown host www.google.com, throwing UnknownHostException E/browser ( 187): onReceivedError code:-2 The URL could not be found. Setting the http_proxy in sqlite3 /data/data/ com.android.providers.settings/databases/settings.db also does not work. I guess it is the dns issue. But strange that the DNS can work for internal network, but can not work for external network. Does anyone know how to fix this issue? Thanks, Lianwei --~--~-~--~~~---~--~~ 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 login to the root of Android Dev Phone 1?
pull is an adb command, you need to run it on the host (there is no easy way to send a file to your host from the system). E.g. adb pull device-path host-path On Wed, Mar 25, 2009 at 4:34 AM, havexz bali.param...@gmail.com wrote: well i am able to access the folder but still unable to get the files out to local system .. the following is the snap shot. Here i had run the su command and the prompt changes from $ to # # pull pull pull: not found # help help help: not found # On Mar 24, 1:28 am, havexz bali.param...@gmail.com wrote: THANKS ITS WOKRING..:) BTW is there a way i can access using the UI DDMS which comes with eclipse IDE.? On Mar 23, 10:40 pm, Jean-Baptiste Queru j...@android.com wrote: Run su in your shell, and you'll be running arootshell. JBQ On Mon, Mar 23, 2009 at 7:45 PM, havexz bali.param...@gmail.com wrote: Also tried login to shell using adb but i am unable to browse to that directory.. the error is given below: $ ls ls sqlite_stmt_journals cache sdcard etc init default.prop logo.rle init.trout.rc data system init.goldfish.rc sys proc init.rc sbin root dev $ ls data ls data opendir failed, Permission denied $ On Mar 23, 9:43 pm, havexz bali.param...@gmail.com wrote: I am unable to copy the files from the data folder of the Android Dev Phone 1. I used to do that on the Emulator. I need to back up the application data so that I can restore it. -- Jean-Baptiste M. JBQ Queru Android Engineer, Google. Questions sent directly to me that have no reason for being private will likely get ignored or forwarded to a public forum with no further warning. --~--~-~--~~~---~--~~ 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: Localizing layouts?
Hi, see this hopes it will help you https://groups.google.com/group/android-developers/web/localizing-android-apps-draft Regards, Gulfam On Mar 24, 10:01 pm, BoD bodl...@gmail.com wrote: Thanks a lot, I saw this doc but I guess I read it a bit too fast, and I was unsure the suffixing applied also to layouts. Cheers! BoD On Mar 24, 5:27 pm, Mark Murphy mmur...@commonsware.com wrote: BoD wrote: Hi! Is it possible to localize layouts (in the same way you can have a 'por' and a 'land' layout? As you may know some languages are less 'verbose' than others, thus sometimes layout adjustments might be needed according to the current language. Sure! http://developer.android.com/guide/topics/resources/resources-i18n.ht... For English and German, for example, you would need: res/layout-en-land res/layout-de-land res/layout-de (for portrait -- or use layout-de-port) res/layout (for English portrait) The language code must precede the orientation code. -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ 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: Cupcake coming in April? Where is the SDK?
Tried a checkout and build of the cupcake branch this morning and got; Output: out/host/common/obj/JAVA_LIBRARIES/temp_layoutlib_intermediates/javalib.jar Input : out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar Input : out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar Exception in thread main java.lang.NoClassDefFoundError: org/objectweb/asm/ClassWriter at com.android.tools.layoutlib.create.Main.main(Main.java:45) Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.ClassWriter at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) ... 1 more make: *** [out/host/common/obj/JAVA_LIBRARIES/temp_layoutlib_intermediates/javalib.jar ] Error 1 Al. _ From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Dianne Hackborn Sent: 25 March 2009 00:46 To: android-developers@googlegroups.com Subject: [android-developers] Re: Cupcake coming in April? Where is the SDK? On Tue, Mar 24, 2009 at 5:04 PM, Stoyan Damov stoyan.da...@gmail.com wrote: Android engineers say there's no date for cupcake, 1.5 SDK, etc., yet there is this video of what appears to NOT be an Android 1.1 phone, AND Vodaphone claims it will start selling them this April. You can download the current tree and run cupcake today, and have been able to for a month or two. Just because it is running on some hardware doesn't mean it is finished. I checked in a couple cupcake bug fixes today, so I can assure you that it is not yet done. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ 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 setup the DNS to access the external nework
No, I check it with nslookup, and found that the DNS server can not return a IP address for the external network. So this is the root cause, but how to make it worked in Android Emulator? Do I need to find a available DNS server, or some other settings? -Lianwei On Mar 25, 5:27 pm, David Turner di...@android.com wrote: Are you sure the DNS server you use is capable of returning IP addresses for non-local domains ? On Wed, Mar 25, 2009 at 8:53 AM, lianwei lianwei.w...@gmail.com wrote: Hi all, I can not access the external network because of DNS problem, below is my steps: 1. Setup DNS ./adb shell setprop net.dns1 xx.xx.xx.xx I can successful access the internal network withou setting the http_proxy, such as my.mycomany.com 2. Setup proxy Setup the http_proxy environment variable on the host, and setup the dns server in Android. Access the external network in browser, such aswww.google.com. It report Web page not available, the log of logcat say that: I/InetAddress( 187): Unknown hostwww.google.com, throwing UnknownHostException E/browser ( 187): onReceivedError code:-2 The URL could not be found. Setting the http_proxy in sqlite3 /data/data/ com.android.providers.settings/databases/settings.db also does not work. I guess it is the dns issue. But strange that the DNS can work for internal network, but can not work for external network. Does anyone know how to fix this issue? Thanks, Lianwei --~--~-~--~~~---~--~~ 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: Bundles and serializable objects - what is actually stored?
Thanks for your in-depth answer, that was really helpful. Cheers, Matthias --~--~-~--~~~---~--~~ 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 setup the DNS to access the external nework
On Wed, Mar 25, 2009 at 10:42 AM, lianwei lianwei.w...@gmail.com wrote: No, I check it with nslookup, and found that the DNS server can not return a IP address for the external network. So this is the root cause, but how to make it worked in Android Emulator? Do I need to find a available DNS server, or some other settings? Yes, you need to pass the address of a second DNS server, as in -dns-server address1,address2 -Lianwei On Mar 25, 5:27 pm, David Turner di...@android.com wrote: Are you sure the DNS server you use is capable of returning IP addresses for non-local domains ? On Wed, Mar 25, 2009 at 8:53 AM, lianwei lianwei.w...@gmail.com wrote: Hi all, I can not access the external network because of DNS problem, below is my steps: 1. Setup DNS ./adb shell setprop net.dns1 xx.xx.xx.xx I can successful access the internal network withou setting the http_proxy, such as my.mycomany.com 2. Setup proxy Setup the http_proxy environment variable on the host, and setup the dns server in Android. Access the external network in browser, such aswww.google.com. It report Web page not available, the log of logcat say that: I/InetAddress( 187): Unknown hostwww.google.com, throwing UnknownHostException E/browser ( 187): onReceivedError code:-2 The URL could not be found. Setting the http_proxy in sqlite3 /data/data/ com.android.providers.settings/databases/settings.db also does not work. I guess it is the dns issue. But strange that the DNS can work for internal network, but can not work for external network. Does anyone know how to fix this issue? Thanks, Lianwei --~--~-~--~~~---~--~~ 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 can i check the mode of orientation?
try with: int orientation = getResources().getConfiguration().orientation; On Mar 24, 1:03 pm, Suman ipeg.stud...@gmail.com wrote: Hi all... Thanks for replies. Can any one tell me by which method i can check the screen orientation? I mean i want to check whether it is land-scap mode or portrait mode. Thanks in advance. Suman. --~--~-~--~~~---~--~~ 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: Can we charge some externals stuffs for a paid Android Market game
Here the answers at this topic : http://groups.google.fr/group/android-discuss/browse_thread/thread/f7b87462549b3a3d?hl=fr --~--~-~--~~~---~--~~ 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: get Certificates from Package
Well there is a PackageParser class inside the core which reads the Certificates. But there seems to be no interface to get them via the standard API. Do I have to let my app parse the package it self? Am 23.03.2009 um 18:09 schrieb Lutz Schönemann: Hi, I'm looking for a way to get the certificates from a package that are used to sign it. Using the PackageInfo class it is possible to get the signatures. But what can I do with signatures if I don't get the public keys to verify these. The next question I have where does the PackageInstaller verify the signed APK file? The PackageParser class loads the APK file into a JarFile object but does this automatically verify the signature? Thanks for help Lutz --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~--- smime.p7s Description: S/MIME cryptographic signature
[android-developers] How to get the permission WRITE_SECURE_SETTINGS
Hi all, I am developing the application based on the latest cupcake branch. I met a security issue, which needs the permission WRITE_SECURE_SETTINGS. I have tried to grant it to my application, but when the package is installed, an error is reported: 01-15 06:50:49.780: WARN/PackageManager(160): Not granting permission android.permission.WRITE_SECURE_SETTINGS to package com.ourdroid.apks (protectionLevel=3 flags=0x44) I have searched in this group, and found some cases same as mime. My question is whether it is possible to get this permission? Any reply will be appreciated. Regards, Stanley --~--~-~--~~~---~--~~ 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 get the permission WRITE_SECURE_SETTINGS
One more thing as the supplement, is that I met this issue when I tried to call the non-published API BluetoothDevice.disable(), but the API BluetoothDevice.enable() works well. I am just curious about why enabling bluetooth is allowed, while disabling bluetooth is not allowed. I think these two API should have same security level. Of course, this is just my private opinion. Any mistake, please point it out. Thanks, Stanley On Mar 25, 6:17 pm, Stanley.lei xiaofeng.lei...@gmail.com wrote: Hi all, I am developing the application based on the latest cupcake branch. I met a security issue, which needs the permission WRITE_SECURE_SETTINGS. I have tried to grant it to my application, but when the package is installed, an error is reported: 01-15 06:50:49.780: WARN/PackageManager(160): Not granting permission android.permission.WRITE_SECURE_SETTINGS to package com.ourdroid.apks (protectionLevel=3 flags=0x44) I have searched in this group, and found some cases same as mime. My question is whether it is possible to get this permission? Any reply will be appreciated. Regards, Stanley --~--~-~--~~~---~--~~ 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] opencore
hi all! i want to know whether the g1 use the pv omxcore in opencore . if i do not have any hardware codec. if i just use the pv omxcore. can the system be commercial and steady? --~--~-~--~~~---~--~~ 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 make the music player recognized the AAC file in cupcake?
i meet same matter before, and i solve it in same way as you .i just change the mediafile.java. i could see the file in the music in my device. but in simulator. i found i could not see any other files if we move them to the sdcard when i mount the sdcard to the system before. 在2009-03-24,Alex mc...@163.com 写道: Hi all, From the opencore,we can see the aac file is supported to be played back. But the aac file can not be recognized in the music player. From http://groups.google.com/group/android- framework/browse_thread/thread/ed9f788504c3d35a/42d9c78a38235a19? #42d9c78a38235a19 and after I reading the mediascanner sourcecode I think if i want to make the AAC file can be recognized in the music player I should to add following code to mediafile.java: public static final int FILE_TYPE_AAC = 8; private static final int FIRST_AUDIO_FILE_TYPE = FILE_TYPE_MP3; private static final int LAST_AUDIO_FILE_TYPE = FILE_TYPE_AAC; addFileType(AAC, FILE_TYPE_AAC, audio/aac); because the amr file is also be handled in this way. and form mediascanner.jave sourcecode, we can see if the aac file is only be regarded as a only aac file not the mp4 single audio. I think the mediascanner.jave should not be modified. but after I modified the mediaFile.java , then I opened the musci player the aac file also can not be seen , can someone tell me how to resolve it? Thank you very much! --~--~-~--~~~---~--~~ 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 update Gallery
Hi: everybody, I want to update Galley items, like change or remove some items, or add new items, after I update my items ArrayList, the Gallery will not update it immediately, I must drag it out of screen, then drag it back, the update item will displayed, I tried invalidate () method, I want use invalidate() to redraw Gallery, but it doesn't work, I don't know why. Anybody could give some suggestion? Thanks. --~--~-~--~~~---~--~~ 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: Cupcake coming in April? Where is the SDK?
I alslo got similar situation. Follow this cupcake/development/tools/eclipse/README_WINDOWS.txt. I already build a SDK for Linux and Windows environment. And ADT 0.9.0 for Eclipse. But I got one trouble. Under Windows environment ( I do not try this in linux yet). I start the Eclipse and create one project. Editor compilans one problem: R.java cannot find. It's OK to me. I comment this line: setContentView(R.layout.main). And I try to build this simple project and debug this application. Then I got this message [2009-03-25 19:16:45 - cake2] Could not find cake2.apk! I found only *.class created, no .jar or .apk files. It seems build project cannot work properly. What am I missing? Any point I have to check ? --- XC He a...@tw --~--~-~--~~~---~--~~ 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: Cannot delete that URL exception
Hi .. u can try this code Cursor c = getContentResolver().query(Phones.CONTENT_URI, null,phones._id =+id, null, null); this code will return a row contain _id. first ... you try with phone no to get _id Cursor c= context.getContentResolver().query (Contacts.Phones.CONTENT_URI, Contacts.PhonesColumns.NUMBER+=99, null); now fetch _id from this row use it in next query... it will work.100% . i had already tried thi thing. On Feb 10, 12:51 am, Meryl Silverburgh silverburgh.me...@gmail.com wrote: Thanks. But can you please tell me how can If I find the _ID from the phone number? On Mon, Feb 9, 2009 at 6:00 AM, Odessa Silverberg silverberg.ode...@googlemail.com wrote: I'm not 100% sure, but i think it's because you passed Contacts.Phones.CONTENT_URI instead of creating your own uri which has an id-segment appended. The ID is the unique _ID field you have in your phone table.If you know the _ID you can generate a uri (it's called URI not URL btw :P) with this line private void removeContact(Context context, String phone) { long _id = 2; // Just hardcoding it, in your aplication you have to get the ID programmatically) Uri deleteContactUri = Uri.withAppendedPath (Contacts.Phones.CONTENT_URI, String.valueOf(_id)); context.getContentResolver().delete(deleteContactUri, null, null); } On Feb 9, 3:19 am, Meryl Silverburgh silverburgh.me...@gmail.com wrote: Hi, I am getting the Cannot delete that URL exception(see below): java.lang.UnsupportedOperationException: Cannot delete that URL: content://contacts/phones at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:130) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:110) at android.content.ContentProviderProxy.delete(ContentProviderNative.java:362) at android.content.ContentResolver.delete(ContentResolver.java:386) Here is my code: private void removeContact(Context context, String phone) { context.getContentResolver().delete(Contacts.Phones.CONTENT_URI, Contacts.PhonesColumns.NUMBER+=?, new String[] {phone}); } Can you please tell me what am I missing? 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] Question about OpenGL literature
Hi all, Can you please suggest some book(s) or any other useful references about OpenGL? Thanks in advance, Evgeny --~--~-~--~~~---~--~~ 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 set the video in full screen mode?
Hi, I am writing a small video player application. It's working fine. The video is visible on the device, but the app name is visible on the top of the video. I want to avoid this (complete full screen mode, there is no appname only video should be there). Can you please tell me how to achieve this? Thanks, Manoj. --~--~-~--~~~---~--~~ 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 set the video in full screen mode?
manoj wrote: Hi, I am writing a small video player application. It's working fine. The video is visible on the device, but the app name is visible on the top of the video. I want to avoid this (complete full screen mode, there is no appname only video should be there). Can you please tell me how to achieve this? http://androidguys.com/?p= In particular, read the comments, where I think half the core Android team jumped in to tell me how better to solve the problem... ;-) -- Mark Murphy (a Commons Guy) http://commonsware.com Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ 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: kill GPS activity when quitting an application
When you 'exit' an application, it isn't necessarily immediately destroyed by the system (see the activity lifecycle documentation), so I suspect that's why the GPS stays active and keeps getting updates. You might want to remove updates in onStop() instead. Probably unrelated, but calling onDestroy from onLocationChanged looks a bit odd? Looks like you will only ever get one update? --~--~-~--~~~---~--~~ 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: DexClassLoader Feature in the Cupcake
Questions regarding Android development tools or pre-released versions of the firmware should be addressed to a discussion list for the Android open source project: http://source.android.com/discuss Ask wrote: Please respond.. Whether DexFile class can solve this purpose? On Mar 25, 11:52 am, Asif k asifk1...@gmail.com wrote: Hi all, Can anyone please provide some information regarding the reflection API DexclassLoader, which will be includeed in cupcake release?? In the latest development of the cupcake, whether this feature is added or still to be done?? I f already included then any reference which will explain about how to download that cupcake source from the repo, compile that source and add in the current sdk. I am using windows plateform and running the applications on the emulator. -- Mark Murphy (a Commons Guy) http://commonsware.com Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ 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] android http GET 400 error
Hi Android Experts, i need to make a GET request to the http://www.x.com/server.xml which takes 3 mandatory headers hdr1,hdr2,hdr3 i am trying this code try { String path = http://x.com/server.xml;; HashMap parameters = new HashMap(); parameters.put(hdr1,this.hdr1); if(mUserLoggedIn){ parameters.put(hdr2,this.hdr2); parameters.put(hdr3,this.hdr3); } // Setup the connection String uri = new String(path); URL url = new URL(uri); URLConnection conn = url.openConnection(); HttpURLConnection httpConnection = (HttpURLConnection)conn; String boundary = myboundary; conn.setDoOutput(true); conn.setDoInput(true); conn.setUseCaches(false); conn.setRequestProperty(Connection,Keep-Alive); conn.setRequestProperty(Content-Type,multipart/form-data; boundary= + boundary); DataOutputStream wr = new DataOutputStream (conn.getOutputStream()); // Send the normal form data int responseCode = httpConnection.getResponseCode(); Iterator i = parameters.entrySet().iterator(); while (i.hasNext()) { Map.Entry param = (Map.Entry)i.next(); wr.write( (-- + boundary + \r\n).getBytes() ); wr.write( (Content-Disposition: form-data; name=\+ (String)param.getKey()+\\r\n\r\n).getBytes()); wr.write( ((String)param.getValue() + \r\n).getBytes ()); wr.flush(); } wr.close(); // DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); //DocumentBuilder db = dbf.newDocumentBuilder(); // Document dom = db.parse(conn.getInputStream()); // Element rootElement = dom.getDocumentElement(); responseCode is 400 which seems a header missing error any solution? --~--~-~--~~~---~--~~ 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 set the video in full screen mode?
Thank you very much Murphy, it helped me a lot. On Mar 25, 5:01 pm, Mark Murphy mmur...@commonsware.com wrote: manoj wrote: Hi, I am writing a small video player application. It's working fine. The video is visible on the device, but the app name is visible on the top of the video. I want to avoid this (complete full screen mode, there is no appname only video should be there). Can you please tell me how to achieve this? http://androidguys.com/?p= In particular, read the comments, where I think half the core Android team jumped in to tell me how better to solve the problem... ;-) -- Mark Murphy (a Commons Guy)http://commonsware.com Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ 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: Local and Remote Services
Vipul Sagare wrote: After spending few days with Services API, here are some of my questions. I would appreciate your answers and any leads to blogs/postings. I have already gone through API reference and APIDemos for AlarmService, LocalService, and RemoteService. - Are there any good sample applications for each? See below. - Wouldn't most applications use Local Service? That is difficult to say in the abstract, though I would not be surprised if more use local services than remote services. - What are some of the applications which would be good candidate for remote services but not for local services? Here are three off the top of my head: 1. You want third-party programs to use the service (even if you are using it locally, it needs to support AIDL interfaces and such for use remotely) 2. You are reusing a service from a third-party program 3. You want part of your application to run with different permissions than another part of your application (e.g., firewalling off certain sections), and so you split part of it out into a remote service -Is there any other resource apart from API reference, APIDemos and dev guide for this topic that one would recommend?(Some of the blogs are a bit outdated) You mean besides (*cough*) various Android books? ;-) In all seriousness, services have not received quite as much attention as activities. There are probably good samples out on anddev.org, and you might consider poking through code.google.com or github's Android projects to see if anything strikes your fancy. -To start an Activity from service, the use of Notification with PendingIntent is the best and only way. Is that correct? Best, yes. Only, no. AFAIK, you can call startActivity() from a service, though your users may threaten you with bodily harm if you do so, since you might be interrupting them in the middle of something else they are doing. -- Mark Murphy (a Commons Guy) http://commonsware.com Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ 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: android http GET 400 error
zeeshan wrote: Hi Android Experts, i need to make a GET request to the http://www.x.com/server.xml which takes 3 mandatory headers hdr1,hdr2,hdr3 i am trying this code Your code appears to be setting form variables, which are not HTTP headers. Headers are set via setRequestProperty() with URLConnection, just as you are using it for Connection and Content-Type. -- Mark Murphy (a Commons Guy) http://commonsware.com Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ 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: PendingIntent problem
Intents are cached by the system, and two Intents are not differentiated by their Extras. So your two intents look like the same Intent and the second one is being tossed out. You must differ Intents by their Action/Data/Category. I will sometimes use the Data field to hold a simple ID that is not really a URI to make two intents appear different. Look at the code for Intent.equals() I believe, and you will see that Extras are not considered. On Mar 24, 12:47 pm, info+farm bilgiciftl...@gmail.com wrote: Are not Google developers looking into this forum anymore? Then, I will be missing the detailed answers. Regards, info+farm On Mar 24, 3:17 pm, info+farm bilgiciftl...@gmail.com wrote: Hello Mr. Murphy, I searched for it before sending my post and looked at http://groups.google.com/group/android-developers/browse_thread/threa... andhttp://groups.google.com/group/android-developers/browse_thread/threa... But both of them could not find the answer to the problem. I am afraidPendingIntenthas different Intent initialization(start ()), from the normal startActivity(). I am a little bit confused, Regards, info+farm On Mar 23, 11:32 pm, Mark Murphy mmur...@commonsware.com wrote: info+farm wrote: Am I the only one who is having this problem? Actually, I am going to find a workaround for this problem, but I would like to know what I am doing wrong. I do not remember the answer, but I do know this was discussed on this list within the past few months. Search the list forPendingIntentand you will probably find it. -- Mark Murphy (a Commons Guy)http://commonsware.com Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ 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: android http GET 400 error
well, thanks i added these headers conn.setRequestProperty(hdr-1,this.hdr1); conn.setRequestProperty(hdr-2,this.hdr2); conn.setRequestProperty(hdr-3,this.hdr3); but now i am getting 500 error response i need to use a get method for http://www.x.com/server.xml with the mandatory headers i just added just wondering if something wrong in my code or in server itself. shall i use httpget method? On Mar 25, 12:27 pm, Mark Murphy mmur...@commonsware.com wrote: zeeshan wrote: Hi Android Experts, i need to make a GET request to thehttp://www.x.com/server.xmlwhich takes 3 mandatory headers hdr1,hdr2,hdr3 i am trying this code Your code appears to be setting form variables, which are not HTTP headers. Headers are set via setRequestProperty() with URLConnection, just as you are using it for Connection and Content-Type. -- Mark Murphy (a Commons Guy)http://commonsware.com Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ 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: KeyListener Eating My Keystrokes
What you need is an OnKeyListener and not a KeyListener. On Jan 28, 6:04 pm, Dan danscott0...@gmail.com wrote: Hi, I'm trying to setup aKeyListeneron an EditText widget. My code is as follows: code mMsgToSend.setKeyListener(newKeyListener() { @Override public boolean onKeyDown(View view, Editable arg1, int KeyCode, KeyEvent event) { boolean bReturn = false; if (KeyCode == KeyEvent.KEYCODE_ENTER) { SendMessage(); bReturn = true; } return bReturn; } @Override public boolean onKeyUp(View view, Editable text, int keyCode, KeyEvent event) { return false; } }); /code Where mMsgToSend is my EditText widget. The problem is that whenever I implement this code, everything stops showing up in my EditText widget. Anything I type does not show up in the widget. When I set a break point in my code everything is executing as I would expect it to. If I do not have the code in place, everything shows up in the widget as I type. My understanding is that if you want everything to be handled normally then you return a false from the event handlers otherwise you return a true. Has anyone else experienced this? Thanks In Advance, Dan --~--~-~--~~~---~--~~ 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: android http GET 400 error
zeeshan wrote: well, thanks i added these headers conn.setRequestProperty(hdr-1,this.hdr1); conn.setRequestProperty(hdr-2,this.hdr2); conn.setRequestProperty(hdr-3,this.hdr3); but now i am getting 500 error response i need to use a get method for http://www.x.com/server.xml with the mandatory headers i just added just wondering if something wrong in my code or in server itself. shall i use httpget method? You can try that. If the server in question offers any examples of accessing its content programmatically (e.g., example curl or wget commands), review those and see if there is anything obvious you are missing. Of course, the best solution is if somebody offered a Java API for accessing this Web service (e.g., JTwitter for Twitter). -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Training: http://commonsware.com/training.html --~--~-~--~~~---~--~~ 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] Shutdown notification?
Hi all, I would like to perform a task just before the phone is shut down. I thought that Application#onTerminate would be called but that does not seem to be the case. Is there a broadcast intent when the phone is going to shutdown? If not, how to run a task just before the phone is turned off? Thanks. Cyril --~--~-~--~~~---~--~~ 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 display 2 ListViews on the screen at the same time
Hello I am trying to design a UI which utlizes two ListViews on the screen at the same time. Is this possible ? So here is a quick example of how I was intending to do this. 1) Create an XML which positions 2 ListViews one onto of the other each ListView having there own ID ListView android:id=@android:id/list android:layout_width=fill_parent android:layout_height=198px /ListView ListView android:id=@+id/ListView01 android:layout_width=192px android:layout_height=215px /ListView 2) Create two string arrays and populate each listview via ArrayAdapter private String[] mStrings = { Abbaye de Belloc, Abbaye du Mont des Cats, Abertam, Abondance, Ackawi, Acorn, Adelost, Affidelice au Chablis, Afuega'l Pitu, Airag, Airedale, Aisy Cendre}; private String[] mStrings2 = {dsds, qwqwqq, dsdsdsd sdsdsds , dsdsds sdsds}; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); setListAdapter(new ArrayAdapterString(this, R.layout.row, R.id.label, mStrings)); setListAdapter(new ArrayAdapterString(this, R.layout.frow, R.id.ListView01, mStrings2)); } This does not work. Can anyone advise ? Thanks !!! --~--~-~--~~~---~--~~ 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 get the handle for one pop-up dialog?
Can anyone give me a hand? On Tue, Mar 24, 2009 at 10:19 PM, david liu wanqing.da...@gmail.com wrote: Hi All, Here I have one question about I want to get the handle for one popup dialog, such as, there is one Delete alertDialog pop up when you want to delete one picture. So could anyone have the good idea about this? Thanks, David --~--~-~--~~~---~--~~ 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 display 2 ListViews on the screen at the same time
xinit wrote: Hello I am trying to design a UI which utlizes two ListViews on the screen at the same time. Is this possible ? So here is a quick example of how I was intending to do this. 1) Create an XML which positions 2 ListViews one onto of the other each ListView having there own ID ListView android:id=@android:id/list android:layout_width=fill_parent android:layout_height=198px /ListView ListView android:id=@+id/ListView01 android:layout_width=192px android:layout_height=215px /ListView 2) Create two string arrays and populate each listview via ArrayAdapter private String[] mStrings = { Abbaye de Belloc, Abbaye du Mont des Cats, Abertam, Abondance, Ackawi, Acorn, Adelost, Affidelice au Chablis, Afuega'l Pitu, Airag, Airedale, Aisy Cendre}; private String[] mStrings2 = {dsds, qwqwqq, dsdsdsd sdsdsds , dsdsds sdsds}; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); setListAdapter(new ArrayAdapterString(this, R.layout.row, R.id.label, mStrings)); setListAdapter(new ArrayAdapterString(this, R.layout.frow, R.id.ListView01, mStrings2)); } This does not work. Can anyone advise ? You cannot use the ListActivity methods for managing the second ListView. You will need to use findViewById() and handle that ListView manually. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Training: http://commonsware.com/training.html --~--~-~--~~~---~--~~ 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: Question about OpenGL literature
Google this opengl es I found the links to the khronos web-pages most helpful. Other links found by google can be helpful as well :-) Another source is the OpenGL examples on the APIDemos bundled with the Android SDK. For books; i cannot help you there. On Mar 25, 7:43 am, EvgenyV evgen...@gmail.com wrote: Hi all, Can you please suggest some book(s) or any other useful references about OpenGL? Thanks in advance, Evgeny --~--~-~--~~~---~--~~ 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 get the current matrix mode?
Before you do all the work, take a look these classes bundled in the OpenGL session of the APIDemos of the samples in the Anroid SDK: MatrixTrackingGL.java. In your SDK or online: http://code.google.com/p/apps-for-android/source/browse/trunk/Samples/OpenGLES/SpriteText/src/com/google/android/opengles/spritetext/MatrixTrackingGL.java?r=35 MatrixGrabber.java. In your SDK or online: http://code.google.com/p/apps-for-android/source/browse/trunk/Samples/OpenGLES/SpriteText/src/com/google/android/opengles/spritetext/MatrixGrabber.java?r=35 On Mar 25, 4:33 am, tcassany tcass...@betomorrow.com wrote: I will write a wrapper as you explain. It's not very beautifull but it's the only solution that I see now. Thank you. Thomas On Mar 24, 8:31 am, Anton socialhac...@gmail.com wrote: Thomas, I just tested this using the glGetIntegerv method that takes an int array instead of a Buffer. It also returned 0 for me. So I dug into the source and found that the implementation of glGetIntegerv doesn't have a case for GL_MATRIX_MODE. And it sets the GL error to GL_INVALID_ENUM (1280). And sure enough, 1280 is returned by a call to glGetError right after the call to glGetIntegerv. So it looks like you can't get the GL_MATRIX_MODE that way on Android. And upon further looking through the code I don't see anywhere that the matrixMode state variable is accessed. So I doubt that you'll have any luck getting it from the java API. If you control all of your OpenGL code you can work around this by using a wrapper to change GL state. It's not ideal, but it should work. That wrapper class could then be queried for the current matrix mode. -Anton On Mar 23, 7:39 am, tcassany tcass...@betomorrow.com wrote: Hello, I just would to know how can I get the currentmatrixmode. I try whit this : ByteBuffer buffer = ByteBuffer.allocate(4); buffer.order(ByteOrder.nativeOrder()); IntBuffer matrixMode = buffer.asIntBuffer(); gl.glGetIntegerv(GL11.GL_MATRIX_MODE, matrixMode); .. gl.glMatrixMode(matrixMode.get(0)) But it's alway return 0 instead of GL_MODELVIEW(5888) in my case. Thanks, Thomas- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: photo picker Uri issue
This Uri is the logical (not physical) path used by the image content provider. If you want to get the physical path to the actual file on the SD- card, query this Uri: Cursor cursor = query(photoUri, new String[] {MediaStore.Images.ImageColumns.DATA}, null, null, null); String absoluteFilePath = cursor.getString(0); Now, absoluteFilePath is the physical path to your image, which you can use in Drawable.createFromPath Question: Why don't you create a Bitmap instead? ... InputStream is = getContentResolver().openInputStream(photoUri); Bitmap bm = BitmapFactory.decodeStream(is); ... is.close(); I ask this, because it is safer to cache Bitmaps instead of Drawables. If you cache Drawables, you run the risk of memory leaks. Drawables have handles to your activity and when your activity gets destroyed while your Drawables are still cached, your activiy will never be garbage collected -- memory leak. Bitmaps don't have this problem. They are basically byte-arrays with some behavior :). On Mar 25, 3:15 am, beachy beachy.g...@gmail.com wrote: In some code I call this; Intent photoPickerIntent = new Intent (Intent.ACTION_PICK); photoPickerIntent.setType(image/*); startActivityForResult(photoPickerIntent, 1); then implement this method protected void onActivityResult(int requestCode, int resultCode, Intent intent) { super.onActivityResult(requestCode, resultCode, intent); if (resultCode == RESULT_OK) { Uri photoUri = intent.getData(); Log.d(TAG, should be adding a photo); if (photoUri != null) { Log.d(TAG, photo uri is not blank); // do something with the content Uri //TODO figure out why this does not work!! Log.d(TAG, the photo URI is + photoUri.getPath()); Drawable thePic = Drawable.createFromPath (photoUri.getPath()); //thePic is Null if(thePic != null){ Log.d(TAG, the pic has loaded); myRecipe.addPic(thePic); ((RecipeAdapter)myListView.getAdapter ()).notifyDataSetChanged(); } } } } trying to get a image and load it in to a drawable object. The Uri that is returned seems logical 03-25 08:12:58.554: DEBUG/ConvertScaleScreen(174): the photo URI is / external/images/media/1 but when i start up a shell with adb the file location or even the root drive does not exitst, am I missing something here? should the be a symbolic link on the file system? --~--~-~--~~~---~--~~ 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: JUnit on the emulator without instrumentation
Assuming there is no easy way to make use of android.test without instrumentation, has anyone tried to do their own port of JUnit (or similar framework) to the android platform? On Windows Mobile I am using NUnitLite. Does JUnitLite exist? --~--~-~--~~~---~--~~ 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] Process is not ending ?
Hi All, Can anyone tell me where can I see the active process and current process. I think we can see in the DDMS -- Devices. But when see the process list, when I launch a application it showing that applications process in the list. after finishing that application also it showing it process in the process list. So how can see only the current active prcocess (Foregroud,Background..etc). I want to see only the current process which running on the device/emulator. One more thing. when I hold on the Home button for long time, It is showing a list. What that list means. whether that list is For the forgrund running apps or active apps or that is a History. Please any one answer my simple questions. Best, AndRaj --~--~-~--~~~---~--~~ 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: PendingIntent problem
To correct my previous statement, PendingIntents are cached by the system, not Intents. The note about how to differentiate Intents still holds though, so if you need to replace a current PendingIntent with a new PI that has a new Intent that only differs by its Extras, be sure to use the flag FLAG_CANCEL_CURRENT so that the cached PI is not used. From Intent.filterEquals(o): Returns true if action, data, type, class, and categories are the same. == note does not include Extras From PendingIntents javadoc: * pA PendingIntent itself is simply a reference to a token maintained by * the system describing the original data used to retrieve it. This means * that, even if its owning application's process is killed, the * PendingIntent itself will remain usable from other processes that * have been given it. If the creating application later re-retrieves the * same kind of PendingIntent (same operation, same Intent action, data, * categories, and components, and same flags), it will receive a PendingIntent * representing the same token if that is still valid, and can thus call * {...@link #cancel} to remove it. On Mar 25, 7:48 am, Blake B. bbuckle...@yahoo.com wrote: Intents are cached by the system, and two Intents are not differentiated by their Extras. So your two intents look like the same Intent and the second one is being tossed out. You must differ Intents by their Action/Data/Category. I will sometimes use the Data field to hold a simple ID that is not really a URI to make two intents appear different. Look at the code for Intent.equals() I believe, and you will see that Extras are not considered. On Mar 24, 12:47 pm, info+farm bilgiciftl...@gmail.com wrote: Are not Google developers looking into this forum anymore? Then, I will be missing the detailed answers. Regards, info+farm On Mar 24, 3:17 pm, info+farm bilgiciftl...@gmail.com wrote: Hello Mr. Murphy, I searched for it before sending my post and looked at http://groups.google.com/group/android-developers/browse_thread/threa... andhttp://groups.google.com/group/android-developers/browse_thread/threa... But both of them could not find the answer to the problem. I am afraidPendingIntenthas different Intent initialization(start ()), from the normal startActivity(). I am a little bit confused, Regards, info+farm On Mar 23, 11:32 pm, Mark Murphy mmur...@commonsware.com wrote: info+farm wrote: Am I the only one who is having this problem? Actually, I am going to find a workaround for this problem, but I would like to know what I am doing wrong. I do not remember the answer, but I do know this was discussed on this list within the past few months. Search the list forPendingIntentand you will probably find it. -- Mark Murphy (a Commons Guy)http://commonsware.com Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ 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 display 2 ListViews on the screen at the same time
Thanks ! So yes I got it to work by calling setAdapter on the ListView object. //setListAdapter for ListView 1 setListAdapter(new ArrayAdapterString(this, R.layout.row, R.id.label, mStrings)); //Code to display ListView 2 ListView cities = (ListView) findViewById(R.id.ListView01); ArrayAdapter aa = new ArrayAdapterString(this, R.layout.row, R.id.label, mStrings2); cities.setAdapter(aa); So that works and displays the two ListViews. Any pointers in how I can now change the behaviour of how Android deals with interaction between the two lists ? For Example if I have two ListViews one ontop of another, for me to scroll the list in the bottom ListView I have to navigate all the way down through all items in ListView 1 before entering or focussin on List View2. How can I program ListView2 to get focus if it is selected via touch ? I am looking for a function is ListActivity for this but dont find anything. Any tips ? Thanks On Mar 25, 1:50 pm, Mark Murphy mmur...@commonsware.com wrote: xinit wrote: Hello I am trying to design a UI which utlizes two ListViews on the screen at the same time. Is this possible ? So here is a quick example of how I was intending to do this. 1) Create an XML which positions 2 ListViews one onto of the other eachListViewhaving there own ID ListView android:id=@android:id/list android:layout_width=fill_parent android:layout_height=198px /ListView ListView android:id=@+id/ListView01 android:layout_width=192px android:layout_height=215px /ListView 2) Create two string arrays and populate eachlistviewvia ArrayAdapter private String[] mStrings = { Abbaye de Belloc, Abbaye du Mont des Cats, Abertam, Abondance, Ackawi, Acorn, Adelost, Affidelice au Chablis, Afuega'l Pitu, Airag, Airedale, Aisy Cendre}; private String[] mStrings2 = {dsds, qwqwqq, dsdsdsd sdsdsds , dsdsds sdsds}; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); setListAdapter(new ArrayAdapterString(this, R.layout.row, R.id.label, mStrings)); setListAdapter(new ArrayAdapterString(this, R.layout.frow, R.id.ListView01, mStrings2)); } This does not work. Can anyone advise ? You cannot use the ListActivity methods for managing the secondListView. You will need to use findViewById() and handle thatListView manually. -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Training:http://commonsware.com/training.html- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 display 2 ListViews on the screen at the same time
xinit wrote: For Example if I have two ListViews one ontop of another, for me to scroll the list in the bottom ListView I have to navigate all the way down through all items in ListView 1 before entering or focussin on List View2. Simple: don't use two lists on the screen at one time. -- use a Spinner for one -- use tabs to put them on separate tabs -- use ViewFlipper to flip between the two lists based on a button click or option menu choice -- use multiple activities, one list per activity -- Mark Murphy (a Commons Guy) http://commonsware.com Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ 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: ProgressDialog is not showing...
Anybody knows how to solve the problem ?? Maybe need more info ? Thx On Mar 24, 5:32 pm, mat tomasz.matyszew...@gmail.com wrote: Hi, I know that this is common problem, but still I cannot find the answer... I have two classes: InternetConnection extends Activity ConnectionChangeReceiver extends BroadcastReceiver From ConnectionChangeReceiver I'm calling InternetConnection method which is refreshing UI when Internet connection is changed. The problem is that during refresh operation I'd like to showProgressDialogwhich actually is never visible !! So broadcast class looks like: public class ConnectionChangeReceiver extends BroadcastReceiver { private InternetConnection internetConnection; @Override public void onReceive(Context context, Intent intent) { mRefreshingDialog =ProgressDialog.show(TimeCard.this, , msg, true); new Thread() { public void run() { login(mResult); mHandler.post(new Runnable() { public void run() { /** doing some UI staff ... **/ internetConnection.refreshUI(); mRefreshingDialog.dismiss(); } }); } }.start(); } } Do you know why mRefreshingDialog isnotvisible ? --~--~-~--~~~---~--~~ 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: android http GET 400 error
thanks for the reply Mark! i tried httpget also but same 500 error. is there any sniffing tool i can configure with emulator to check the exact http trafic format? On Mar 25, 1:25 pm, Mark Murphy mmur...@commonsware.com wrote: zeeshan wrote: well, thanks i added these headers conn.setRequestProperty(hdr-1,this.hdr1); conn.setRequestProperty(hdr-2,this.hdr2); conn.setRequestProperty(hdr-3,this.hdr3); but now i am getting 500 error response i need to use a get method forhttp://www.x.com/server.xmlwith the mandatory headers i just added just wondering if something wrong in my code or in server itself. shall i use httpget method? You can try that. If the server in question offers any examples of accessing its content programmatically (e.g., example curl or wget commands), review those and see if there is anything obvious you are missing. Of course, the best solution is if somebody offered a Java API for accessing this Web service (e.g., JTwitter for Twitter). -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Training:http://commonsware.com/training.html --~--~-~--~~~---~--~~ 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: android http GET 400 error
zeeshan wrote: thanks for the reply Mark! i tried httpget also but same 500 error. is there any sniffing tool i can configure with emulator to check the exact http trafic format? I seem to recall there are various local proxy servers you can use to intercept HTTP traffic, though getting a proxy server to work with the emulator is not terribly easy given the number of questions that seem to come up related to it. Instead, particularly if you are using OS X or Linux as your development environment, I would focus on trying to get curl working. Once you have curl properly downloading the content, converting that into Android code (whether URLConnection or HttpClient) should be relatively straightforward. You might also inquire with whoever is hosting the server if they have any recipes for Web service access. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ 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 can i check landscap orientation ?
Pls add andoid:configChanges=orientation|keyboard And override onConfigurationChanged and check the orientation against Configuration.ORIENTATION_LANDSCAPE or potrait On Mar 25, 2009 12:56 AM, Suman ipeg.stud...@gmail.com wrote: Hi Many thanks for replies. I actually want to do something if the screen orientation is landscap. Am trying something like this... if(getRequestedOrientation()== landscap) { { But it was not working. So if the way is correct then please tell me if(getRequestedOrientation()== ) Or suggest something another way. 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] Track Ball Problem...
Hi, I want to Develop a Game in which I want to move my object using Track Ball. for this i use onKeyDown() to up,down,left,right,fire movement in my class. Its working fine in Emulator on D-Pad., but when i install in device trackball not working efficiently. on Printing LogCat it says that the OnKeyUp() is called automatically on each OnkeyDown().. which is right but when I have to use is for continously(Continous trackball right pressing).. It failed.I even try OnTrackBallEvent(). OnKeyMultiple... but not working.. If any body can help that on continous treating of trackball, please help. Thanks in Advance. Regards ~Ankit Somani --~--~-~--~~~---~--~~ 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: Drop entire database?
The Context class has a suite of functions for creating, opening, and deleting databases at the standard location of databases for your app. The SQLiteDatabase class can be used to access a databases at any absolute path. In that case, you are using an absolute path, so use File to delete the database file at that path. But unless you are putting your database on the SD card, you would be best off using the Context methods for your database access. Ah ok, I think I get it now. I can just treat the database like a normal file. It wasn't obvious at first that I could go under the covers and manipulate the database via the filesystem 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] Singleton in different service which share same process
Hi guys, I meet an issue. I have two services, both of them lies in separate apk, which run in same process. The two service share same jar file by uses-library method. The jar file implement a class, say test, is a singleton. But I found that two instance of test is created under this case, could anybody give me some tips? I want to ensure it's singleton. Thanks, Jove Test.jar - test.class A.apk - A.class B.apk - B.class A.class call Test.getInstance() B.class also call Test.getInstance() A and B share same process, but two instance of Test is created under this case. --~--~-~--~~~---~--~~ 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] Intercept Incoming SMS
Hi All, Does anyone known if its possible to intercept incoming SMS to my app? Similar to PushRegister in JME. I try to BroadcastReceiver - works fine but the SMS also goes to Native Inbox app. Regards, Jorge. --~--~-~--~~~---~--~~ 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] Questions related to android, please answer
1. What is the name of the alliance that supports Android? 2. Which is the kernel that Android relies on for core system services? 3. Is Android a multi-process system? 4. What is an Android installable called ? 5. What are the basic building blocks of an Android Application? 6. Which is the class which acts as a basic building block for user interface components? 7. What is an Intent 8. Which is the file which has all the essential features like Activity,services of the application listed that is going to be used by the app? 9. Does Android support Location Based Services? 10. List the tools that come with in the Android SDK that help you to develop/debug applications. 11. How do you handle UI events in Android ? --~--~-~--~~~---~--~~ 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] Can we link Yahoo API classes with Android as GTalkService and other classes from Wireless package have been removed ?
I am new to Mobile Developments in Java, so any help would be greatly appreciated. Thanks, Sun --~--~-~--~~~---~--~~ 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] Cupcake Emulator do not mount SD card image
I just download a cupcake branch of source code and build it. I configured Eclipse for a new SDK, and appear the things is works great, EXCEPT emulator. 1. I configured a new AVD as parameter i pointed my old sdcard.img then loaded and do not see my sdcard 2. then I back and configure another AVD with a parameter to create a new sdcard.img, when the emulator loaded I still not seen sdcard in emulator. 3. then I try to something like: emulator -avd myavd -sdcard mysdcard.img and there is still no sd card. How can I restore my sd card in emulator. --~--~-~--~~~---~--~~ 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] I get this message when i enter emulator in my command prompt,Help me.
Cannot create data directory:C:\Documents and Settings\Tharun Gowda \Local Settings\Application Data\Android\SDK-1.0 Please specify a writeable drirectory with -datadir. --~--~-~--~~~---~--~~ 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] Creating multiple layouts
Hi, I am new to android and trying to create a customized list. Every item in the list has TextView and one Ratingbar. I now want add a couple of command buttons at the end of the list (like BACK, HOME, , NEXT). When I add these extra views to the layout xml file then they get added along with every item in the list. I think there should be another layout defined for the buttons to be displayed separate from the list. Anyone has an idea on how to do this? Thanks in advance. Regards, Vijay --~--~-~--~~~---~--~~ 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] Task activity stack always reset when launched from Home
I am just starting on an Android app and I am puzzled about why my Task activity stack is being reset any time the application is launched from the Home screen. I used the ADT tools to create the application in Eclipse. The main activity is .UserLaunch and it starts the activity .About when the user presses a button. If the user then presses HOME and then relaunches the app, .UserLaunch is displayed and is the only thing on the stack. .UserLaunch has the launchMode singleTask. .About is standard. According to the documentation at http://developer.android.com/guide/topics/fundamentals.html#lmodes: However, a singleTask activity may or may not have other activities above it in the stack. If it does, it is not in position to handle the intent, and the intent is dropped. (Even though the intent is dropped, its arrival would have caused the task to come to the foreground, where it would remain.) The Task stack should be brought to the foreground and .About should still be displayed. I added Logging to all of the lifecycle events (edited to remove timestamps and shorten DEBUG/ and INFO/ to D/ and I/) and you can see that when HOME is pressed, .About cycles through onPause and onStop (as expected). Then when the app is again launched, .About is destroyed and .UserLaunch is restarted D/UserLaunch:(670): onCreate() D/UserLaunch:(670): onStart() D/UserLaunch:(670): onResume() I/ActivityManager(52): Displayed activity com.cequint.cityid/.UserLaunch: 4910 ms I/ActivityManager(52): Starting activity: Intent { comp= {com.cequint.cityid/com.cequint.cityid.About} } D/UserLaunch:(670): onPause() D/About(670): onCreate() D/About(670): onStart() D/About(670): onResume() I/ActivityManager(52): Displayed activity com.cequint.cityid/.About: 1031 ms D/UserLaunch:(670): onStop() I/ActivityManager(52): Starting activity: Intent { action=android.intent.action.MAIN categories= {android.intent.category.HOME} flags=0x1020 comp= {com.android.launcher/com.android.launcher.Launcher} } D/About(670): onPause() D/About(670): onStop() D/dalvikvm(670): GC freed 413 objects / 34128 bytes in 72ms I/ActivityManager(52): Starting activity: Intent { action=android.intent.action.MAIN categories= {android.intent.category.LAUNCHER} flags=0x1020 comp= {com.cequint.cityid/com.cequint.cityid.UserLaunch} } D/About(670): onDestroy() D/UserLaunch:(670): onRestart() D/UserLaunch:(670): onStart() D/UserLaunch:(670): onResume() Here is the relevant section of the Manifest: application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.UserLaunch android:label=@string/app_name android:launchMode=singleTask intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.About android:launchMode=standard /activity /application Anyone have any ideas why this is always resetting the Activity Stack? --~--~-~--~~~---~--~~ 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] sd card
thanks for advice your a life saver --~--~-~--~~~---~--~~ 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] .apk install fails: package conflict
I'm testing an app I'm developing and asked a friend to install on their device. I wanted to make it as easy as possible for them to help me out so I put the .apk up on my website for them to download to the phone (rather than making them download the SDK and use adb to install). The install of the downloaded .apk fails, complaining of a package conflict. I have since gotten my hands on the phone briefly and I verified that: * they have selected allow unsigned apps in settings * there is no package with the same (or similar) name in data/data * installing via adb works with not a peep * when I download the .apk to my phone the app installs fine Any ideas what's up? It would be really nice to make it as easy as possible to distribute to people who might be willing to do me the favor of testing. Thanks for any help, Bee --~--~-~--~~~---~--~~ 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] Cupcake Emulator do not mount SD card image
I just download a cupcake branch of source code and build it. I configured Eclipse for a new SDK, and appear the things is works great, EXCEPT emulator. 1. I configured a new AVD as parameter i pointed my old sdcard.img then loaded and do not see my sdcard 2. then I back and configure another AVD with a parameter to create a new sdcard.img, when the emulator loaded I still not seen sdcard in emulator. 3. then I try to something like: emulator -avd myavd -sdcard mysdcard.img and there is still no sd card. How can I restore my sd card in emulator. --~--~-~--~~~---~--~~ 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] All SYMBIAN based end devices accept Java language Applications :: Need Clarification
“All SYMBIAN based end devices accept Java language Applications” (i) Does this mean that the applications made for Android would run in S60 , without any modifications?? (ii)If not then what exactly we mean when we say the above statement?? Is there any web link to which I can refer to?? (iii) What are the coding guidelines that we need to follow so that an Android application can be ported on S60 with minimum changes?? Thank you all in advance. Best Regards, Zhubham --~--~-~--~~~---~--~~ 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: Q. Stack trace gives Hex values not function names when core library crashes
Hi While trying to debug native C libraries, upon receiving a SIGSEGV, the core dump thrown does not map address values to symbols as seen in DDMS. As mentioned above this is happening due to stripping of binaries. How can we prevent such stripping in Android or obtain detailed stack trace despite stripping ? Are there any changes we need to make to the Makefiles ? Thanks in advance On Feb 13, 1:47 am, fadden fad...@android.com wrote: On Feb 12, 1:59 am, click...@gmail.com click...@gmail.com wrote: I am looking for little more informations rather than Hex values. Like the backtrace feature where the stack hex values is mapped to the function names and function names are visible. The device can't show these, because the symbols are stripped out of the libraries before they are installed on the device. They do exist in the build tree; since you're doing your own builds, you can find them in the appropriate symbols directory under out/. Given that, you can use arm-eabi-addr2line to convert the symbols, or use gdb/gdbserver to do debugging directly on the device. Make sure you're using the out directory that corresponds to the binaries installed on the device. In any event, discussions about debugging native libraries might be more appropriate for android-porting or android-platform at this time. --~--~-~--~~~---~--~~ 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: Cupcake coming in April? Where is the SDK?
I think this is the thread you guys are looking for when trying to build cupcake: http://groups.google.com/group/android-platform/browse_thread/thread/775582c99fa2980f?hl=en On Mar 25, 12:21 pm, a...@tw schosnab...@gmail.com wrote: I alslo got similar situation. Follow this cupcake/development/tools/eclipse/README_WINDOWS.txt. I already build a SDK for Linux and Windows environment. And ADT 0.9.0 for Eclipse. But I got one trouble. Under Windows environment ( I do not try this in linux yet). I start the Eclipse and create one project. Editor compilans one problem: R.java cannot find. It's OK to me. I comment this line: setContentView(R.layout.main). And I try to build this simple project and debug this application. Then I got this message [2009-03-25 19:16:45 - cake2] Could not find cake2.apk! I found only *.class created, no .jar or .apk files. It seems build project cannot work properly. What am I missing? Any point I have to check ? --- XC He a...@tw --~--~-~--~~~---~--~~ 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: Q. Stack trace gives Hex values not function names when core library crashes
Hi While trying to debug native C libraries, upon receiving a SIGSEGV, the core dump thrown does not map address values to symbols as seen in DDMS. As mentioned above this is happening due to stripping of binaries. How can we prevent such stripping in Android or obtain detailed stack trace despite stripping ? Are there any changes we need to make to the Makefiles ? Thanks in advance On Feb 13, 1:47 am, fadden fad...@android.com wrote: On Feb 12, 1:59 am, click...@gmail.com click...@gmail.com wrote: I am looking for little more informations rather than Hex values. Like the backtrace feature where the stack hex values is mapped to the function names and function names are visible. The device can't show these, because the symbols are stripped out of the libraries before they are installed on the device. They do exist in the build tree; since you're doing your own builds, you can find them in the appropriate symbols directory under out/. Given that, you can use arm-eabi-addr2line to convert the symbols, or use gdb/gdbserver to do debugging directly on the device. Make sure you're using the out directory that corresponds to the binaries installed on the device. In any event, discussions about debugging native libraries might be more appropriate for android-porting or android-platform at this time. --~--~-~--~~~---~--~~ 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] Launch / Re-Launch flow
I'm trying to get a handle on the onXXX() flow, but am not sure if what I'm seeing is by-design, or is an artifact of repeated debugging sessions on the emulator. android:launchMode=singleInstance The app extends TabActivity, has a few tabs whose content is set via new Intent, but no heavy application work is being done yet. The question is about relaunching after pressing the home button: Launch from icon: onCreate, onStart, onResume Home button: onPause, onStop Relaunch: sometimes onStart, onResume othertimes onCreate, onStart, onResume In the cases where the relaunch starts with onCreate, pressing the back arrow on the emulator appears to bring a different instance of my application to the front. The only thing that I can figure out on why I'd get the different relaunch flows, is that I'm initially launching the app from Eclipse, making a little change, launching from Eclipse again, repeat, and this is actually creating new instance of my app. But I'm just guessing this matters, I have no idea, as just doing 'launch from eclipse, home key, relaunch from android icon' also has shown the 'onCreate, onStart, onResume' path. Any ideas on why the different relaunch flows? Thanks. --~--~-~--~~~---~--~~ 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: shared Jar files between different project
Hi Thanks firstly. Both project is running. In fact B is running, I try to instaniante A from B which lies in different apk. but it failed. The type should be com.example.test.(Just a guess, I'll confirm tomorrow) Regarding Is framework/base in project A or B? , I think both. When I put com.example.test to framework/base(which mean extend android API), it works. Regards, Jove On Mar 20, 1:26 pm, Greg Krimer gkri...@gmail.com wrote: Hi, I am confused. Which project is running A or B? Is com.example.A.test1 in project A or B? What is the type of the object that you do create? Try this: Object tmp = c.newInstance(); System.out.println(tmp); Is framework/base in project A or B? Finally, and this may not be important at all, but try using Class.forName() instead of the class loader directly. On Mar 19, 4:03 am,Jovejove.c...@gmail.com wrote: Hi guys, I meet a problem when using jar files, I simplify my question by below examples: test.jar include a class of com.example.test.class eclipse project A using test.jar and declare test1 extend from com.example.test eclipse project B using test.jar too and declare test2 extend from com.example.test Both project build sucessfull. Then I try to using reflection in project B to instaniance a instance of test1 Class ? c = tmpCtxt.getClassLoader().loadClass (com.example.A.test1); test tmp = (test) c.newInstance() // it throw java.lang.ClassCastException. (but if I put com.example.test.class into frameworks/base, it's OK) Anyidea about this issue? Any advice is appreciated. Regards, Jove --~--~-~--~~~---~--~~ 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] Research on Android Mobile Platform
I am V.Narasimha Reddy, working for Infiniti Research, a business research and consulting company, headquartered in UK. Our Company offers business research and consulting services to many of the Fortune 1000 companies including Cisco, Ferrari and BP. Presently, we are working on organizing a research study on various mobile application platforms such as Android etc,. Through this study we will be focusing on understanding the application developer’s perspective on various aspects of the platform including ease of use, financial benefits, support, ease of marketing/commercializing application and other such aspects. We are conducting this study, keeping in mind that the developers are the most important part of the mobile platform ecosystem. Hence, having developer’s views on the platform and its support structure is an absolute must. Study is expected to be launched during the next week of March, 2009. Given your expertise in the field and your association with key mobile application developer for mobile platforms, I request you to please provide your views/opinions for our study on these platforms. Please let me know what date/time suits you and I shall call you then. An email conversation would also be a delight. I assure you it will not take more than 15 - 20 minutes of your valuable time. Looking forward to your reply. Thanks in advance, Kind Regards, V Narasimha Reddy Analyst Tel: +91 998 601 1749 --~--~-~--~~~---~--~~ 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] Security library error
Hi all, I have the following error in my Android project: - This is the instruction: Security.addProvider( new com.sun.net.ssl.internal.ssl.Provider() ) - And this is the error: com.sun cannot be resolved to a type How can I solve it? Many thanks --~--~-~--~~~---~--~~ 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] UEventObserver
I'am trying to monitor the device status in java layer using UEventObserver in my own service, during run time, error occurs. Below is the log: java.lang.RuntimeException: Unable to open socket for UEventObserver From the code tracking, in native, in function int uevent_init(), it will call s = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT); But failed, Could anybody give me some hints on it? Thanks Charles --~--~-~--~~~---~--~~ 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] UEventObserver
I'am trying to monitor the device status in java layer using UEventObserver in my own service, during run time, error occurs. Below is the log: java.lang.RuntimeException: Unable to open socket for UEventObserver From the code tracking, in native, in function int uevent_init(), it will call s = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT); But failed, Could anybody give me some hints on it? Thanks Charles --~--~-~--~~~---~--~~ 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] Switch to SurfaceView
Im creating a simple game using a SurfaceView for drawing the Graphics. It works fine, but now I tried to add a title screen, which is (for now) only a LinearLayout and a Start-button, specified in XML. However, when I click this button and try to switch to my SurfaceView (By doing setContentView(R.layout.game), the screen turns black. But if I do setContentView(R.layout.game) immediatly in my Activity.onCreate it works. But not if I start with my Title-screen and then try to switch --~--~-~--~~~---~--~~ 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: Cupcake coming in April? Where is the SDK?
I'm also expirienced some problem with a today build of cupcake I just download a cupcake branch of source code and build it. I configured Eclipse for a new SDK, and appear the things is works great, EXCEPT emulator. 1. I configured a new AVD as parameter i pointed my old sdcard.img then loaded and do not see my sdcard 2. then I back and configure another AVD with a parameter to create a new sdcard.img, when the emulator loaded I still not seen sdcard in emulator. 3. then I try to something like: emulator -avd myavd -sdcard mysdcard.img and there is still no sd card. How can I restore my sd card in emulator. --~--~-~--~~~---~--~~ 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: Switch to SurfaceView
Can you post your code? Ivan Soto Fernandez Web Developer http://ivansotof.com On Wed, Mar 25, 2009 at 7:41 AM, Deren adam.d0...@gmail.com wrote: Im creating a simple game using a SurfaceView for drawing the Graphics. It works fine, but now I tried to add a title screen, which is (for now) only a LinearLayout and a Start-button, specified in XML. However, when I click this button and try to switch to my SurfaceView (By doing setContentView(R.layout.game), the screen turns black. But if I do setContentView(R.layout.game) immediatly in my Activity.onCreate it works. But not if I start with my Title-screen and then try to switch --~--~-~--~~~---~--~~ 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: Creating multiple layouts
Vijay Bahirji wrote: Hi, I am new to android and trying to create a customized list. Every item in the list has TextView and one Ratingbar. I now want add a couple of command buttons at the end of the list (like BACK, HOME, , NEXT). When I add these extra views to the layout xml file then they get added along with every item in the list. I think there should be another layout defined for the buttons to be displayed separate from the list. Anyone has an idea on how to do this? Have two layout files. One is for the activity, one is for the rows in the activity. The first you would use with setContentView(); the latter you would either supply to your adapter or use when you manually inflate the rows. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ 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] MSN Messenger protocol issues
Hi all, I am trying to test a simple messenger app in Android using the JML library. I can login but I can not get the contact list. Sometimes it shows part of my contact list but never the whole list. According to the MSN Protocol website, the message LST is sent once for each contact in the list but it doesn't happen with Android. The LST message is received more than once for each contact and the list is not completely received. It seems to be synchronisation issues between the Android SDK and the MSN Protocol. Any idea? Many thanks in advance This is the issue for one contact of the list: NS LST n=fri...@hotmail.com F=blabla C=d0090d03-8ce4-4ed8- NS LST N=frie NS LST n=fri...@hotmail.com F=blabla C=d009 NS LST n=fri...@hotmail.com F=blabla C=d0090d03-8ce4-4e --~--~-~--~~~---~--~~ 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 SMS Delivery Report setting
Hi, I want to know how to get SMS Delivery Report setting which is stored in the /data/data/com.android.mms/com.android.mms_preferences.xml. I wrote a application to read it with the following code: SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); boolean requestDeliveryReport = prefs.getBoolean( pref_key_sms_delivery_reports, true); Seems it does not work, it always returns the default value which is true. Does anybody know how to read/write the SMS Delivery Report setting. Thanks, JT --~--~-~--~~~---~--~~ 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: Task activity stack always reset when launched from Home
You can do adb logcat -b events to see the event log which will include a line the activity manager prints when finishing an activity, with the reason why it is doing it. On Tue, Mar 24, 2009 at 7:24 PM, jseghers jsegh...@cequint.com wrote: I am just starting on an Android app and I am puzzled about why my Task activity stack is being reset any time the application is launched from the Home screen. I used the ADT tools to create the application in Eclipse. The main activity is .UserLaunch and it starts the activity .About when the user presses a button. If the user then presses HOME and then relaunches the app, .UserLaunch is displayed and is the only thing on the stack. .UserLaunch has the launchMode singleTask. .About is standard. According to the documentation at http://developer.android.com/guide/topics/fundamentals.html#lmodes: However, a singleTask activity may or may not have other activities above it in the stack. If it does, it is not in position to handle the intent, and the intent is dropped. (Even though the intent is dropped, its arrival would have caused the task to come to the foreground, where it would remain.) The Task stack should be brought to the foreground and .About should still be displayed. I added Logging to all of the lifecycle events (edited to remove timestamps and shorten DEBUG/ and INFO/ to D/ and I/) and you can see that when HOME is pressed, .About cycles through onPause and onStop (as expected). Then when the app is again launched, .About is destroyed and .UserLaunch is restarted D/UserLaunch:(670): onCreate() D/UserLaunch:(670): onStart() D/UserLaunch:(670): onResume() I/ActivityManager(52): Displayed activity com.cequint.cityid/.UserLaunch: 4910 ms I/ActivityManager(52): Starting activity: Intent { comp= {com.cequint.cityid/com.cequint.cityid.About} } D/UserLaunch:(670): onPause() D/About(670): onCreate() D/About(670): onStart() D/About(670): onResume() I/ActivityManager(52): Displayed activity com.cequint.cityid/.About: 1031 ms D/UserLaunch:(670): onStop() I/ActivityManager(52): Starting activity: Intent { action=android.intent.action.MAIN categories= {android.intent.category.HOME} flags=0x1020 comp= {com.android.launcher/com.android.launcher.Launcher} } D/About(670): onPause() D/About(670): onStop() D/dalvikvm(670): GC freed 413 objects / 34128 bytes in 72ms I/ActivityManager(52): Starting activity: Intent { action=android.intent.action.MAIN categories= {android.intent.category.LAUNCHER} flags=0x1020 comp= {com.cequint.cityid/com.cequint.cityid.UserLaunch} } D/About(670): onDestroy() D/UserLaunch:(670): onRestart() D/UserLaunch:(670): onStart() D/UserLaunch:(670): onResume() Here is the relevant section of the Manifest: application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.UserLaunch android:label=@string/app_name android:launchMode=singleTask intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.About android:launchMode=standard /activity /application Anyone have any ideas why this is always resetting the Activity Stack? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ 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: Track Ball Problem...
You need to register your activity to the system to tell it that you can handle trackball events directly. If you don't, then the system will emulate the events with key down/up events. I don't know the API to do that. By the way, you can press Delete to enable track-ball mode in the emulator (or even Ctrl-T to toggle between trackball and non-trackball modes). This should help you develop your app. (And I recommend to use a real trackball mouse attached to your machine to test that, it really feels better than using a mouse). On Wed, Mar 25, 2009 at 5:25 PM, ANKIT SOMANI ankitsomani...@gmail.comwrote: Hi, I want to Develop a Game in which I want to move my object using Track Ball. for this i use onKeyDown() to up,down,left,right,fire movement in my class. Its working fine in Emulator on D-Pad., but when i install in device trackball not working efficiently. on Printing LogCat it says that the OnKeyUp() is called automatically on each OnkeyDown().. which is right but when I have to use is for continously(Continous trackball right pressing).. It failed.I even try OnTrackBallEvent(). OnKeyMultiple... but not working.. If any body can help that on continous treating of trackball, please help. Thanks in Advance. Regards ~Ankit Somani --~--~-~--~~~---~--~~ 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: Questions related to android, please answer
Learn to Google. http://developer.android.com On Mar 24, 11:04 pm, tharunandr...@gmail.com tharunandr...@gmail.com wrote: 1. What is the name of the alliance that supports Android? 2. Which is the kernel that Android relies on for core system services? 3. Is Android a multi-process system? 4. What is an Android installable called ? 5. What are the basic building blocks of an Android Application? 6. Which is the class which acts as a basic building block for user interface components? 7. What is an Intent 8. Which is the file which has all the essential features like Activity,services of the application listed that is going to be used by the app? 9. Does Android support Location Based Services? 10. List the tools that come with in the Android SDK that help you to develop/debug applications. 11. How do you handle UI events in Android ? --~--~-~--~~~---~--~~ 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: Is it possible to pick contacts from a single group ?
Well, I haven't found a way to launch the system picker for a specific group, so I've written a picker using a ListView and an URI of the form: Uri uri = Uri.parse(content://contacts/groups/system_id/ + Contacts.Groups.GROUP_MY_CONTACTS + /members); (with handy clue from here: http://groups.google.com/group/android-developers/browse_thread/thread/b070f4440295be61/19ed988a8559b994?lnk=gstq=uri+for+contact+group#19ed988a8559b994 - thanks, Mike!) I can't help thinking there should be a way to use ACTION_PICK and this Uri to summon up a working picker, but I haven't found a way to make that go. Richard On Mar 23, 3:26 pm, jarkman jark...@gmail.com wrote: I'm using ACTION_PICK to show a contact picker: startActivityForResult( new Intent(Intent.ACTION_PICK, Uri.parse (content://contacts/people) ) ,RESULT_PICK_CONTACT_REQUEST); I'd really like to be showing only contacts from the My Contacts group, rather than the list which includes all the auto-generated contacts. I had hoped to find an Extra to specify the group, but I can't find any sign of one. Is there any way to pick a contact from a specified group, or do I need to write my own picker ? Thanks, Richard --~--~-~--~~~---~--~~ 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: All SYMBIAN based end devices accept Java language Applications :: Need Clarification
where did you find this declaration? On Wed, Mar 25, 2009 at 6:30 PM, Zhubham sahilz...@gmail.com wrote: “All SYMBIAN based end devices accept Java language Applications” (i) Does this mean that the applications made for Android would run in S60 , without any modifications?? (ii)If not then what exactly we mean when we say the above statement?? Is there any web link to which I can refer to?? (iii) What are the coding guidelines that we need to follow so that an Android application can be ported on S60 with minimum changes?? Thank you all in advance. Best Regards, Zhubham --~--~-~--~~~---~--~~ 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: Task activity stack always reset when launched from Home
Thank you for your reply! I am seeing am_task_to_front followed by am_finish_activity. I found the event-log-tags file and apparently the reason is clear. What is not clear to me though is why the activity manager thinks it should clear the the task. The relevant lines of the log are: I/am_on_resume_called( 94): com.android.launcher.Launcher I/dvm_gc_info( 94): [7017575181485176104,-9053780441931634733,-4010030953047537782,8554533] I/force_gc( 209): bg I/dvm_gc_info( 209): [7163384747111232651,-9098816781953771608,-4017912252395432053,7919391] I/am_pause_activity( 52): [1128800640,com.android.launcher/.Launcher] I/am_task_to_front( 52): 3 I/am_finish_activity( 52): [1129575992,3,com.cequint.cityid/.About,clear] I/am_destroy_activity( 52): [1129575992,3,com.cequint.cityid/.About] I/am_new_intent( 52): [112951,3,com.cequint.cityid/.UserLaunch,android.intent.action.MAIN,,, 274726912] I/am_on_paused_called( 94): com.android.launcher.Launcher I/am_resume_activity( 52): [1129749080,3,com.cequint.cityid/.UserLaunch] I/am_on_resume_called( 209): com.cequint.cityid.UserLaunch I/dvm_gc_madvise_info( 94): [290816,245760] I/dvm_gc_madvise_info( 209): [352256,241664] I/force_gc( 94): bg - John On Mar 25, 10:16 am, Dianne Hackborn hack...@android.com wrote: You can do adb logcat -b events to see the event log which will include a line the activity manager prints when finishing an activity, with the reason why it is doing it. On Tue, Mar 24, 2009 at 7:24 PM, jseghers jsegh...@cequint.com wrote: I am just starting on an Android app and I am puzzled about why my Task activity stack is being reset any time the application is launched from the Home screen. I used the ADT tools to create the application in Eclipse. The main activity is .UserLaunch and it starts the activity .About when the user presses a button. If the user then presses HOME and then relaunches the app, .UserLaunch is displayed and is the only thing on the stack. .UserLaunch has the launchMode singleTask. .About is standard. According to the documentation at http://developer.android.com/guide/topics/fundamentals.html#lmodes: However, a singleTask activity may or may not have other activities above it in the stack. If it does, it is not in position to handle the intent, and the intent is dropped. (Even though the intent is dropped, its arrival would have caused the task to come to the foreground, where it would remain.) The Task stack should be brought to the foreground and .About should still be displayed. I added Logging to all of the lifecycle events (edited to remove timestamps and shorten DEBUG/ and INFO/ to D/ and I/) and you can see that when HOME is pressed, .About cycles through onPause and onStop (as expected). Then when the app is again launched, .About is destroyed and .UserLaunch is restarted D/UserLaunch:(670): onCreate() D/UserLaunch:(670): onStart() D/UserLaunch:(670): onResume() I/ActivityManager(52): Displayed activity com.cequint.cityid/.UserLaunch: 4910 ms I/ActivityManager(52): Starting activity: Intent { comp= {com.cequint.cityid/com.cequint.cityid.About} } D/UserLaunch:(670): onPause() D/About(670): onCreate() D/About(670): onStart() D/About(670): onResume() I/ActivityManager(52): Displayed activity com.cequint.cityid/.About: 1031 ms D/UserLaunch:(670): onStop() I/ActivityManager(52): Starting activity: Intent { action=android.intent.action.MAIN categories= {android.intent.category.HOME} flags=0x1020 comp= {com.android.launcher/com.android.launcher.Launcher} } D/About(670): onPause() D/About(670): onStop() D/dalvikvm(670): GC freed 413 objects / 34128 bytes in 72ms I/ActivityManager(52): Starting activity: Intent { action=android.intent.action.MAIN categories= {android.intent.category.LAUNCHER} flags=0x1020 comp= {com.cequint.cityid/com.cequint.cityid.UserLaunch} } D/About(670): onDestroy() D/UserLaunch:(670): onRestart() D/UserLaunch:(670): onStart() D/UserLaunch:(670): onResume() Here is the relevant section of the Manifest: application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.UserLaunch android:label=@string/app_name android:launchMode=singleTask intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.About android:launchMode=standard /activity /application Anyone have any ideas why this is always resetting the Activity Stack? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them.- Hide quoted text - - Show quoted text -