[android-developers] Re: Is it safe to share a View among several layouts?
The most likely reason for it to be slow is that it is a huge image you are loading. You could also try making it a PNG -- since pretty much all of the UI is PNG images, those are loaded into each app as they start, so the performance of that is clearly acceptable -- though as far as I know JPEG loading is quite reasonable as well. As for it taking less time the second time, well the resource is already loaded from the first time so it won't load it again. On Apr 3, 6:53 pm, Anil [EMAIL PROTECTED] wrote: Any way to speed it up? for example if there is a way that the image can be read in and stored in an image/icon class and if buttons can share that image/icon. Also do you have any idea why it is quicker on subsequent adds? On Apr 3, 8:29 pm, Romain Guy [EMAIL PROTECTED] wrote: It looks like its setImageResource() which is taking a lot of time. On Thu, Apr 3, 2008 at 6:28 PM, Anil [EMAIL PROTECTED] wrote: When user clicks a button, these 3 lines are executed: button = new ImageButton(context); button .setImageResource(R.drawable.buttonJPG); layout.addView(button, new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); I observe that during the first add, it takes about 3.5 seconds. Subsequent adds are much quicker at about 0.5 sec. On actual devices, it will be many times slower. thanks, Anil On Apr 3, 6:29 pm, Romain Guy [EMAIL PROTECTED] wrote: I highly doubt this number since during a scroll, ListView basically adds and removes Views all the time. It certainly doesn't take 3 seconds. There must be a bottleneck somewhere in your application. On Thu, Apr 3, 2008 at 2:50 PM, Anil [EMAIL PROTECTED] wrote: I have to say this - adding a button dynamically to a layout is *extremely* slow. It takes about 3 seconds for the button to be added! On Apr 3, 3:40 pm, Romain Guy [EMAIL PROTECTED] wrote: Hi, You cannot do this. If you try to put the same View in different layouts, an exception will be thrown anyway. On Thu, Apr 3, 2008 at 1:34 PM, Anil [EMAIL PROTECTED] wrote: I need to use the same buttons in several list items - each of which is a nested layout. Instead of creating a new button each time, to save time and space, I am going to reuse the same button, adding it to each layout. Of course, each OnClickListener will have to figure out which list item was clicked. Are there any unintended or harmful side effects to this? thanks, Anil -- Romain Guywww.curious-creature.org -- Romain Guywww.curious-creature.org -- Romain Guywww.curious-creature.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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: canvas.scale and text size bug
Using scale(0.5f, 0.5f) just means that the text will be drawn at half its size, not that it will be drawn to fit in a rectangle that is half the size of the screen. It depends on the length of the text you are drawing, the font size and the type face you are using. On Thu, Apr 3, 2008 at 11:41 PM, freeanderson [EMAIL PROTECTED] wrote: hello, i'm using bitmap object to draw text like below step. first, i use the bitmapCanvas.scale(sx, sy); second, text strings are drawn on the bitmap object. third, i draw the bitmap object to the real canvas by using canvas.drawBitmap(..). but sometimes text size is not fit to area when i change zoom in/out value. for example, now the screen size is 320x400 and i use bitmapCanvas.scale(0.5f, 0.5f); and if i draw text (ex: canvas.draw(i);) then the text has to be drawn in rect of 160x200 however it's drawn over the 160px. it's unstable by zoom value and it depends on current typeface. will this android bug be fixed? Thank you. andy -- Romain Guy www.curious-creature.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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Getting the state of a checkbox inside of a listview
It is actually not very difficult to implement a list of checkboxes. The key is to write a custom Adapter that keeps track of the selected items (using a SparseBooleanArray for instance.) I wrote such an adapter as an ApiDemo recently, I'll try to find the code and paste it here. Note that the next version of the SDK will provide an option for ListView to automatically behave as a list of check boxes without any work from your part (it's actually more powerful since it lets you check an arbitrary view, like an ImageView, a WebView, etc.) -- Romain Guy www.curious-creature.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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to set rich text in TextView?
It also supports u/u, but I don't think there's any way to set a color only for specific words in the string without implementing your own TextView. Either that or string together multiple textviews with appropriate colors, but that probably isn't the best idea. On Apr 4, 12:35 am, Evan JIANG [EMAIL PROTECTED] wrote: On Fri, Apr 4, 2008 at 3:34 PM, Evan JIANG [EMAIL PROTECTED] wrote: Hi all, I find that TextView not support plain text. In APIDemos, there's Sorry, should be I find that TextView not only support plain text. a sample to set a text with b/b , i/i tags in TextView. But does TextView only support these two tags? Is it possible to set different font backgroud color in a TextView? My goal is to highlight words in a string. Best regards, Evan JIANG --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem using XMPP demo in latest SDK emulator m5 rc 14
Hi Juan, Start the second instance and run the command adb -d 2 install ANDROID_SDK_PATH/samples/ApiDemos/bin/ApiDemos.apk Note that you only need the -d 2 argument if you start the first emulator first. Regards, Marcos Hack. On Mar 25, 7:50 pm, jtaylor [EMAIL PROTECTED] wrote: How do I get the APIDemos on the other emulator? - Juan On Mar 25, 6:28 pm, jtaylor [EMAIL PROTECTED] wrote: Sorry, I posted from another thread and my response ended up on this thread. I don't have APIDemos running on the second instance. - Juan On Mar 25, 6:14 pm, jtaylor [EMAIL PROTECTED] wrote: Hello Megha, That doesn't work for me. The only thing I can think of is addition to the buddy list. I created 2 gmail accounts. I put them into the separate emulator instances. I put the second account (aligned with the second emulator) into the first account by way of putting the email address into the email field of one of the Contacts. I even saved this contact as a favorite. Both emulator instances have a check mark for XMPP in the menu. I go to the first emulator instance and go to the sample app. I put in the email attached to the other emulator instance (same one as in contacts in this instance) and press enter as the button is enabled. Alas, nothing happens on the other emulator. - Juan On Feb 19, 9:33 pm, Megha Joshi [EMAIL PROTECTED] wrote: Hi, Please follow the steps below to send a message using GTalkDataMessageReceiver demo : 1) Start two emulator instances. 2) In Eclipse DDMS perspective Devices , check that both the emulator devices are online. 3) Sign into the Dev ToolsDevelopment Settings XMPP Settings of the first emulator with your gmail id (say [EMAIL PROTECTED]). 4) Sign into the second emulator with a second separate gmail id (say [EMAIL PROTECTED]) ([EMAIL PROTECTED] should be in [EMAIL PROTECTED]'s buddy list). 5) In the first emulator go to ApiDemosAppsServiceGTalk Data Message Sender and type in [EMAIL PROTECTED] 6) A message window appears in the second emulator as it receives message from step 4 above. Let us know if you face any issues. Thanks, Megha On Feb 18, 2008 6:36 AM, Nitin [EMAIL PROTECTED] wrote: Hi , I am unable to get the GTalkDataMessageReceiver and GTalkDataMessageSender demo working in lates SDK release!! If anybody has been able to get that working please reply!! Before testing these demo applications I have already successfully registered my gmail account in the XMPP settings.I am trying to send the message to my own gmail id. It gives this error: sendDataMessage: can't find the full JID for [EMAIL PROTECTED], failed to send message! If you have been able to successfully execute these demos please list the steps to do so!! Thanks in Advance!! -nitin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to set rich text in TextView?
I believe it is possible to do this by using a Spannable and BackgroundColorSpan. You can take a look at the documentation for SpannableStringBuilder if you want more information. On Fri, Apr 4, 2008 at 1:04 AM, Dan U. [EMAIL PROTECTED] wrote: It also supports u/u, but I don't think there's any way to set a color only for specific words in the string without implementing your own TextView. Either that or string together multiple textviews with appropriate colors, but that probably isn't the best idea. On Apr 4, 12:35 am, Evan JIANG [EMAIL PROTECTED] wrote: On Fri, Apr 4, 2008 at 3:34 PM, Evan JIANG [EMAIL PROTECTED] wrote: Hi all, I find that TextView not support plain text. In APIDemos, there's Sorry, should be I find that TextView not only support plain text. a sample to set a text with b/b , i/i tags in TextView. But does TextView only support these two tags? Is it possible to set different font backgroud color in a TextView? My goal is to highlight words in a string. Best regards, Evan JIANG -- Romain Guy www.curious-creature.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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Resuming not visible activities using intents
Hi all, Is it possible to resume a background activity using an intent? When I register a notification in the status bar and clicked on it an Activity is fired, but it's always a new one... I would need a way to reuse one in background already on the stack. Please help. Thanks a lot. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Getting the state of a checkbox inside of a listview
here is the demo code what you want. http://code.google.com/p/sharepath just checkout the source code, the checkable list in choosebuddy.java. On 4月4日, 上午10时57分, SnowDrifter [EMAIL PROTECTED] wrote: I have a ListView that contains a list of checkbox and text pairs. I am having trouble figuring out how to access the data in the checkbox or get an onclick from the checkbox since there are n of them and I can't exactly give each one an ID. This has been posted before but nobody had a solution:http://groups.google.com/group/android-developers/browse_thread/threa... I was hoping there was a fix for this in M5. Anybody know? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Resuming not visible activities using intents
Use service instead of activity:) On 4月4日, 下午4时16分, Semeria Stefano [EMAIL PROTECTED] wrote: Hi all, Is it possible to resume a background activity using an intent? When I register a notification in the status bar and clicked on it an Activity is fired, but it's always a new one... I would need a way to reuse one in background already on the stack. Please help. Thanks a lot. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Resuming not visible activities using intents
Well, I'll probably need to explain better my use case. I am working on a instant messaging application. I would like to support multiple conversation. For handling each ongoing conversation I use different instances of the same activity (let's call it ChatActivity). I have a background thread in a service that receives and sends messages. Any time a message is received I add a persistent notification in the status bar. The user should be able to switch between different conversation by selecting the notification that is bound to that conversation. When he does so, I would like a new activity to be started (if a new conversation takes place) or a background activity is taken into the foreground. The problem is that when the notification is clicked I am currently firing an Intent with ACTION_VIEW as an action and a new instance of my chat activity is launched every time (so I am not able to resume old conversations)... I guess services are not useful to solve my problem... Have you got any suggestion? Thanks a lot Stefano -Original Message- From: android-developers@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of xingye Sent: venerdì 4 aprile 2008 10.22 To: Android Developers Subject: [android-developers] Re: Resuming not visible activities using intents Use service instead of activity:) On 4月4日, 下午4时16分, Semeria Stefano [EMAIL PROTECTED] wrote: Hi all, Is it possible to resume a background activity using an intent? When I register a notification in the status bar and clicked on it an Activity is fired, but it's always a new one... I would need a way to reuse one in background already on the stack. Please help. Thanks a lot. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Resuming not visible activities using intents
here is my way, just a suggestion:) 1. if the activity is not in active, start it and show the unread messages; 2. if the activity in front, hook the database changes, just show a message in the activity not the state bar. 3. switch the char window(with deffrient buddy) by popup menu(a dialog) or system menu or tabset in one activity not many activity On 4月4日, 下午4时32分, Semeria Stefano [EMAIL PROTECTED] wrote: Well, I'll probably need to explain better my use case. I am working on a instant messaging application. I would like to support multiple conversation. For handling each ongoing conversation I use different instances of the same activity (let's call it ChatActivity). I have a background thread in a service that receives and sends messages. Any time a message is received I add a persistent notification in the status bar. The user should be able to switch between different conversation by selecting the notification that is bound to that conversation. When he does so, I would like a new activity to be started (if a new conversation takes place) or a background activity is taken into the foreground. The problem is that when the notification is clicked I am currently firing an Intent with ACTION_VIEW as an action and a new instance of my chat activity is launched every time (so I am not able to resume old conversations)... I guess services are not useful to solve my problem... Have you got any suggestion? Thanks a lot Stefano -Original Message- From: android-developers@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of xingye Sent: venerdì 4 aprile 2008 10.22 To: Android Developers Subject: [android-developers] Re: Resuming not visible activities using intents Use service instead of activity:) On 4月4日, 下午4时16分, Semeria Stefano [EMAIL PROTECTED] wrote: Hi all, Is it possible to resume a background activity using an intent? When I register a notification in the status bar and clicked on it an Activity is fired, but it's always a new one... I would need a way to reuse one in background already on the stack. Please help. Thanks a lot.- 隐藏被引用文字 - - 显示引用的文字 - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to set rich text in TextView?
Thank you for your reply. Is there any examples to show how to use SpannableString. In the method like SpannableStringBuilder.setSpan(Object what, int start, int end, int flags) , I've no idea what type of Object of the parameter what is needed. Best regards, Evan JIANG On Fri, Apr 4, 2008 at 4:12 PM, Romain Guy [EMAIL PROTECTED] wrote: I believe it is possible to do this by using a Spannable and BackgroundColorSpan. You can take a look at the documentation for SpannableStringBuilder if you want more information. On Fri, Apr 4, 2008 at 1:04 AM, Dan U. [EMAIL PROTECTED] wrote: It also supports u/u, but I don't think there's any way to set a color only for specific words in the string without implementing your own TextView. Either that or string together multiple textviews with appropriate colors, but that probably isn't the best idea. On Apr 4, 12:35 am, Evan JIANG [EMAIL PROTECTED] wrote: On Fri, Apr 4, 2008 at 3:34 PM, Evan JIANG [EMAIL PROTECTED] wrote: Hi all, I find that TextView not support plain text. In APIDemos, there's Sorry, should be I find that TextView not only support plain text. a sample to set a text with b/b , i/i tags in TextView. But does TextView only support these two tags? Is it possible to set different font backgroud color in a TextView? My goal is to highlight words in a string. Best regards, Evan JIANG -- Romain Guy www.curious-creature.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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android clip
This code works for me but it also stops after maybe 20 to 30 seconds. Please fix the media player! It's frustrating to use when half of the features are non-functional! - Jesse --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Is it safe to share a View among several layouts?
When I print out the before/after times around the 3 statements, it takes 1 second. Log.v(TAG, new java.util.Date().toString()); VERBOSE/BEFORE(768): Fri Apr 04 12:35:23 GMT 2008 VERBOSE/AFTER(768): Fri Apr 04 12:35:24 GMT 2008 However it takes 3.5 seconds to see the button in the layout. So the delay is mainly in displaying it. Calling layout.invalidate() didn't make a difference. No, it is a small image: 863 bytes The second time, I have already removed it from the layout, and am calling getImageResource again, so I am surprised it is much quicker. thanks, Anil On Apr 4, 1:33 am, hackbod [EMAIL PROTECTED] wrote: The most likely reason for it to be slow is that it is a huge image you are loading. You could also try making it a PNG -- since pretty much all of the UI is PNG images, those are loaded into each app as they start, so the performance of that is clearly acceptable -- though as far as I know JPEG loading is quite reasonable as well. As for it taking less time the second time, well the resource is already loaded from the first time so it won't load it again. On Apr 3, 6:53 pm, Anil [EMAIL PROTECTED] wrote: Any way to speed it up? for example if there is a way that the image can be read in and stored in an image/icon class and if buttons can share that image/icon. Also do you have any idea why it is quicker on subsequent adds? On Apr 3, 8:29 pm, Romain Guy [EMAIL PROTECTED] wrote: It looks like its setImageResource() which is taking a lot of time. On Thu, Apr 3, 2008 at 6:28 PM, Anil [EMAIL PROTECTED] wrote: When user clicks a button, these 3 lines are executed: button = new ImageButton(context); button .setImageResource(R.drawable.buttonJPG); layout.addView(button, new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); I observe that during the first add, it takes about 3.5 seconds. Subsequent adds are much quicker at about 0.5 sec. On actual devices, it will be many times slower. thanks, Anil On Apr 3, 6:29 pm, Romain Guy [EMAIL PROTECTED] wrote: I highly doubt this number since during a scroll, ListView basically adds and removes Views all the time. It certainly doesn't take 3 seconds. There must be a bottleneck somewhere in your application. On Thu, Apr 3, 2008 at 2:50 PM, Anil [EMAIL PROTECTED] wrote: I have to say this - adding a button dynamically to a layout is *extremely* slow. It takes about 3 seconds for the button to be added! On Apr 3, 3:40 pm, Romain Guy [EMAIL PROTECTED] wrote: Hi, You cannot do this. If you try to put the same View in different layouts, an exception will be thrown anyway. On Thu, Apr 3, 2008 at 1:34 PM, Anil [EMAIL PROTECTED] wrote: I need to use the same buttons in several list items - each of which is a nested layout. Instead of creating a new button each time, to save time and space, I am going to reuse the same button, adding it to each layout. Of course, each OnClickListener will have to figure out which list item was clicked. Are there any unintended or harmful side effects to this? thanks, Anil -- Romain Guywww.curious-creature.org -- Romain Guywww.curious-creature.org -- Romain Guywww.curious-creature.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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Strange slow behavior in Emulator and how to recreate it (CameraPreview)
Hi, Using the CameraPreview example and doing some image processing I found a strange slow behavior in the Emulator. I have little experience with java and Android (C/C++ background) so I do not know if it is a true issue of the emulator or some strange memory/thread handling that I am not aware. When the application starts after the emulator starts, the application is very slow (228 ms per frame). If I press the Back button and then press the application icon, The applications is about 4 times faster (64ms per frame). This fast framerate will continue to work and will not go back to the slow behavior. I tried launching the emulator from Eclipse and stand alone. Also in Windows and OSX and the behavior is always the same and happens every time. To recreate the slow behavior I just added a couple of lines (intense CPU usage) to the CameraPreview sample provided by the SDK.The modified run() part is: @Override public void run() { // We first open the CameraDevice and configure it. CameraDevice camera = CameraDevice.open(); if (camera != null) { CameraDevice.CaptureParams param = new CameraDevice.CaptureParams(); param.type = 1; // preview param.srcWidth = 1280; param.srcHeight = 960; param.leftPixel = 0; param.topPixel = 0; param.outputWidth = 320; param.outputHeight = 240; param.dataFormat= 2; // RGB_565 camera.setCaptureParams(param); } // This is our main acquisition thread's loop, we go until // asked to quit. SurfaceHolder holder = mHolder; // === // Added to check strange behavior // === long timeMillis = java.lang.System.currentTimeMillis(); Paint paint = new Paint(); paint.setTextSize(20); paint.setARGB(255, 255, 0, 0); while (!mDone) { // Lock the surface, this returns a Canvas that can // be used to render into. Canvas canvas = holder.lockCanvas(); // Capture directly into the Surface if (camera != null) { camera.capture(canvas); // === // Added to check strange behavior // === int b=3; for(int i=0; i10; i++) b=b+1; long timeNew = java.lang.System.currentTimeMillis(); canvas.drawText(ms= + (timeNew - timeMillis), 10, 20, paint); timeMillis = timeNew; } // And finally unlock and post the surface. holder.unlockCanvasAndPost(canvas); } // Make sure to release the CameraDevice if (camera != null) camera.close(); } Can someone test it and see if the results are the same? Any ideas? Thanks Franco --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Aver the air download and install application
I think http://groups.google.com/group/android-developers/browse_thread/thread/d6fddac0a408e59f/0159a8a2759e7280?lnk=gstq=apk+browser#0159a8a2759e7280 is about the only place I've seen mention of doing this. Sounds like it's not possible with the browser, or at least not yet. On Apr 4, 6:25 am, BMT [EMAIL PROTECTED] wrote: Dear developers: I must have missed something obvious: I am developing an application that is required to be downloaded and installed on a pristine Android phone. When I try to download the .apk file by itself the browser tries to display it, and when I send it as a .zip file it turns out as a unsuported content type. What is the preferred method for application download? Is there a specific MIME type the application server should give? /BMT --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] importing java 6 libs
Hi I need to import some javax packages comes with Java6. I added required jre in eclipse project and successfully imported several javax pkgs. But in runtime I'm getting class not found error,... is there any other way to link jre 6 libs with android? Please help.. Thanks in advance. Lahiru. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Image not correctly viewed
Hello at all, i'm developing on Android since the last month and I've encountered this problem in these days. If I download an image from Internet with this code isn't correctly viewed: package org.ti.weather; import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.net.URLConnection; import android.app.Activity; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.widget.ImageView; public class Weather extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); ImageView img = (ImageView) findViewById(R.id.weatherimg); // this don't function try { URL aURL = new URL( http://vdt.meteo.alice.it/meteo/imgs/icone/small/previsioni/notte/sereno.png ); URLConnection conn = aURL.openConnection(); conn.connect(); InputStream is = conn.getInputStream(); BufferedInputStream bis = new BufferedInputStream(is); Bitmap bm = BitmapFactory.decodeStream(bis); bis.close(); is.close(); img.setImageBitmap(bm); } catch (IOException e) { // Reset to 'Dunno' on any error showAlert(Error, 0, Can't download image, Ok, false); } } } where the main.xml is the following: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent ImageView android:id=@+id/weatherimg android:layout_width=wrap_content android:layout_height=wrap_content / /LinearLayout Instead, if I insert the same image in the directory res/drawable of the project and I use the following code the image is correctly viewed: public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); ImageView img = (ImageView) findViewById(R.id.weatherimg); //this function img.setImageDrawable(getResources().getDrawable(R.drawable.sereno)); } Have you some suggestion? Thanks Andrea --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: View Parents
thx megat Joshi i´m currently use m5rc15 ,but i solverd the problem. I was triying to assign a static view between 2 activities and when return to main activity show exception. thats occurs because second activity catch the static view an throws the exception when back to main activiy and tries to use that static view. thx again. regards On Apr 3, 8:00 pm, Megha Joshi [EMAIL PROTECTED] wrote: Hi, Please post the following information to debug your issue: 1) SDK version 2) Relevant code 3) logcat output Thanks, Megha On Thu, Apr 3, 2008 at 2:58 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: when i triying to change from a subactivity to main activity then push navigation keys and appear an exception what does mean? parameter must be a descendant of this view --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Image not correctly viewed
// ImageView iv = (ImageView)convertView.findViewById(R.id.image); // iv.setImageResource(R.drawable.badge); // Uri uri = Uri.parse(http://www.yexing.org/image.axd? picture=browse.png); // iv.setImageURI(uri); // Drawable drawable = Drawable.createFromPath(uri.getPath()); // try { // URL url = new URL(http://www.yexing.org/image.axd? picture=browse.png); // InputStream is = url.openStream(); // Drawable drawable = Drawable.createFromStream(is, none); // iv.setImageDrawable(drawable); // } catch(Exception e) { // Log.e(LOG_TAG, load image error! \n + e.toString()); // } On 4月4日, 下午9时55分, Andrea Bernardi [EMAIL PROTECTED] wrote: Hello at all, i'm developing on Android since the last month and I've encountered this problem in these days. If I download an image from Internet with this code isn't correctly viewed: package org.ti.weather; import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.net.URLConnection; import android.app.Activity; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.widget.ImageView; public class Weather extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); ImageView img = (ImageView) findViewById(R.id.weatherimg); // this don't function try { URL aURL = new URL(http://vdt.meteo.alice.it/meteo/imgs/icone/small/previsioni/notte/ser... ); URLConnection conn = aURL.openConnection(); conn.connect(); InputStream is = conn.getInputStream(); BufferedInputStream bis = new BufferedInputStream(is); Bitmap bm = BitmapFactory.decodeStream(bis); bis.close(); is.close(); img.setImageBitmap(bm); } catch (IOException e) { // Reset to 'Dunno' on any error showAlert(Error, 0, Can't download image, Ok, false); } } } where the main.xml is the following: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent ImageView android:id=@+id/weatherimg android:layout_width=wrap_content android:layout_height=wrap_content / /LinearLayout Instead, if I insert the same image in the directory res/drawable of the project and I use the following code the image is correctly viewed: public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); ImageView img = (ImageView) findViewById(R.id.weatherimg); //this function img.setImageDrawable(getResources().getDrawable(R.drawable.sereno)); } Have you some suggestion? Thanks Andrea --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] proxy
Hi, I have set the proxy using the commands adb shell sqlite3 /data/data/com.google.android.providers.settings/databases/ settings.db INSERT INTO system VALUES(99,'http_proxy','192.168.0.88:8118'); sqlite3 /data/data/com.google.android.providers.settings/databases/ settings.db SELECT * FROM system With this emulator browser works fine. However my application is not able to connect. I am using apache commons api. org.apache.commons.httpclient.DefaultHttpMethodRetryHandler; org.apache.commons.httpclient.HttpClient; org.apache.commons.httpclient.HttpStatus; org.apache.commons.httpclient.methods.PostMethod; org.apache.commons.httpclient.params.HttpMethodParams; For these api to work through proxy do I need to have special parameters to let net connection happen!! Pl. help.. Regards, Raja Nagendra Kumar, C.T.O www.tejasoft.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Any one tried uisng mediaplayer example ,I ma unable to play video file from local directory
I can play a video from a local directory just fine. I am using a video podcast intended for the iPhone and I put it in an sdcard image and accessed it at /sdcard/myVideos/TheVideoPodcast.m4v Then use VideoView in your layout XML and set its URI programatically in your activity: VideoView vv = (VideoView) findViewById(R.id.video_playback_screen); vv.setVideoURI(Uri.parse(videoFile)); vv.requestFocus(); Hope that helps. Cheryl On Apr 4, 12:42 am, acopernicus [EMAIL PROTECTED] wrote: I was unable to play the streaming .mp4 file as well. Curiously, the MediaPlayer example doesn't even seem capable of streaming an mp4 file out of the box as the url is sets for the MediaPlayer is just : path = http://;; I updated it to point to my file here: path = http://www.pocketjourney.com/audio.mp4;; Has anyone been able to stream an .mp4 file? It's supposed to be supported but I can't find any proof that this claim is true. Anthony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Adding xmpp users into xmppDataMessageCapable table
Hi, I am trying to add an users into xmppDataMessageCapable table, without success. This is my code: * SQLiteDatabase db; ContentValues values = new ContentValues(); String myResource = Resource ; String myEmail = [EMAIL PROTECTED]; Cursor c; db = SQLiteDatabase.open(/data/data/com.google.android.providers.im/ databases/im.db, null); c = db.query(xmppDataMessageCapable, new String[] { bare_jid}, null, null, null, null, null); // . // some code to test if user exist // ... values.put(bare_jid, myEmail); values.put(resource, myResource ); long jj=db.insert(xmppDataMessageCapable, null, values); db = null; * The db.query() runs without any problems, I got my JID. But when I try to add a new users through db.insert(), I got nothing new into xmppDataMessageCapable table. If I put Log Long.toString(jj), I always get -1. Without errors or warning messages. I have tried with db.execSQL() too. I got the same result. What am I doing wrong? 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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: JAD - Java Application Descriptor like
Raja Nagendra Kumar wrote: [...] Once the application is compiled and packed, is there a way provide external properties to the andorid application. Similar to JAD file in j2me. Yes; you can attach metadata to activities by putting it in your manifest.xml file. You can then read it by looking at ComponentInfo.metaData for the activity. http://code.google.com/android/reference/android/R.styleable.html#AndroidManifestMetaData -- David Given [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How does a user input a text on HVGA portrait mode with no keyboard, in the actual device.
Hi, I am assuming that you are trying to simulate keyevents. You can use the APIs in the instrumentationhttp://code.google.com/android/reference/android/app/Instrumentation.html class, particularly sendkeysync()http://code.google.com/android/reference/android/app/Instrumentation.html#sendKeySync%28android.view.KeyEvent%29method. Check out the sample code for instrumentation class below : http://code.google.com/android/samples/ApiDemos/src/com/google/android/samples/app/ContactsSelectInstrumentation.html Thanks, Megha On Thu, Apr 3, 2008 at 11:57 AM, Agus [EMAIL PROTECTED] wrote: For the actual device, how does a user input a text on HVGA portrait mode with no keyboard? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Why bitmap cache was removed in mc5?
When I loaded images from the web, it was quite useful to use caching of images Could you give me some more background information on this? What APIs did you use that are now not available or what behavior did you see in m3 which is no longer visible? On Thu, Apr 3, 2008 at 1:37 PM, rostik slipetskyy [EMAIL PROTECTED] wrote: When I loaded images from the web, it was quite useful to use caching of images; however, in mc5 this functionality was removed. What was the reason for that? Is there any other way to cache images by means of SDK? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Is ScrollView the only way Scroll the Screen?
Hi All, Is it common to use ScrollView as the parent layout for scrolling on a screen? My screens normally go beyond the view of the screen. Especially when I test using the QVJA emulator skins. Below is example of what most of my layouts for app look like. ?xml version=1.0 encoding=utf-8? ScrollView xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:gravity=center_horizontal android:scrollbars=vertical|horizontal TableLayout android:layout_width=fill_parent android:layout_height=wrap_content . . . /TableLayout /ScrollView Thanks, gilgantic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MediaPlayer example: Has anyone been able to stream an .mp4 file yet?
I am having the same issue...let me know if you figure out a solution... Vikram On Apr 4, 1:46 am, acopernicus [EMAIL PROTECTED] wrote: Please feel free to test your working code against my .mp4 file if your code works. It's possible there's something wrong with my .mp4 file, but I doubt it. Thanks...again! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Strange slow behavior in Emulator and how to recreate it (CameraPreview)
Also, try rotating the device (Ctrl-Alt-Pg. down). The ratio (frames/ sec) is much slower in landscape mode than in portrait mode. I suppose it is just an emulator issue and it will not be a problem with the actual devices, so I'm not too much worried about it... On 4 abr, 15:05, Franco [EMAIL PROTECTED] wrote: Hi, Using the CameraPreview example and doing some image processing I found a strange slow behavior in the Emulator. I have little experience with java and Android (C/C++ background) so I do not know if it is a true issue of the emulator or some strange memory/thread handling that I am not aware. When the application starts after the emulator starts, the application is very slow (228 ms per frame). If I press the Back button and then press the application icon, The applications is about 4 times faster (64ms per frame). This fast framerate will continue to work and will not go back to the slow behavior. I tried launching the emulator from Eclipse and stand alone. Also in Windows and OSX and the behavior is always the same and happens every time. To recreate the slow behavior I just added a couple of lines (intense CPU usage) to the CameraPreview sample provided by the SDK.The modified run() part is: @Override public void run() { // We first open the CameraDevice and configure it. CameraDevice camera = CameraDevice.open(); if (camera != null) { CameraDevice.CaptureParams param = new CameraDevice.CaptureParams(); param.type = 1; // preview param.srcWidth = 1280; param.srcHeight = 960; param.leftPixel = 0; param.topPixel = 0; param.outputWidth = 320; param.outputHeight = 240; param.dataFormat= 2; // RGB_565 camera.setCaptureParams(param); } // This is our main acquisition thread's loop, we go until // asked to quit. SurfaceHolder holder = mHolder; // === // Added to check strange behavior // === long timeMillis = java.lang.System.currentTimeMillis(); Paint paint = new Paint(); paint.setTextSize(20); paint.setARGB(255, 255, 0, 0); while (!mDone) { // Lock the surface, this returns a Canvas that can // be used to render into. Canvas canvas = holder.lockCanvas(); // Capture directly into the Surface if (camera != null) { camera.capture(canvas); // === // Added to check strange behavior // === int b=3; for(int i=0; i10; i++) b=b+1; long timeNew = java.lang.System.currentTimeMillis(); canvas.drawText(ms= + (timeNew - timeMillis), 10, 20, paint); timeMillis = timeNew; } // And finally unlock and post the surface. holder.unlockCanvasAndPost(canvas); } // Make sure to release the CameraDevice if (camera != null) camera.close(); } Can someone test it and see if the results are the same? Any ideas? Thanks Franco --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] how to change Menu show up as VERTICAL?
Hi There, After creating the menuitems and add them to Menu, they are showing HORIZONTAL instead of VERITCAL, like the following style: I3 | ITEM4 | ITEM5 -- FIRST 1 | SECOND 2 how to make them display like vertical alignment ITEM5 ITEM4 I3 SECOND 2 FIRST 1 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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Deploy from a webserver
Hi Mikael, I've got remote downloading working. You can go to code.google.com/p/jvending and download a provisioning server that handles stocking and delivery of Android apps. It uses OMA OTA descriptors (a superset of JAD descriptors). I'm going to shortly release the application manager (ASLv2.0) android client, for downloading and installing so you may also find that useful for your application. Shane On Fri, Apr 4, 2008 at 12:25 PM, BMT [EMAIL PROTECTED] wrote: Did any of you get the remote download to work? I am working on a similar probelm. The basic system is supposed to work like this: The user gets a message containing a personalized link this link points to a personalized application that gets downloaded and installed to the phone. The current APP works by sending an SMS that contains a url where the user can download the application specifically a JAD file, that then triggers a download and installation of the JAR on the users device. Any help would be greatly apreciated /Mikael On Feb 11, 9:11 pm, Jeff [EMAIL PROTECTED] wrote: I have been working on remote deployment modules as part of my project. The thing about the PackageManager is that, while it has an installPackage method, as far as I can tell there is no means of programatically removing a package, or to temporarily install a package. So you can imagine the package bloat. Instead, I have an activity that responds to a remote package url. I intend to either force the remote package to be signed before running it or just allow the user to run anything at their own risk after a warning. I can fast track this aspect of my project and get it out there if anyone is interested. On Feb 11, 7:51 pm, mathiastck [EMAIL PROTECTED] wrote: Please to repost if you find anyone that has solved this and posted their solution. On Feb 11, 12:07 pm, bdadkiss [EMAIL PROTECTED] wrote: Thanks for the quick respose On Feb 11, 1:17 pm, Zach Hobbs [EMAIL PROTECTED] wrote: Can't do it through thebrowseryet, however it would be possible to do it with a program using PackageManager. -- Zach Hobbs HelloAndroid.com Android OS news, tutorials, downloads On Monday 11 February 2008 14:04:57 bdadkiss wrote: Can anyone give any insight to deploying myapkfile from a webserver to the emulator? I have a working application I have developed and I am at a point where I would like to try deployment from a website. I am trying to place theapkfile in a web server and using the emulator browsergo to the web page and have theapkinstall on the emulator. When I go to the url the emulator opens the file as if it was opened with a text editor. Thanks Brent- 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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Custom listview
On the ImageView question, this should work: ImageView image = (ImageView)findViewById(R.id.avatar); Bitmap bitmap = BitmapFactory.decodeFile(photoPath); //this is the full path in my case it is /sdcard/sample/foo.png image.setImageBitmap(bitmap); The setImageDrawable(int drawable) with a reference to a res/drawable should work as well. Good luck, Nik On Apr 3, 6:37 am, David Given [EMAIL PROTECTED] wrote: dreamer wrote: [...] How can I make a custom list view, such that each item has for e.g a scroll text, image and a label. Ive checked it several times but to no success. Also how to do this thru layout XML only( without coding) if its possible. The easiest way I found to do that is to produce an XML fragment describing a single item, then use a SimpleCursorAdapter to replicate and populate the fragment for each line: SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.list_item_layout, _cursor, FromColumns, ToColumns); adapter.setViewBinder(this); This will require you to access your list data via a cursor, but that's probably a good idea anyway. I have found, though, that I couldn't make ImageView.setImageURI() work properly, so none of my images in the list view are getting populated. Don't know what's going on there. -- David Given [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Reset of the emulator?
emulator -wipe-data On Fri, Apr 4, 2008 at 9:00 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Vista, I deleted the userdata.img file, but after that I am not able to launch the emulator at all. Is there any other way to do a hard reset on Android emulator? On Feb 9, 7:33 am, zurdo1119 [EMAIL PROTECTED] wrote: On Win XP delete C:\Documents and Settings\[YOUR_USER_HERE]\Local Settings\Application Data\Android\userdata.img On Feb 8, 8:21 pm, AlexNa [EMAIL PROTECTED] wrote: Can I somehow reset the Android emulator? Or can I simply delete some files form its file system? On the DDMS view I can copy files in and out, but not delete them The problem I have is this: I created a test project with some java package name. I played with it and it worked on the emulator well. After that I started the real project but I choose to use the SAME PACKAGE name. It looks like now when I start my new project actually the old test project starts. I checked the files on the device through the DDMS view and I can see that my package is old (by date). Is it anyway to reset the situation. Changing the java package name probably will work, but I really need to use that one... Any help would be appreciated. Thank you. Alex Na.- 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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MediaPlayer example: Has anyone been able to stream an .mp4 file yet?
I decided to take matters into my own hands and to write my own streaming utility for the MediaPlayer. I created a tutorial on my solution and posted everything including source code onto my blog: blog.pocketjourney.com. Please check it out leave a comment on my blog if you have questions. Best of luck, Anthony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] gtalkservice.IGTalkSession.logout() causes GTalk Service to crash
Has anybody else experienced com.google.android.gtalkservice.IGTalkSession.logout() causing the GTalkService to crash? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Any one tried uisng mediaplayer example ,I ma unable to play video file from local directory
Hi guys, I decided to write my own streaming utility for the MediaPlayer. My solution is now documented as a tutorial on my blog including including source code: blog.pocketjourney.com. Please check it out leave a comment on my blog if you have questions. Best of luck, Anthony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to setup a server for streaming audio files
Still no luck streaming the audio using the built-in MediaPlayer functionality so I decided to write my own streaming utility for the MediaPlayer. My solution is now documented as a tutorial on my blog including including source code: blog.pocketjourney.com. Please check it out leave a comment on my blog if you have questions. Best of luck, Anthony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Why don't System.err and System.out point to the console?
It would be good for Android phones to have a rolling log file that doubles as a console. That way, when there are problems with applications in production, the user can simply push the logs to a server - just as Microsoft does now. It is weird for developers to not have familiar tools like e.printstacktrace() or System.out.println(). Instead we have something rather inconvenient to use: http://code.google.com/android/reference/adb.html By default, the Android system sends stdout and stderr (System.out and System.err) output to /dev/null. In processes that run the Dalvik VM, you can have the system write a copy of the output to the log file. In this case, the system writes the messages to the log using the log tags stdout and stderr, both with priority I. To route the output in this way, you stop a running emulator/device instance and then use the shell command setprop to enable the redirection of output. Here's how you do it: $ adb shell stop $ adb shell setprop log.redirect-stdio true $ adb shell start thanks, Anil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Call out to the community about the poor quality of Android's error messaging
Yeah...the Challenge deadline is growing closer, so I needed to spread a a little feedback to the Android team about the many days I've just spent working around issues in the API. OK...first off...some of those issues were mine but my biggest waste of time has been tracking down error messaging like Null, IOException, The error messaging on the MediaPlayer in particular has been killing me these last few days but the error messaging throughout the entire API in general is AWFUL. I would like the Google team to please realize that..while yes this is a pre-alpha release...many of us are wasting many precious hours of our spare time on this project and do not have the benefit of the source code that will someday be available. SO it woudl be great if they would please update their error messaging to give us a clearer idea of just what has happened rather than blank messages or simple null statements. If you feel the same way, then please echo your thoughts on Android's error messaging. Biosopher --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Why don't System.err and System.out point to the console?
It's because the Android code isn't really Java, it's Dalvik, and the Android emultator makes you report those things to the Dalvik output. You yourself listed the process to print errors there, I suggest you use it. ;) On Apr 4, 7:34 pm, Anil [EMAIL PROTECTED] wrote: It would be good for Android phones to have a rolling log file that doubles as a console. That way, when there are problems with applications in production, the user can simply push the logs to a server - just as Microsoft does now. It is weird for developers to not have familiar tools like e.printstacktrace() or System.out.println(). Instead we have something rather inconvenient to use: http://code.google.com/android/reference/adb.html By default, the Android system sends stdout and stderr (System.out and System.err) output to /dev/null. In processes that run the Dalvik VM, you can have the system write a copy of the output to the log file. In this case, the system writes the messages to the log using the log tags stdout and stderr, both with priority I. To route the output in this way, you stop a running emulator/device instance and then use the shell command setprop to enable the redirection of output. Here's how you do it: $ adb shell stop $ adb shell setprop log.redirect-stdio true $ adb shell start thanks, Anil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Call out to the community about the poor quality of Android's error messaging
Well that's what you get when you program in the Java language... Although I agree, some errors are seemingly random. It'd be nice to have some sort of stability, but I'll make do because of how great Android is now already. On Apr 5, 12:19 am, acopernicus [EMAIL PROTECTED] wrote: Yeah...the Challenge deadline is growing closer, so I needed to spread a a little feedback to the Android team about the many days I've just spent working around issues in the API. OK...first off...some of those issues were mine but my biggest waste of time has been tracking down error messaging like Null, IOException, The error messaging on the MediaPlayer in particular has been killing me these last few days but the error messaging throughout the entire API in general is AWFUL. I would like the Google team to please realize that..while yes this is a pre-alpha release...many of us are wasting many precious hours of our spare time on this project and do not have the benefit of the source code that will someday be available. SO it woudl be great if they would please update their error messaging to give us a clearer idea of just what has happened rather than blank messages or simple null statements. If you feel the same way, then please echo your thoughts on Android's error messaging. Biosopher --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---