Re: [android-developers] Android screen capture delay due to writing data in the file..

2013-09-18 Thread Cg
Use toast. ashish ashish.a...@gmail.com wrote: Hi, I have a rooted device and i successfully capture the screenshot of current screen.and use the below code. Process process = Runtime.getRuntime().exec(su); DataOutputStream os = new DataOutputStream(process.getOutputStream());

Re: [android-developers] java.lang.StringIndexOutOfBoundsException while playing video in videoView : Android v 4.2.1

2013-09-18 Thread Cg
Make runtime strings and do not use array -- 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] Crash Launcher2 NullPointerException in onDetachedFromWindow()

2011-09-15 Thread cg-dev
Crash Launcher2 NullPointerException in onDetachedFromWindow() Hi, I'm developping an application on Nexus S that testing some Android API. To do so, I need to pause/resume my application : // Cause activity to be brought to front void resumeActivity() { Intent intent = new

[android-developers] Re: Using transparent png textures won't work

2011-05-25 Thread cg-dev
Hi, export it as 32bpp (tried 3 differenty image editing tools). It's strange you cannot get 32 bpp png. I use gimp every day and my PNG with transparency work very well. (Take care : android downsampling PNG without transparency to 565) Sorry this issue seems occurs only on 2.1 Here a

[android-developers] Re: External Jar and Resources

2011-05-25 Thread cg-dev
it is a pretty serious flaw in android development. I think the compiler shall be able to incorporate resources within JAR files into APK. On May 13, 11:22 am,cg-devcharles.gorand@gmail.com wrote: Hi, If I understand well your issue : What if I want to add some resources

[android-developers] Re: Nightmare loading mask bitmap

2011-05-13 Thread cg-dev
Hi, I face the same issue with opengl. My texture gradient were dirty due to convertion. So I embed libpng in my application using NDK. Regards. On 13 mai, 13:04, Ralf Schneider li...@gestaltgeber.com wrote: Your image is probably convert to 565 and the back to 24bits. This thread discusses a

[android-developers] Re: Android renders RGB values wrong.

2011-05-13 Thread cg-dev
Hi, I face the same issue with OpenGL texture. I use gradient texture and this one was damaged due to convertion from 24bit = 565. To solve this issue I embeded libpng in my application using NDK. You said that the screen is 565 so we loose precision : Yes but in OpenGL, glEnable(GL_DITHER)

[android-developers] Re: External Jar and Resources

2011-05-13 Thread cg-dev
Hi, If I understand well your issue : What if I want to add some resources to the jar (e.g. a layout for custom notification), is it possible ? No as layout are XML files that are compress when building APK. And there is no API to load an raw XML layout. (except if it changes recently) If

[android-developers] Re: NFC send Photo

2011-05-13 Thread cg-dev
Hi, As far as I know, I don't think you can put an image into a tag in a standard way. Check with Smart Poster Ndef tag type, maybe you can with this type. If only your application need to read and write the image, you can simply use Ndef type Text and put your image in a raw buffer. Regards.

[android-developers] Re: Adding an button to a custom view

2011-05-13 Thread cg-dev
Hi, your custom view should derives from a Viewgroup. (Viewgroup inherit from View) Then simply create the View you want to add and call Viewgroup.addView(). Regards. On 12 mai, 18:32, Kapil kapilsc...@gmail.com wrote: Dear Developers, My name is Kapil and I am trying to write a custom view

[android-developers] Re: Using transparent png textures won't work

2011-05-13 Thread cg-dev
Hi, Also the 3 textures loaded from jpg There is no transparency in JPEG. You mean 2 jpeg and 1 png. And for the png one, you didn't get transparency. Right ? (Take care : android downsampling PNG without transparency to 565) You can try other combination of parameters for this

Re: [android-developers] Re: Android renders RGB values wrong.

2011-05-13 Thread cg-dev
I know, but in Eclair it's not working. If you put Bitmap option to RGBA. You get a RGBA image but the image is altered. Maybe I'm wrong, but I remember I face this issue on my Eclair phone and take this workaround using libpng. In eclair release, if the bitmap has no alpha it was converted

[android-developers] Intent to launch Google Latitude

2011-05-10 Thread cg-dev
Hi all, I'm trying to launch Google Latitude using Intent. I'm using an URI found on the net : latitude://latitude/friends/location/exam...@gmail.com And this code : Intent intent = new Intent(android.content.Intent.ACTION_VIEW, uri); intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);

[android-developers] Re: Problem Sony Xperia Neo Camera zoom-support = false

2011-05-02 Thread CG
Hi Johan, Thank you very much for your reply :) Rgds, CG On Apr 28, 5:38 pm, Johan Abramsson johan.abrams...@sonyericsson.com wrote: Hi, Your phone does give you a correct answer. Zoom in the Camera API  is not supported right now. It will be supoprted in the 4.0.x.y.z Version

[android-developers] Problem Sony Xperia Neo Camera zoom-support = false

2011-04-26 Thread CG
Hi all, I have a problem and hope that somebody who encountered this before can give me some hints.. I am developing a app which use the camera on Sony Xperia Neo (http:// www.sonyericsson.com/cws/products/mobilephones/overview/xperia-neo?cc=gblc=en#view=features_specifications) which support

[android-developers] Thread + ImageView

2011-03-11 Thread Marc CG
Hi everybody! First, sorry if my English is bad, usually i don't use it... I am making a program witch have 2 java class. The first class is the main activity and the second is a thread. In the main activity i have some ImageViews, Textviews, CheckBox and RadioButtons. My Problem is that when i

[android-developers] Issue with Test class SingleLaunchActivityTestCase

2011-03-04 Thread cg-dev
Hi, We're developping a test activity using SingleLaunchActivityTestCase and JUnit on Android 2.3.3 We face the following issue : In JUnit view in eclipse we have the following function call order : testActivityTestCaseSetUpProperly() - this one is built in android. testA() testB() testC()

[android-developers] Re: Issue with Test class SingleLaunchActivityTestCase

2011-03-04 Thread cg-dev
(); } super.tearDown(); } This : if (sTestCaseCounter == 1) should be replaced by if (sTestCaseCounter == 0) ? Regards. On 4 mar, 11:41, cg-dev charles.gorand@gmail.com wrote: Hi, We're developping a test activity using SingleLaunchActivityTestCase and JUnit on Android 2.3.3 We face

[android-developers] How do i simulate a touch on the soft keyboard?

2010-10-06 Thread CG Tan
I am trying to simulate a touch on the soft keyboard, how do i do that? I try injectPointerEvent but it fail. -- 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] How to let parent handle onclick event for ListView

2010-07-27 Thread CG
This should be a simple question because I couldn't get the answer from Google . I have ListView in a LinearLayout . I need to handle the click event to allow user click on the LinearLayout to trigger some function. I try to add onClickListener to the LinearLayout , and it works only when I

[android-developers] Re: How to let parent handle onclick event for ListView

2010-07-27 Thread CG
Murphy mmur...@commonsware.com wrote: Clicking on a list item should be handled by the ListView and should take action based upon what item the user clicked. I fear that your proposed UI design will be very confusing to users. On Tue, Jul 27, 2010 at 3:28 AM, CG learn@gmail.com wrote

[android-developers] Re: How to let parent handle onclick event for ListView

2010-07-27 Thread CG
); v.setClickable(true); v.setOnClickListener(flipPrevious); } // Do something } Thanks for your guide ... appreciate. On Jul 27, 4:20 pm, Mark Murphy mmur...@commonsware.com wrote: On Tue, Jul 27, 2010 at 4:13 AM, CG learn

[android-developers] Re: OpenglES issue with Acer liquid.

2010-07-16 Thread cg-dev
Hi, I answer to myself : I update Acer liquid to official OTA update 2.1 the issue seems fixed. Drivers issue maybe ... -- 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] OpenglES issue with Acer liquid.

2010-06-29 Thread cg-dev
Hello, I'm developping a native application for android and I face to artefacts when rendering the scene. I can reproduce the issue with Java code. While the following code running, I got a green screen. But If I move the status bar up and down over the screen, I see some red artefacts. Here a

[android-developers] Re: EditText.onKeyUp() doesn't catch all keys

2009-10-03 Thread CG
Sorry everyone; I didn't want to create any trouble here. Thanks anyway for the TextWatcher solution; it works fine. On Oct 2, 10:03 pm, Dianne Hackborn hack...@android.com wrote: On Fri, Oct 2, 2009 at 8:16 AM, Hannes Steiger hannes.stei...@googlemail.com wrote: ..seems as if some

[android-developers] Re: EditText.onKeyUp() doesn't catch all keys

2009-09-30 Thread CG
On Sep 26, 8:39 pm, Dianne Hackborn hack...@android.com wrote: IMEs perform their edits through the InputConnection interface.  Apps should generally watch for edits on the text view rather than catching key events. Thanks for the quick answer. This approach looks somewhat different to the

[android-developers] EditText.onKeyUp() doesn't catch all keys

2009-09-26 Thread CG
Dear all, I'm writing a little dictionary application for Android 1.5, and I'd like to catch the user's keystrokes in an EditText instance. The following code recognizes all keys, which are typed in in the Android emulator: new EditText(this) { @Override public boolean onKeyUp(final int

[android-developers] EditText.onKeyUp() doesn't catch all keys

2009-09-25 Thread CG
Dear all, I'm writing a little dictionary application for Android 1.5, and I'd like to catch the user's keystrokes in an EditText instance. The following code recognizes all keys, which are typed in in the Android emulator: new EditText(this) { @Override public boolean onKeyUp(final

[android-developers] Re: Countries for selling priced applications in Android Market

2009-08-29 Thread CG
This is indeed very annoying, sitting in Denmark and cannot bye or sell aps. --~--~-~--~~~---~--~~ 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] Re: Advice for speeding up my drawing

2009-08-27 Thread CG
or some bitmap buffer mechanism to store the drawn text and then just place it on the Canvas without overhead. On Wed, Aug 26, 2009 at 12:24 PM, CG christian.glee...@gmail.com wrote: Hi, I am creating an app that show some histograms off your traveling speed in different time periods

[android-developers] Re: Advice for speeding up my drawing

2009-08-27 Thread CG
I have now changed most of the strings to startup initialized char arrays (missing 4) and I am completely baffled by the perfomance gain. I went from a comlpete render loop time on ~350-500 to 170-350 --~--~-~--~~~---~--~~ You received this message because you are

[android-developers] Re: Advice for speeding up my drawing

2009-08-27 Thread CG
apparantly so, I replaced 4 more string allocations in the drawing routine, the strings are very dynamic, so i have to update the values each time. public final char[] legendText = new char[] {'0', '0', '0', '%'}; public int legendOffset = 2; public int legendLength = 0; public void

[android-developers] Advice for speeding up my drawing

2009-08-26 Thread CG
Hi, I am creating an app that show some histograms off your traveling speed in different time periods (histogram for the last minutte, histogram for the last 2 minuttes etc.) I would like to have an animation, and have discovered that drawing everything takes arround 300-400ms. wich is to long

[android-developers] Re: Slow GPS updates

2009-08-13 Thread CG
Surely seems faster then. from 2051 samples. the mean delay is 507ms and only 14 samples is above 600ms --~--~-~--~~~---~--~~ 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] Re: Slow GPS updates

2009-08-13 Thread CG
You know what Paul, I double checked my calculations, and for some embarasing reason, I am not able to substract two number, The HTC also have delays of 1000ms. so you should multiply above numbers by 2, sorry for the confusion. --~--~-~--~~~---~--~~ You received

[android-developers] Re: Slow GPS updates

2009-08-12 Thread CG
Even tough the updates ticks with 500ms, it still takes about 3-4 seconds for the device to discover that I stopped moving. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this

[android-developers] Re: Slow GPS updates

2009-08-11 Thread CG
I have now measured the sample rate, and it is quite consistent with 500m/s between each sample. I removed my filter, and the application became far more responsive, but it still takers quite some time before I get accurate readings after stopping. Anyway, I am quite satisfied with the response

[android-developers] Slow GPS updates

2009-08-09 Thread CG
Hi, I am developing a small app that works as a speedometer with a build in histogram. But it is quite unresponsive, I test it by driving in my car, and when i go from 80 to 0 it takes about 4-6 seconds before my needle is updated. For simple outlier removal, i use a 1x3 median filter on my

[android-developers] Re: calculate distance using latitude and longitude

2009-08-09 Thread CG
you can use public static void distanceBetween (double startLatitude, double startLongitude, double endLatitude, double endLongitude, float[] results) in the Location class

[android-developers] Re: Persistance of dynamic objects, your advice

2009-08-08 Thread CG
Hi Yusuf. Thanks for the answer. and don't worry, I did read the guide. my concern was more what required fewest cpu-cycles :) I have done the following: public void saveSampleSequense(FileOutputStream out) throws IOException { DataOutputStream p = new DataOutputStream(out);

[android-developers] Persistance of dynamic objects, your advice

2009-08-07 Thread CG
Hi I am new to this android stuff and SQLlite etc. I am going to log some numbers at a certain interval, and will put them into a dynamic histogram, by dynamic i mean that there will be a maximum number of samples in the histogram, the histogram and age stuff should be persisted either in db or

[android-developers] Re: ListView :: How to automatically scrool to see a element ?

2009-02-22 Thread CG
Thanks ! Actually I was calling this method but right after I called a setAdapter ... So the selection was lost ! Thanks for your helpfull answer ! On 19 fév, 13:38, for android forandr...@gmail.com wrote: listView.setSelection(position); On Thu, Feb 19, 2009 at 5:55 PM, CG veloid.cont

[android-developers] ListView :: How to automatically scrool to see a element ?

2009-02-19 Thread CG
Dear all, I am facing a strange an issue that should simple to solve I suppose. I wonder how can I automatically scroll to see an element in a list view. Let's say I know that I want to see the element view number 6 in my list view, how do I scroll my list to see this element ? I look at the

[android-developers] Set an EditText view editable or not

2008-11-17 Thread CG
Hi all, I am facing an issue ... I explain the behaviour I like to have : I have several edittext views. Since they are in a overriden class of Edit text, they have a specific look and feel. I would like to have for them the customized LF when my application starts and when people look at my

[android-developers] Get a simple GPS position :: What is the *best* way of doing ?

2008-10-06 Thread CG
Dear all, I don't really have an issue but I am just wondering what is the best way to get a simple GPS position (no update required). I just want to have the current position when my app is launched By reading the documentation it seems really simple and this is what I am doing :

[android-developers] Unable to create an URI for a local sound

2008-09-22 Thread CG
Hey, I try to play a local sound in a notification. The issue I meet is the folowing : I am unable to load the file. My code is : Uri uri = Uri.parse(android.resource://com.xirgonium.android/raw/ beep); mNotify.sound = uri; The package name is the one described in my manifest. I get the

[android-developers] Create custom zoom contols in Mapview

2008-09-18 Thread CG
Hi, I'd like to create some custom zoom control in the mapview. I don't know where to start. I temporally did some stuff like this : LinearLayout zoomView = (LinearLayout) mapViewFromXML.getZoomControls(); zoomView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,

[android-developers] Alert Dialog never displayed in when call in the run() method of a separate process.

2008-09-08 Thread CG
Hello, I am facing a strange issue. I suppose it is due to my bad understanding of processes and compatibilities with processes. So here is the behavior I'd like to have : When I open my map, actions are done in background. So I use a progress dialog. For that I need an separate thread. But if

[android-developers] Re: Alert Dialog never displayed in when call in the run() method of a separate process.

2008-09-08 Thread CG
to put the Dialog display in the event queue. Just have a look at the API docs. On 8 Sep., 18:16, CG [EMAIL PROTECTED] wrote: Hello, I am facing a strange issue. I suppose it is due to my bad understanding of processes and compatibilities with processes. So here is the behavior I'd

[android-developers] Re: SharedPreferences not stored betweed 2 emulator launch

2008-08-29 Thread CG
I just up the subject because it seems to be a bug or a mess in the documentation. Before trying to use the new preference mechanism I try my previous preference storage (that worked perfectly under m5). This mechanism worked before like that : Restore : public static void

[android-developers] Simple Mock Location Provider

2008-08-25 Thread CG
Hi, I'd just like to create to get a location (not tracking, just get the last postion fixed), but for my mock location provider, I'd like this fix change time to time. I tried the old method by creating a new directory under the location directory but it seems it does not work anymore (as