[android-developers] Re: Problem to show unicode strings in TextView
I have also tried to escape "&" or "", e.g. replacing "&" with "&" or "&" etc, but none of them work. On Oct 16, 5:18 pm, qmwestview wrote: > Hi there, > > My data (stored as UTF-8 in the SQL db), when arrive at the phone as > json strings, appear to be decimalUnicode, such as > "约克小" > > When I use setText("...") to show them inTextView, they are shown in > their original form, rather than the characters they represent. If I > use their equivalent form of UTF-8, i.e. "\u7ea6\u514b\u5C0f", they > then are shown correctly as "约克小"。 > > My questions are: > > 1. How to receive the data in "UTF-8" rather than decimalunicode? (I > tried InputStreamReader(inputStream, "UTF-8") but seems not working) > > or > > 2. How to send the data in "UTF-8" for Android rather than decimalunicode(the > same decimalunicodework fine for browser)? > > or > > 3. Is there any function which can turn decimalunicodestring into > UTF-8 string? > > 4. Any other advice please? > > Many thanks in advance, > > qmwestview --~--~-~--~~~---~--~~ 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: Google wave invitations...?
me me !!! Thanks! On Oct 16, 4:32 pm, budziq wrote: > Well. Who wouldn't want one ;)? I guess I'd like one too ;) > > On Oct 16, 4:02 pm, Carl Whalley wrote: > > > I'd love an invite too ... anyone ... thanks! > > > On Oct 16, 2:26 pm, Gavin Aiken wrote: > > > > Takes at least 24 hours in my experience :) have fun waving! > > > On Fri, Oct 16, 2009 at 2:09 PM, Kenneth Adam Miller < > > > > kennethadammil...@gmail.com> wrote: > > > > Have any of you gotten an email yet? > > > > I swear I've sent them out... > > > > perhaps they're just nominations for a possible invite to google wave > > > > and > > > > not you know actual concrete invitations > > > > I don't know, but I'm guessing that you guys would still want it. > > > > Hahah > > > > > :) > > > > I'm in class right now, but I'll review all you guys > > > > > On Fri, Oct 16, 2009 at 7:40 AM, GSC wrote: > > > > >> If anyone else has an available invitiation, please send me one. > > > > >> Thanks > > > > >> On Oct 16, 7:31 am, ColletJb wrote: > > > >> > I think there are no invitation left from Kenneth Adam Miller. > > > > >> > But if anyone invited by him has invitation and can invite me, It > > > >> > would be great ;) --~--~-~--~~~---~--~~ 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 GPS implement
Can anybody give me some advices...thank you!! On 10月16日, 下午6時48分, marcus wrote: > Hi All~~ > > I am porting GPS to Android now. I have been look for many web site > relate to Android GPS porting include this group. However, I also feel > confused about that. > > I have some questions. Can anyone give me some suggestions and I will > appreciate about that. > > 1.There are 3 files : Android.mk, gps.cpp and gps_qemu.c in hardware/ > libhardware_legacy/gps. What is the functionality about the 3 files in > directory gps. Should I modify the 3 files to implement GPS. > > 2.In this web > sitehttp://www.netmite.com/android/mydroid/cupcake/development/pdk/docs/g..., > it shows that anyone that want to integate GPS with Android should > create a shared library named libgps.so refer to gps.h. My question is > how to create a shared library libgps.so.If the libgps.so is created, > where can I find it. What is the relation between libgps.so and > libhardware_legacy.so. > > 3.How to test GPS if gps is implemented successfully. I know there is > a gpstest tool in Android but I don't know how to use it. Can someone > tell me the detail about gpstest tool provided by 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] HTC Hero + "requestFeature() must be called"
I am getting a "requestFeature() must be called before adding content" but only on HTC Hero phones. This error nevers occurs on G1s, Magic but only on the Hero. I think it occurs (but not sure) when a progress dialog is shown to the user. Weird thing is, the progress dialog is shown two or three times on the Hero with no problems. On the third or forth time it is shown to the user, the error above occurs. Why only on the Hero? Any suggestions? case DIALOG3_KEY: progressDialog.setMessage(getString (R.string.deletefilewait)); progressDialog.setIndeterminate(true); progressDialog.setCancelable(true); return progressDialog; FYI - progressDialog is a global variable - private ProgressDialog progressDialog; Thanks, Shane --~--~-~--~~~---~--~~ 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] BufferedImage from URI or Bitmap
Hello, Let I've an URI (not URL) for an image in the gallery. Now I want to get the BufferedImage from it. I can get a Bitmap from it. Is there any way to get BufferedImage from the URI or from the Bitmap? Plz help. --~--~-~--~~~---~--~~ 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] Wave invitation
Can I get one please? 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] Wave Invitation
Can I get one ? 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: Touch event: Delayed reception from actual touch?
The move event you receive contains as close as possible to the most recent location (it is retrieved immediately before dispatching to the app). You don't say how much lag you are seeing, so it is hard to offer advice -- is it more laggy than in other standard parts of the UI like list views? Is it the same? If it is the same, this is probably just a lower-level characteristic of the device -- there can be a lot of filtering/processing going on in the touch firmware to generate clean points, for example. If the lag you are seeing is worse than the rest of the UI, it most likely is an issue in your app, unrelated to the simple dispatching code here. Perhaps some part of the drawing is very slow, etc. You could try profiling it to see what is going on. On Sat, Oct 17, 2009 at 8:04 PM, Matt Hall wrote: > > Hi everyone, > > I noticed when developing on an HTC Magic (G2) that when moving your > finger on the screen the location of the touch events trail your > finger pretty significantly. To test this I wrote a very simple app > that just draws a rectangle where you're touching. Even in this simple > case the rectangle can trail the finger on screen by a fair amount. > Here's the View that handles the touches and draws the rectangle: > > public class TouchTestView extends View { >private float x; >private float y; >private Paint paint = new Paint(); >public static final int SIZE = 40; > >public TouchTestView(Context context) { >super(context); >paint.setColor(Color.RED); >} > >@Override >public boolean onTouchEvent(MotionEvent event) { >switch (event.getAction()) { >case MotionEvent.ACTION_DOWN: >x = event.getX(); >y = event.getY(); >invalidate(); >return true; >case MotionEvent.ACTION_MOVE: >x = event.getX(); >y = event.getY(); >invalidate(); >return true; >case MotionEvent.ACTION_UP: >x = -1; >y = -1; >invalidate(); >return true; >} >return super.onTouchEvent(event); >} > >@Override >protected void onDraw(Canvas canvas) { >canvas.drawRect(x - SIZE, y - SIZE, x + SIZE, y + SIZE, > paint); >} > } > > So my question is: Is there a significant built in time delay between > the generation of the touch event and it's reception in the running > activity? If so, is there any tricks or methods to get those events in > a faster or more direct way? In our application the delay is causing > some pretty unfortunate performance results. > > Thanks for any advice or help, > Matt > > > -- 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, and so won't reply to such e-mails. 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: onSearchRequested() doesn't call search activity in 1.5
Any ideas? I am attempting the same thing right now with 1.5 and am seeing the same behavior. On Oct 8, 6:42 am, Miguel Paraz wrote: > Hi, > The 1.5 AVD doesn't seem to follow the documentation > in:http://developer.android.com/reference/android/app/SearchManager.html > > which says it's enough to call onSearchRequested() to call thesearch > activity. > I need to call startSearch() to make it work. > However, when I check the source code of Activity.java, > onSearchRequested() does call startSearch(). > > This works in 1.6. > > Is this a bug in 1.5, or did I miss something? 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] Touch event: Delayed reception from actual touch?
Hi everyone, I noticed when developing on an HTC Magic (G2) that when moving your finger on the screen the location of the touch events trail your finger pretty significantly. To test this I wrote a very simple app that just draws a rectangle where you're touching. Even in this simple case the rectangle can trail the finger on screen by a fair amount. Here's the View that handles the touches and draws the rectangle: public class TouchTestView extends View { private float x; private float y; private Paint paint = new Paint(); public static final int SIZE = 40; public TouchTestView(Context context) { super(context); paint.setColor(Color.RED); } @Override public boolean onTouchEvent(MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: x = event.getX(); y = event.getY(); invalidate(); return true; case MotionEvent.ACTION_MOVE: x = event.getX(); y = event.getY(); invalidate(); return true; case MotionEvent.ACTION_UP: x = -1; y = -1; invalidate(); return true; } return super.onTouchEvent(event); } @Override protected void onDraw(Canvas canvas) { canvas.drawRect(x - SIZE, y - SIZE, x + SIZE, y + SIZE, paint); } } So my question is: Is there a significant built in time delay between the generation of the touch event and it's reception in the running activity? If so, is there any tricks or methods to get those events in a faster or more direct way? In our application the delay is causing some pretty unfortunate performance results. Thanks for any advice or help, Matt --~--~-~--~~~---~--~~ 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 start a service without using any activity??
You can try to code, and then post the problem you encounter. On 10月17日, 下午1时10分, pink 444 wrote: > Thanks for your replay. > > Can you give me a example . > > On Oct 16, 2:55 pm, Farproc wrote: > > > > > First, you do not have to start/stop aservicefrom a Activity. You > > can > > do that in anywhere via a Context object(which is very easy to > > retrieve). > > > If you want to start aservice, just call Context.startService(), > > form > > then on theservicewill keep running in background until you > > explicitly > > call Context.stopService(). Then call Context.bindService() if you > > want > > to control theserviceand Context.unbindService() when you do not > > want to communicate with theserviceanymore. > > > Finally, Call Context.stopService() to terminate theservicewhen it > > is > > not needed. > > > ps: Though aserviceruns in "background", it runs in the main(UI) > > thread. > > > On 10月16日, 下午12时38分, pink 444 wrote: > > > > Hai, > > > > My application has a background process which continuously waits > > > on a socket for receiving messages and it should be started only once > > > and at the time of application starting.Thus i want to do that > > > background job in aservice. > > > > Theserviceshould not be started from the activity ,it should be > > > started at the application starting. > > > > How can i define theservice,which will be started at the time of > > > application starting? > > > >If at all theserviceis started from activity.The activity can be > > > destroyed > > > and restarted.when this happens theservicealso be restarted . > > > > Any help will be appreciated highly. > > > > Thanks, > > > -SIva. --~--~-~--~~~---~--~~ 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: Change button color on Focus and on click
res/drawable/my_multi_state_bg.xml http://schemas.android.com/apk/res/android";> Point to that as in android:background="@drawable/my_multi_state_bg" or through java code wherever u please. On 10月16日, 下午6时39分, Shoby wrote: > Hi Farproc, > > Could you please provide a sample code or a link to a sample code for > the same? > > Thanks, > Shoby > > On Oct 16, 3:04 pm, Farproc wrote: > > > > > Set button's background to a StateListDrawable object or xml resource. > > > Here is a sample to use StateListDrawable resource. It's very easy you > > event do not need to write the listeners!!! > > > On 10月16日, 下午5时43分, Shoby wrote: > > > > Hi i am developing an application that has a button whose color should > > > change green color on focusing on the button and the color of button > > > should change to red on clicking the button. I am using > > > setBackgroundResource() in the onClick and onLongClick listeners. > > > Though it changes the button color, it also changes the button shape > > > by making it look like a rectangle. How can this be solved? i have > > > used the below code to do the same: > > > > final Button b = (Button)findViewById(R.id.Button01); > > > b.setOnLongClickListener(new View.OnLongClickListener(){ > > > > public boolean onLongClick(View v) { > > > b.setBackgroundResource(R.color.green); > > > return false; > > > } > > > }); > > > >b.setOnClickListener(new View.OnClickListener() { > > > public void onClick(View view) { > > > b.setBackgroundResource(R.color.red); > > > } > > > > }); > > > > How can i achieve the functionality with out changing the shape of the > > > button > > > Can someone tell me how this functionality can be achieved? --~--~-~--~~~---~--~~ 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: Disable context menu not working ... bug?
Jason Van Anden wrote: > I am setting setEnabled = false for a Context Menu item. > > The item appears grayed out ... but I can still click on it. When I do, > the menu closes. > > This does not seem to like the correct behavior to me. > > Is this a bug or a misunderstood feature? Anyone else experiencing this? I can tell you that I see the same behavior in 1.5 and 1.6. I hadn't tried a disabled context menu item before. I can see arguments either way as to whether it is correct behavior, so I do not know whether it is a bug or not. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! --~--~-~--~~~---~--~~ 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] Disable context menu not working ... bug?
I am setting setEnabled = false for a Context Menu item. The item appears grayed out ... but I can still click on it. When I do, the menu closes. This does not seem to like the correct behavior to me. Is this a bug or a misunderstood feature? Anyone else experiencing this? Using 1.6 Jason --~--~-~--~~~---~--~~ 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] Keyboard, detect ALT Locked
Hello All How to detect when alt is locked? --~--~-~--~~~---~--~~ 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: Activity managed indeterminate ProgressDialog problem
Small things like this drive me crazy. If anyone could hint what I am doing wrong in the code below (full example of the issue described previously in this thread), I would be very grateful. Thank you, -szabolcs import android.app.Activity; import android.app.Dialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.os.AsyncTask; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class AsyncTaskTest extends Activity { static final int DLG_PROGRESS = 0; static String strDlgProgressMessage = ""; DaTask mTask = null; Button mBtnRunTask = null; // SET THE BOOLEAN BELOW TO CHANGE BEHAVIOR static final boolean USE_DLG_REMOVE_INSTEAD_OF_DISMISS = false; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mBtnRunTask = new Button(AsyncTaskTest.this); mBtnRunTask.setText("Run Task"); mBtnRunTask.setOnClickListener(new OnClickListener() { @Override public void onClick(View btn) { btn.setEnabled(false); mTask = new DaTask(); mTask.execute(new Integer(121)); } }); setContentView(mBtnRunTask); } @Override public Dialog onCreateDialog(int idDlg) { Dialog dlg = null; switch (idDlg) { case DLG_PROGRESS: ProgressDialog pDlg = new ProgressDialog(AsyncTaskTest.this); pDlg.setProgressStyle(ProgressDialog.STYLE_SPINNER); pDlg.setCancelable(true); pDlg.setOnCancelListener( new OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { if (mTask != null && mTask.getStatus() != AsyncTask.Status.FINISHED) { mTask.cancel(true); } } } ); dlg = pDlg; break; } return dlg; } @Override public void onPrepareDialog(int idDlg, Dialog dlg) { switch (idDlg) { case DLG_PROGRESS: ((ProgressDialog)dlg).setMessage(strDlgProgressMessage); break; } } public class DaTask extends AsyncTask { @Override protected Double doInBackground(Integer... aNum) { Double result = 0.0; for (int i=0; i<10; i++) { if (isCancelled()) break; result = Math.sqrt(aNum[0]); } return result; } @Override public void onPreExecute() { AsyncTaskTest.strDlgProgressMessage = "Running task,\nplease wait.."; showDialog(AsyncTaskTest.DLG_PROGRESS); } @Override public void onPostExecute(Double result) { if (USE_DLG_REMOVE_INSTEAD_OF_DISMISS) removeDialog(AsyncTaskTest.DLG_PROGRESS); else dismissDialog(AsyncTaskTest.DLG_PROGRESS); mBtnRunTask.setEnabled(true); } @Override public void onCancelled() { if (USE_DLG_REMOVE_INSTEAD_OF_DISMISS) removeDialog(AsyncTaskTest.DLG_PROGRESS); else dismissDialog(AsyncTaskTest.DLG_PROGRESS); mBtnRunTask.setEnabled(true); } } } --~--~-~--~~~---~--~~ 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: Gridview padding? or imageview?
At the end it was the listSelector property on the GridView that was producing the padding. For future reference. On Oct 16, 8:05 pm, Ivan wrote: > I think I tried everything on the attributes and can't find where that > padding is coming from. > > Any ideas? > > On Oct 15, 10:15 pm, Ivan wrote: > > > > > Hi, I'm doing the HelloViews Gridview tutorial and I ran into this > > problem. > > >http://grab.by/9Vn > > > I have a padding that I can't find where is it coming from. > > > XML is the following: > > > > http://schemas.android.com/apk/res/android"; > > android:id="@+id/gridview" > > android:layout_width="fill_parent" > > android:layout_height="fill_parent" > > android:numColumns="2" > > android:verticalSpacing="0px" > > android:horizontalSpacing="0px" > > android:stretchMode="columnWidth" > > android:gravity="center" > > android:layout_margin="0dp" > > /> > > > and in my adapter: > > > public View getView(int position, View convertView, ViewGroup > > parent) { > > ImageView imageView; > > if (convertView == null) { // if it's not recycled, > > initialize some attributes > > imageView = new ImageView(mContext); > > imageView.setLayoutParams(new GridView.LayoutParams(160, > > 160)); > > imageView.setPadding(0,0,0,0); > > imageView.setScaleType(ImageView.ScaleType.FIT_CENTER); > > > } else { > > imageView = (ImageView) convertView; > > } > > > imageView.setImageResource(mThumbIds[position]); > > return imageView; > > } > > > I can't seem to find the place where I can get rid of that padding (or > > margin). Pictures are 160px x 160px. > > > 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: Problem: set projection matrix in GLSurfaceview.onDrawFrame
I feel like your numbers aren't right. If you want a sixteenth-screen sized view (which it seems you do) in the upper right corner, Here's my initial thought: int left = surfaceWidth * .75f; int bottom = surfaceHeight * .75f; int width = surfaceWidth * .25f; int height = surfaceHeight * .25f; gl.glViewport(left, bottom, width, height); gl.glOrthof(0, width, height, 0, nearZ, farZ); That should give you an orthographic view with a coordinate system starting at 0,0 in the upper left, going to the width/height defined in the lower right, like conventional 2D coordinate systems. On a 480x320 landscape, it would be (0,0) to (120,80). If you want 0,0 in the lower left, you just need to switch around the arguments for glOrtho. I haven't tested this but I'm fairly certain this will work. Now, about your models not displaying smaller. They won't. An orthographic projection will display models with no perspective at all. It does not scale. With this, you'll just see them through a smaller viewport, but they'll be the same size. Scaling is easy, though. When you start your draw, just glScalef() after gluLookAt to the desired size. On Oct 16, 10:17 pm, Gameboy wrote: > When I try to set projection matrix in GLSurfaceview.onDrawFrame, but > seems it does not work fine. The parameters of glOrthof does not > change size and shape of graphics elements, graph becomes very small. > > Part of code as below, does anybody know the reason? > > // Display something in second viewport at top-right of screen with > different projection mode > gl.glViewport(mWidth*3/4, mHeight*3/4, mWidth/4, mHeight/4); > gl.glMatrixMode(GL10.GL_PROJECTION); > gl.glPushMatrix() ; > gl.glLoadIdentity(); > gl.glOrthof(-mWidth/mHeight/3, mWidth/mHeight/3, -1/3f, 1/3f, 0.8f, > 2); > // gl draws something here > gl.glPopMatrix() ; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] ARCHOS 5 Android tablet and ANDROID_ID
Somebody on this list asked a bit ago about whether the ARCHOS 5 Android Internet Table supports the ANDROID_ID secure setting. The answer is yes...but it's not a hex value, which is what the docs say is required. So, as long as you just care about it being a relatively short string (and not-null), you should be OK. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.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: Google wave invitations...?
If there are any left, I would like one too! Thanks. On Oct 15, 10:41 pm, Kenneth Adam Miller wrote: > Who wants to be in Google wave? > I have 16 invitations --~--~-~--~~~---~--~~ 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: Logging in Android
See this thread: http://groups.google.com/group/android-developers/browse_thread/thread/f88b3556d150e1bd/b9747b4cc78565f1#b9747b4cc78565f1 Specifically the responses by Dianne Hackborn -- RichardC On Oct 17, 7:50 pm, jotobjects wrote: > On Oct 17, 7:03 am, Christine wrote: > > > On Oct 16, 12:51 am, jotobjects wrote: > > > > This is still a little unclear to me. AFAIK this is a recommendation > > > to strip out debug logging - logging is not automatically stripped? > > > Read a message before you reply. Yusuf just said that debug logging is > > stripped at compile time. > > Hi Christine - thanks for that pointed advice. Actually I did read > the message and my experience is that debugging is not stripped at > compile time. That was the reason for my confusion. Yusuf just > quoted the documentation which I have read and reread and tested, So > I'm posting the question because evidently I'm not getting something > about how android.util.Log is supposed to work. --~--~-~--~~~---~--~~ 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: Logging in Android
On Oct 17, 7:03 am, Christine wrote: > On Oct 16, 12:51 am, jotobjects wrote: > > > This is still a little unclear to me. AFAIK this is a recommendation > > to strip out debug logging - logging is not automatically stripped? > > Read a message before you reply. Yusuf just said that debug logging is > stripped at compile time. Hi Christine - thanks for that pointed advice. Actually I did read the message and my experience is that debugging is not stripped at compile time. That was the reason for my confusion. Yusuf just quoted the documentation which I have read and reread and tested, So I'm posting the question because evidently I'm not getting something about how android.util.Log is supposed to work. --~--~-~--~~~---~--~~ 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] Uninstalling TTS Data from the G1 / Dream
As per subject I would like to uninstall the text to speech data app from my G1 so I can set out some TTS code I'm working on. Is it possible? 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] Text wrapping around image
Hi, I know this has been brought up before, but I couldn't find a solution yet. I'd like to get the similar layout on an Activity as this html fragment in a browser, basically making text wrapping around an image: bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla I tried the following but no luck yet: - None of the current layouts supports this. - a TextView and using Html.fromHTML, but that doesn't seem to understand the "align" attribute -- No matter what "align" equals to, it just places the image in the same line of the first line of text, and never aligns multiple lines of text along side the image. Styles don't work either. - I looked up the doc of ImageSpan, but its verticalAlignment only supports "bottom" and "baseline". Should I use "baseline"? I tried it but seems no effect, maybe I'm missing something? - A hack: using two TextView, one to the right of the image, and another below the image, and set the maxLines of the first TextView to be approximately the height of the image. But the problem is I couldn't get the *last visible character* for the text. I don't want to use WebView since it seems to be too much overhead for such a simple view. 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: Google wave invitations...?
I would want an invitation too...thanks On Oct 16, 11:41 am, Kenneth Adam Miller wrote: > Who wants to be in Google wave? > I have 16 invitations --~--~-~--~~~---~--~~ 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: Google wave invitations...?
anymore invitation, Thanks On Oct 16, 7:32 am, budziq wrote: > Well. Who wouldn't want one ;)? I guess I'd like one too ;) > > On Oct 16, 4:02 pm, Carl Whalley wrote: > > > > > I'd love an invite too ... anyone ... thanks! > > > On Oct 16, 2:26 pm, Gavin Aiken wrote: > > > > Takes at least 24 hours in my experience :) have fun waving! > > > On Fri, Oct 16, 2009 at 2:09 PM, Kenneth Adam Miller < > > > > kennethadammil...@gmail.com> wrote: > > > > Have any of you gotten an email yet? > > > > I swear I've sent them out... > > > > perhaps they're just nominations for a possible invite to google wave > > > > and > > > > not you know actual concrete invitations > > > > I don't know, but I'm guessing that you guys would still want it. > > > > Hahah > > > > > :) > > > > I'm in class right now, but I'll review all you guys > > > > > On Fri, Oct 16, 2009 at 7:40 AM, GSC wrote: > > > > >> If anyone else has an available invitiation, please send me one. > > > > >> Thanks > > > > >> On Oct 16, 7:31 am, ColletJb wrote: > > > >> > I think there are no invitation left from Kenneth Adam Miller. > > > > >> > But if anyone invited by him has invitation and can invite me, It > > > >> > would be great ;) --~--~-~--~~~---~--~~ 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: Logging in Android
On Sat, Oct 17, 2009 at 7:03 AM, Christine wrote: > > On Oct 16, 12:51 am, jotobjects wrote: >> This is still a little unclear to me. AFAIK this is a recommendation >> to strip out debug logging - logging is not automatically stripped? > > Read a message before you reply. Yusuf just said that debug logging is > stripped at compile time. No, that's not what he said. --~--~-~--~~~---~--~~ 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: Logging in Android
Logging isn't compiled out automatically in my experience. I can add verbose and debug level logging statements like these: Log.v(LOG_TAG, "Verbose test."); Log.d(LOG_TAG, "Debug test."); and the output of both show up in "adb logcat" even if I have debugging off in the application's manifest and am running an APK signed with a non-debug signing key. This is using the 1.6 SDK and testing on a T-Mobile G1 running the OTA 1.6 firmware. The equivalent Log.isLoggable calls: Log.isLoggable(LOG_TAG, Log.VERBOSE) Log.isLoggable(LOG_TAG, Log.DEBUG) both return false at the same time. So apparently the Log.v and Log.d methods don't even check isLoggable for you at runtime. Looks like appropriate if statements must be manually added in front of the log calls if you actually want them compiled out or not used at runtime for the time being. On Oct 15, 6:51 pm, jotobjects wrote: > This is still a little unclear to me. AFAIK this is a recommendation > to strip out debug logging - logging is not automatically stripped? > > Is there a mechanism for setting the log level as with Log4J and > java.util.logging and commons logging? I haven't been able to get the > Log.isLoggable() method to do anything useful. It returns true for > INFO and false for DEBUG even when I use adb shell setprop as > instructed. > > On Oct 15, 2:49 pm, "Yusuf Saib (T-Mobile USA)" > Mobile.com> wrote: > > Fromhttp://developer.android.com/reference/android/util/Log.html#d(java.l... > > > "Verbose should never be compiled into an application except during > > development. Debug logs are compiled in but stripped at runtime. > > Error, warning and info logs are always kept." > > > Yusuf Saib > > Android > > ·T· · ·Mobile· stick together > > The views, opinions and statements in this email are those of the > > author solely in their individual capacity, and do not necessarily > > represent those of T-Mobile USA, Inc. > > > On Oct 15, 1:01 pm, vj wrote: > > > > I understand it is meant for filtering out "logcat" messages, but on > > > what > > > basis would a developer know when to use which type of API ? > > > > On Oct 15, 2:50 pm, vj wrote: > > > > > What is the significance of having different "priority" levels in the > > > > Log API ? I am referring to .e(), .d() etc. Also, considering the fact > > > > that all the priorities are going to be logged in any case, on what > > > > basis would a developer know when to use which type of 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] kml in listview
I have to see the posts contained in a kml in a listview how does google maps help (by opening the browser) --~--~-~--~~~---~--~~ 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: Logging in Android
On Oct 16, 12:51 am, jotobjects wrote: > This is still a little unclear to me. AFAIK this is a recommendation > to strip out debug logging - logging is not automatically stripped? Read a message before you reply. Yusuf just said that debug logging is stripped at compile time. > Is there a mechanism for setting the log level as with Log4J and > java.util.logging and commons logging? You can use java.util.logging. It's in the Android API. Christine I haven't been able to get the > Log.isLoggable() method to do anything useful. It returns true for > INFO and false for DEBUG even when I use adb shell setprop as > instructed. > > On Oct 15, 2:49 pm, "Yusuf Saib (T-Mobile USA)" > Mobile.com> wrote: > > Fromhttp://developer.android.com/reference/android/util/Log.html#d(java.l... > > > "Verbose should never be compiled into an application except during > > development. Debug logs are compiled in but stripped at runtime. > > Error, warning and info logs are always kept." > > > Yusuf Saib > > Android > > ·T· · ·Mobile· stick together > > The views, opinions and statements in this email are those of the > > author solely in their individual capacity, and do not necessarily > > represent those of T-Mobile USA, Inc. > > > On Oct 15, 1:01 pm, vj wrote: > > > > I understand it is meant for filtering out "logcat" messages, but on > > > what > > > basis would a developer know when to use which type of API ? > > > > On Oct 15, 2:50 pm, vj wrote: > > > > > What is the significance of having different "priority" levels in the > > > > Log API ? I am referring to .e(), .d() etc. Also, considering the fact > > > > that all the priorities are going to be logged in any case, on what > > > > basis would a developer know when to use which type of 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] Image transparency
Anyone know if you can make part (i.e. a section which you could measure in pixels) of an image transparent? What graphics features would I need to look at? --~--~-~--~~~---~--~~ 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: Google wave invitations...?
PLease can you invite me ... 2009/10/17 xianhao lv > I want one. Thank you very much. I always look for an invitation. > > 2009/10/16 Kenneth Adam Miller > > Who wants to be in Google wave? >> I have 16 invitations >> >> >> > > > > --~--~-~--~~~---~--~~ 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 disable screen orientation change in code?
Hello, how can the screen orientation change be disabled in code? I must force portrait/landscape orientation, but can't use android:screenOrientation="landscape" in the manifest because of issue 3324 - http://code.google.com/p/android/issues/detail?id=3324 Do you have any ideas? Thank in advance, Mike. --~--~-~--~~~---~--~~ 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] SQLite Blob ?
Hello, Does anyone know if there is a good article/book/something else about BLOBs using in Android SQLite ? I read in one thread that it is not a very good idea but i could not figure out why that is. Any information would be helpful. 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] Re: Google wave invitations...?
I want one. Thank you very much. I always look for an invitation. 2009/10/16 Kenneth Adam Miller > Who wants to be in Google wave? > I have 16 invitations > > > > --~--~-~--~~~---~--~~ 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: Flushing RAM of android device
I want to run some benchmark tests. For that I have to make sure that files are read from the file system not from the RAM. Repeating the test by rebooting the device may be quite annoying... So there is no way ? --~--~-~--~~~---~--~~ 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: Location.getLastKnownLocation returns null
Now it works fine. I Was just doing the requestLocationUpdates after the getting location. as you said, we first need to turn on the GPS radio . 2009/10/17 Mark Murphy > > Auguste Lunang wrote: > > I can't display my map on android emulator. > > i have, > > locationManager = (LocationManager) > > getSystemService(Context.LOCATION_SERVICE); > > location = locationManager.getLastKnownLocation("gps"); > > > > After those lines,the Log shows null for location instead of the object > > location > > You need to do something, such as requestLocationUpdates(), to turn on > the GPS radio. And, unless something else has had the GPS radio on, you > will still not have a location until GPS has obtained a fix, which may > take several seconds, or tens of seconds. In the case of the emulator, > you will not have a fix until you use DDMS to supply a fix, after the > GPS radio is "on". > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://twitter.com/commonsguy > > Android Development Wiki: http://wiki.andmob.org > > > > --~--~-~--~~~---~--~~ 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: Location.getLastKnownLocation returns null
Auguste Lunang wrote: > I can't display my map on android emulator. > i have, > locationManager = (LocationManager) > getSystemService(Context.LOCATION_SERVICE); > location = locationManager.getLastKnownLocation("gps"); > > After those lines,the Log shows null for location instead of the object > location You need to do something, such as requestLocationUpdates(), to turn on the GPS radio. And, unless something else has had the GPS radio on, you will still not have a location until GPS has obtained a fix, which may take several seconds, or tens of seconds. In the case of the emulator, you will not have a fix until you use DDMS to supply a fix, after the GPS radio is "on". -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org --~--~-~--~~~---~--~~ 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: Location.getLastKnownLocation returns null
u cannot get gps signals in an emulator u need to give gps inputs from ddms if u wanna get some gps signals in ur program wen u run it from the emulator Regards, Saurav Mukherjee. On Sat, Oct 17, 2009 at 5:31 PM, Auguste Lunang wrote: > Hi, > I can't display my map on android emulator. > i have, > locationManager = (LocationManager) > getSystemService(Context.LOCATION_SERVICE); > location = locationManager.getLastKnownLocation("gps"); > > After those lines,the Log shows null for location instead of the object > location > > How can i fix that? > Thx > Auguste > > > > > > > --~--~-~--~~~---~--~~ 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] Location.getLastKnownLocation returns null
Hi, I can't display my map on android emulator. i have, locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); location = locationManager.getLastKnownLocation("gps"); After those lines,the Log shows null for location instead of the object location How can i fix that? Thx Auguste --~--~-~--~~~---~--~~ 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: Google wave invitations...?
I know you're out, but if anyone gets an invitation, or a batch of em, I would like in on this. Thanks `Michael ecogeek at gmail dot com On Oct 15, 10:41 pm, Kenneth Adam Miller wrote: > Who wants to be in Google wave? > I have 16 invitations --~--~-~--~~~---~--~~ 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: IP broadcast on emulator
Bump On Oct 15, 3:12 pm, Anders wrote: > Hi, > > I have an application that acts as both client and server. I have a > scenario that I need to test that involves three devices. One of them > needs tobroadcasta message (UDP) to the other two. > Running on physical devices, this is not a problem, and it works fine. > On the emulator however, this is much harder. > I have managed to get it work for two devices using the emulator. Here > my client threadbroadcastthe message to 10.0.2.255 port 6002, and > server thread listens on port 6006. By using redir add udp:6002:6006 > the server receives the message fine. > Now, if I add another instance and do the same portforwarding, only > one of them receives the message. I also tried to use a different port > number on the server, and forward port 6002 to that number, with the > same result. > It appears as if a port can only be forwarded from one instance. > Does anyone of a method tobroadcastusing the emulator, without > sending a separate message to each emulator instance? > > Thanks,Anders --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---