[android-developers] Re: SQLite DROP Database
uninstall the application On 7月15日, 下午1時07分, Saurav Mukherjee to.saurav.mukher...@gmail.com wrote: if have rights to the shell, then u can jus try this: rm database name On Wed, Jul 15, 2009 at 2:44 AM, Kumaravel Kandasami kumaravel.kandas...@gmail.com wrote: How to drop a database in Android SDK? Did not see any methods in android.database.sqlite.SQLiteOpenHelper or android.database.sqlite.SQLiteDatabase classes. Any suggestion is appreciated. Kumar _/|\_ www.saisk.com ku...@saisk.com making a profound difference with knowledge and creativity... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Android Camera IntentFilter from Manifest
Can someone post the exact code of Android's Camera App's IntentFilter from the manifest? 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: getView from CustomizedAdapter called several times
Hi, I'm having the same problem. Did you find any solutions?? -Mika On Jun 24, 7:39 pm, jabu jabu.j...@gmail.com wrote: Hi Everyone, I am implementing my ownadapterthat inherits from BaseAdapter (this is something very classic). Then when I start the activity that owns the listView binded to thisadapterI can see that the getView() method is called moretimesthan what the number of view actually available in the list. For instance, I do have 2 rows in my list and when I first set theadaptergetView is called 6times. Then If I make a call to notifyDataSetChanged(), getView is called 4times. I understand that when you scroll up and down getView must be called to generate or re use a view but I don't scroll up or down, I am really wondering why getView is called so many time. Thanks a lot in advance for your responses. Jabu My code just in case even though it is a pretty basic piece of code: public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder; if (convertView == null) { convertView = mInflater.inflate(R.layout.row_action, null); // Creates a view holder holder = new ViewHolder(); ... convertView.setTag(holder); } else { holder = (ViewHolder)convertView.getTag(); } holder.params.set return convertView; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Can Any body give the suggestions for this...
HI I have pasted one screen shot how can i do when i click the image i need to see the title bar with buttons and image buttons view is in the below pasted image... thanks a lot in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Can Any body give the suggestions for this...
On Wed, Jul 15, 2009 at 12:16 PM, android.vinny vinny.s...@gmail.comwrote: HI I have pasted one screen shot how can i do when i click the image i need to see the title bar with buttons and image buttons view is in the below pasted image... thanks a lot in advance. -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~--- attachment: example_image.JPG
[android-developers] Re: logcat behavior
Hi -d- directs command to the only connected USB device returns an error if more than one USB device is present. -e- directs command to the only running emulator. returns an error if more than one emulator is running. -s serial number- directs command to the USB device or emulator with the given serial number This would help you connect the ADB to the correct device. Greetings Till On 15 Jul., 01:10, intbt in...@tacberry.com wrote: I have found that if I am trying to run Eclipse with the G1 connected (vis USB), logcat will only output info from programs running on the phone - not when I run code on the emulator. If I disconnect the phone and then run the emulator version, logcat provides the desired output. I also have now discovered that if I connect the G1, the SD Card on the emulator shows the contents of the G1 SD Card, whether I am running code on the emulator or the phone. This was a little confusing as I expected the AVD to control the SD Card when I run a virtual version, not the attached 'real' phone. --~--~-~--~~~---~--~~ 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: Baseband version in API ?
So nobody knows how to read the firmware version of the radio? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Is Zoom in And Zoom out is Possible for Image View In android............
HI U told that will send the code in a short hours i didn't get the code for zooming . On Tue, Jul 14, 2009 at 5:09 PM, hanged_man majd...@gmail.com wrote: you can use the default image viewer using intents (you dont have to implement your own), i don't remember exactly how it is done but ill send you the code in a few hours. On Jul 14, 8:37 am, Desu Vinod Kumar vinny.s...@gmail.com wrote: Hi One More thing I need to Specify I need to zoom in and Zoom out with Touch ... not with key events On Tue, Jul 14, 2009 at 10:50 AM, android.vinny vinny.s...@gmail.com wrote: Hi Is Zooming is possible to do in android for Image view . I have a images in full screen view, i need to zoom in and zoom out for that images present in image view . Can any body give me suggestions regarding this Thanks in advance. -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09916009493 -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 --~--~-~--~~~---~--~~ 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 use adb tool on SAMSUNG GALAXY?
Hi there, is there a possibility to debug via wlan? On Jul 14, 8:35 pm, Da Yang daboil...@googlemail.com wrote: OK. There is only one way to test my camera application. use any APK Installer install the apk, though it's not handy, it's the solution in the moment. But thank you for your answers. Maybe i want to write to SAMSUNG development group, and ask for a right adb if they do have one. On Tue, Jul 14, 2009 at 6:11 PM, David Turner di...@android.com wrote: You need a different version of ADB to access this phone at the moment. A future release of the SDK will provide an ADB binary that should be able to do that, but this is not available yet as far as I know. You're quite on the bleeding edge, aren't you ;-) On Tue, Jul 14, 2009 at 6:05 PM, legerb drim...@gmail.com wrote: Hey, I just got this device too. Trying to figure out how to debug on device too. According this http://groups.google.com/group/android-beginners/browse_thread/thread... Samsung have their own adb. Please update the thread if you've got any progress :) thanks ahead! On Jul 11, 10:54 pm, da yang daboil...@googlemail.com wrote: Hi i got this new mobilephone this week in Germany, wanted to debug my program on the device. but it doesn't work, c:\adbdevices lists no device attached, though i have tried to change the android_usb.inf in order to install the usb driver from SDK. i added some entries as follows: under [Google.NTx86] ; HTC DREAM ... ; SAMSUNGGALAXY %USB\VID_04E8PID_6640. DeviceDescRelease%=androidusb.Dev, USB \VID_04E8PID_6640 %USB\VID_04E8PID_6640MI_01.DeviceDescRelease%=androidusb.Dev, USB \VID_04E8PID_6640MI_01 %USB\VID_04E8PID_6640.DeviceDescRelease%=androidusb.Dev, USB \VID_04E8PID_6640 and [Strings]: USB\VID_04E8PID_6640.DeviceDescRelease=SAMSUNGGALAXY USB\VID_04E8PID_6640MI_01.DeviceDescRelease=SAMSUNGGALAXY CompositeADBInterface USB\VID_04E8PID_6640.DeviceDescRelease=SAMSUNGGALAXYBootloader i got only one VID and one PID through USBVIEW, though for HTC DREAM there are different PIDs used. Theadbinterface got installed, butadbjust didn't work. later i also tried to use the device under linux, set up the device as in Dev guide: If you're developing on Ubuntu Linux, you need to add a rules file: 1. Login as root and create this file: /etc/udev/rules.d/51- android.rules. For Gusty/Hardy, edit the file to read: SUBSYSTEM==usb, SYSFS{idVendor}==0bb4, MODE=0666 For Dapper, edit the file to read: SUBSYSTEM==usb_device, SYSFS{idVendor}==0bb4, MODE=0666 2. Now execute: chmod a+rx /etc/udev/rules.d/51-android.rules adbdevices listed nothing as well. : ( open a terminal on the device, with ps, i guess theadbdaemon adbd is running. but theadbtool just doesn't work. Can someone help me? thanks da -- Da Yang daboil...@gmail.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 android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] BouncyCastle code in dalvik/libcore
What version is the bouncycastle libs included in dalvik libcore code? I'm trying to use OpenPGP code to an app but I'm getting big conflicts and issues because of the existing code, but it doesn't include all bouncycastle code, and the version of android code I've checked out doesn't indicate the version of bouncycastle used. --~--~-~--~~~---~--~~ 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 in running the android sky widget
I am unable to find the androidmanifest file for Koxx branch . has someone tried to build it and use it from source . How can we get Jeffs code to work for international codes outside us. I hardcoded latitude and longitude in Jeff's code to lat=40.75, lon=74.37 but I dont get any output. The url is not working for these coordinates. here is the logcat output. I/ActivityThread( 928): Publishing provider org.jsharkey.sky: org.jsharkey.sky.ForecastProvider D/UpdateService( 928): Processing thread started D/ForecastProvider( 928): query() with uri=content://org.jsharkey.sky/appwidgets/21 D/AndroidRuntime( 927): --- registering native functions --- I/jdwp( 927): received file descriptor 20 from ADB D/UpdateService( 928): Not configured yet, so skipping update D/ForecastProvider( 928): query() with uri=content://org.jsharkey.sky/appwidgets/22 D/UpdateService( 928): Not configured yet, so skipping update D/ForecastProvider( 928): query() with uri=content://org.jsharkey.sky/appwidgets/25 D/UpdateService( 928): Delta since last forecast update is 20793996 min D/ForecastProvider( 928): query() with uri=content://org.jsharkey.sky/appwidgets/25 D/ForcastHelper( 928): using country code=null D/NoaaHelper( 928): queryLocation() with lat=40.75, lon=74.37, days=4 D/InetAddress( 928): www.weather.gov: 140.90.113.200 (family 2, proto 6) D/ForcastHelper( 928): Request returned status HTTP/1.0 200 OK D/dalvikvm( 928): GC freed 3737 objects / 242680 bytes in 345ms E/UpdateService( 928): Problem parsing forecast E/UpdateService( 928): org.jsharkey.sky.webservice.Forecast$ParseException: No forecasts found from webservice query E/UpdateService( 928): at org.jsharkey.sky.webservice.WebserviceHelper.updateForecasts(WebserviceHelper.java:176) E/UpdateService( 928): at org.jsharkey.sky.UpdateService.run(UpdateService.java:229) E/UpdateService( 928): at java.lang.Thread.run(Thread.java:1058) D/MedAppWidget( 928): Building medium widget update D/ForecastProvider( 928): query() with uri=content://org.jsharkey.sky/appwidgets/25 D/ForecastProvider( 928): query() with uri=content://org.jsharkey.sky/appwidgets/25/forecast_at/1247639764901 D/UpdateService( 928): Requesting next update at 124766040, in 343 min I/ActivityManager( 581): Stopping service: org.jsharkey.sky/.UpdateService I/ActivityManager( 581): Starting activity: Intent { flags=0x1000 comp={org.jsharkey.sky/org.jsharkey.sky.InfoActivity} } On Tue, Jul 14, 2009 at 11:45 PM, n179911 n179...@gmail.com wrote: On Tue, Jul 14, 2009 at 11:05 AM, Jeff Sharkeyjshar...@android.com wrote: There have been previous threads about android.location.Geocoder not entirely working in the SDK. That app depends on responses from that API, which is why it's not working. The geocoder works on actual devices, otherwise you could hard-code values when debugging. Thank you. Can you please tell me how to hard-code values? (i.e. which classes to put what hard code values) j On Tue, Jul 14, 2009 at 5:04 AM, bhojvishalb...@gmail.com wrote: same here even I am facing the same problem On Jul 14, 11:07 am, n179911 n179...@gmail.com wrote: Hi, I have download the android sky project and able to get it to compile it under eclipse. http://code.google.com/p/android-sky/ But when i try to add a 'Forecast' Widget on emulator, it pops up a 'Configure forecast widget', then I click 'Manual search' , I entered '60005' as my zip code. Then I press the 'Search' Icon. Then what should I do to next? Both 'Verify on Map' and 'Save' buttons are disabled. I am not sure what else do i need to do to run it on emulator? Thank you. -- Jeff Sharkey jshar...@android.com -- with regards vishal --~--~-~--~~~---~--~~ 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] ICU4C .dat file generation for China region
Hello, everyone: I have a question about ICU4C.. My goal: To generate a icudt38l-us-zh.dat file for China region, where zh indicates it's for China. Result: Failed, due to helper.sh doesn't help me to do so successfully. My steps: 1. change in external/icu4c/stubdata/Android.mk for Chinese, take Japanese change in this file as example and make similar changes. 2. make a new directory named external/icu4c/stubdata/cfg-us-zh/, copy everything from external/icu4c/stubdata/cfg-us to external/ icu4c/stubdata/cfg-us-zh, and modify the res_index.txt under each sub-folders by removing unnecessary contents and adding Chinese contents into them, and change icudt38l.txt in the same manner. 3. run ./helper.sh us-zh to generate .dat file. Result: Failed, due to $TOOL in helper.sh is pointing to a invalid path. Change ./helper.sh and change $TOOL to a valid path where contains the genrb/icupkg tool (I've installed ICU on my Ubuntu before) 4. run ./helper.sh us-zh AGAIN. Result: Failed. error log shows: icupkg/ucnv_enumDependencies(): unsupported _MBCSHeader.version 5.3 I remove all the .cnv from cfg-us-zh/icudt38l.txt and run ./ helper.sh us-zh AGAIN, icudt38l-us-zh.dat is successfully generated, but this is definitely NOT what I expected because it contains NO .cnv for Chinese. 5. I tried to run ./helper.sh us-japan to see if it works for Japanese, but failed due to same reason as in 4th step. I am wondering if anyone else has successfully generated a .dat file? And how to? Thanks a lot! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Disable android Widget.
Hi Folks, I want to disable my android widget on the fly using a broadcast receiver listening to some intents. How do i do that??? Kindly throw some light on this.. -- Regards, Manjunatha --~--~-~--~~~---~--~~ 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] Textview - Select All/Select Text/Copy/Paste
Hi could someone post a small code snippet on how to have a read only text view (ie. editable = false), which has the context menu of the standard Select All/Select Text/Copy/Cut/Paste. I have tried using the EditText and setting editable = false. However I do not want to see the blinking cursor. I then set cursor visible to false but then it does not show which areas are currently be highlighted when using Select Text. I do not mind using editText. I just need something like how the browser works, the text display is read-only. And supports copy and paste with visible which text is highlighted. Cheers --~--~-~--~~~---~--~~ 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 remove left right blank area of Gallery widget?
extend the widget and overwrite/override 2009/7/15 Oceanedge newsforhar...@gmail.com I want to use android.widget.Gallery as an horizontal image scroll view. But the default behavior of Gallery widget display blank area in left right side even if the width sum of items in it exceed its width. How can I disable this behavior, so that there is no extra blank area in Gallery? Many thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: getDeviceId returns null
My entire development is based on getting the device id and other details. Without that my product will not be complete. Is there a way I can log a bug and get some attention on it ? Siddharth On Wed, Jul 15, 2009 at 12:56 AM, Al Sutton a...@funkyandroid.com wrote: I'm guessing you're running on the emulator in which case getting null is normal. Al. --- http://andappstore.com/ On Jul 14, 6:22 pm, MCON Dev mcon...@gmail.com wrote: Hi, I am running this piece of code myDevice = Globals.getInstance().getDevice(); this.deviceID = myDevice.getDeviceId() ; with the below xml ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.org.mcruiseon.client android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/app_name activity android:name=.WelcomeScreen android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application uses-sdk android:minSdkVersion=3 / uses-permission android:name=android.permission.INTERNET/uses-permission uses-permission android:name=android.permission.READ_PHONE_STATE/uses-permission /manifest What am I doing wrong. Why is getDeviceId returning null ? Siddharth --~--~-~--~~~---~--~~ 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: SQLite DROP Database
Awesome Craig, exactly what I was looking. I will let you know whether it worked. Kumar_/|\_ www.saisk.com ku...@saisk.com making a profound difference with knowledge and creativity... On Tue, Jul 14, 2009 at 11:36 PM, Craig supkic...@gmail.com wrote: http://developer.android.com/reference/android/content/ContextWrapper.html#deleteDatabase%28java.lang.String%29 On Jul 15, 7:14 am, Kumaravel Kandasami kumaravel.kandas...@gmail.com wrote: How to drop a database in Android SDK? Did not see any methods in android.database.sqlite.SQLiteOpenHelper or android.database.sqlite.SQLiteDatabase classes. Any suggestion is appreciated. Kumar_/|\_www.saisk.com ku...@saisk.com making a profound difference with knowledge and creativity... --~--~-~--~~~---~--~~ 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: Baseband version in API ?
Why not download source of the Settings app (I assume it's written in Java) and see what goes on there? I would have done it just now, but looking through the instructions at http://source.android.com there is quite a few steps involved and I'm low on disk space. Joe. On Jul 15, 8:39 am, Murphy murphy2...@gmail.com wrote: So nobody knows how to read the firmware version of the radio? --~--~-~--~~~---~--~~ 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: Baseband version in API ?
try this one... http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;a=blob;f=src/com/android/settings/DeviceInfoSettings.java;h=be01f7dc57e6dbe474adf1decce6db1fefa245c0;hb=HEAD -Marc On Wed, Jul 8, 2009 at 10:10 PM, Murphy murphy2...@gmail.com wrote: I want to read the baseband/radio version number but I can't find it. It's visible in the menu Settings/About Phone but not in the 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] Re: Baseband version in API ?
oooh, android.os.SystemProperties.java is not available from the API which basically do native calls to get the baseband version. SystemProperties.java http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/os/SystemProperties.java;h=c3ae3c26aa4346686fd28371e8f1d96a6a1b2ee4;hb=HEAD On Wed, Jul 15, 2009 at 7:09 PM, Marc Lester Tan mail...@gmail.com wrote: try this one... http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;a=blob;f=src/com/android/settings/DeviceInfoSettings.java;h=be01f7dc57e6dbe474adf1decce6db1fefa245c0;hb=HEAD -Marc On Wed, Jul 8, 2009 at 10:10 PM, Murphy murphy2...@gmail.com wrote: I want to read the baseband/radio version number but I can't find it. It's visible in the menu Settings/About Phone but not in the 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] Re: SurfaceViews handling, Thread, and general game design
Hello Dianne , Thank you for you response. according to your words, I do not need that each Box will be as a Surface view but only one game surface view and the only way I can mange the game objects(Boxes etc.) is by using a low level management of drawing and event handling. If I trying to answer my own question then option (4) is the way to do it. I thought I will design my game Flash style where each object draw itself and the main Activity will handle the events and drawing Threads but I presume we are not there yet. It helped me a lot to read Playing with graphics in Android Tutorial (http://www.droidnova.com/playing-with-graphics-in-android- part-i,147.html) which spread a light on hot to use surface view and animation. Regards to you all ayanir On Jul 14, 7:06 pm, Dianne Hackborn hack...@android.com wrote: I very strongly recommend that you don't use multiple surface views. A surface view is a very heavy-weight object, and intended for the primary area of the window -- for example, the video part of a video player, the playfield of a game, etc. It is basically an overlay, and actually its own separate full window that is simply being Z-ordered with your main window to make it look like they are related. I don't know what your complicated animation sequence is, but just having some animation is not enough reason to use a surface view. Worst case, you can just create an off-screen bitmap that you draw the animation in and update the screen by drawing that bitmap to the screen with the normal invalidate() mechanism. If you need the performance of a surface view, then you should design your game so that your entire playfield is on surface view, and you take care of drawing each of your boxes inside of that and manage them however you want (not as their own views). On Tue, Jul 14, 2009 at 4:27 AM, ayanir ayanir...@gmail.com wrote: Hello, I'm a new Android developer. I would like to make a simple game using the SurfaceView (Canvas drawing). the game has a a custom Object name Box. Box can draw itself and need to get an event when it is clicked. when it does, there is an animation sequence coming out of the box like a jumping clown. I have several Boxes on the screen when each of them can be activated. Several Boxes animation can also be presented simultaneously. Here it gets tricky: Since I have a complicated animation sequence, each Box extends SurfaceView. The problem is I haven't figured it out how can I handle several SurfaceView's drawing using only one Thread (in order to present an animation I need to use one) and also how can I get the onClick/ onThouch event from my Activity to each of my Boxes. The LunarLanding example in the SDK uses only one Thread but also uses only one SurfaceView which manage the animation of the game components (there are no several game components SurfaceViews). Also, there is no need to get onTouch event, so this example doesn't match to my case. I have several questions about what is the right approach do code this: 1. Should I use Box extends SurfaceView? 2. Can SurfaceView gets user events like onTouch/onClick? 3. Is there a way to add to the main SurfaceView another SurfaceView (Box)? 4. If none of the above questions is positive, should I use one SurfaceView (and one Thread) and try to map the other Boxes on the screen for user event handling. I mean Box only paints itself but the user event is being handled by me (not by the OS). 5. Should each Box (SurfaceView) should handle it's own Thread in case of animation (it is not good design but it is also an option)? 6. do you have any other proposal? I know that these are a lot of questions but I'll appreciate if you can answer some of them. Thanks in advance, ayanir -- 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] Speed up emulator starting
Hi, Android SDK startup takes more than 2 minutes.. is there a way to start the emulator faster with any special parameters.. Regards, Raja Nagendra Kumar 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 android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: getDeviceId returns null
MCON Dev wrote: My entire development is based on getting the device id and other details. Without that my product will not be complete. Is there a way I can log a bug and get some attention on it ? Relying on emulators for products is never a great idea. Relying on emulators for products where you are dependent on hardware (and the IMEI is from hardware) is rather dangerous. So, buy a device or two. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ 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] IllegalAccessError - any clues when this may come..
07-15 17:07:34.829: ERROR/AndroidRuntime(805): Uncaught handler: thread main exiting due to uncaught exception 07-15 17:07:34.851: ERROR/AndroidRuntime(805): java.lang.IllegalAccessError: cross-loader access from pre-verified class 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at dalvik.system.DexFile.defineClass(Native Method) 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at dalvik.system.DexFile.loadClass(DexFile.java:193) 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203) 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at java.lang.ClassLoader.loadClass(ClassLoader.java:573) 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at java.lang.ClassLoader.loadClass(ClassLoader.java:532) 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at android.app.Instrumentation.newActivity(Instrumentation.java:1097) 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2186) 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2284) 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at android.app.ActivityThread.access$1800(ActivityThread.java:112) 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692) 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at android.os.Handler.dispatchMessage(Handler.java:99) 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at android.os.Looper.loop(Looper.java:123) 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at android.app.ActivityThread.main(ActivityThread.java:3948) 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at java.lang.reflect.Method.invokeNative(Native Method) 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at java.lang.reflect.Method.invoke(Method.java:521) 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:782) 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) 07-15 17:07:34.851: ERROR/AndroidRuntime(805): at dalvik.system.NativeStart.main(Native Method) 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 android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: SurfaceViews handling, Thread, and general game design
Here is the correct link: http://www.droidnova.com/playing-with-graphics-in-android-part-i,147.html On Jul 15, 2:33 pm, ayanir ayanir...@gmail.com wrote: Hello Dianne , Thank you for you response. according to your words, I do not need that each Box will be as a Surface view but only one game surface view and the only way I can mange the game objects(Boxes etc.) is by using a low level management of drawing and event handling. If I trying to answer my own question then option (4) is the way to do it. I thought I will design my game Flash style where each object draw itself and the main Activity will handle the events and drawing Threads but I presume we are not there yet. It helped me a lot to read Playing with graphics in Android Tutorial (http://www.droidnova.com/playing-with-graphics-in-android- part-i,147.html) which spread a light on hot to use surface view and animation. Regards to you all ayanir On Jul 14, 7:06 pm, Dianne Hackborn hack...@android.com wrote: I very strongly recommend that you don't use multiple surface views. A surface view is a very heavy-weight object, and intended for the primary area of the window -- for example, the video part of a video player, the playfield of a game, etc. It is basically an overlay, and actually its own separate full window that is simply being Z-ordered with your main window to make it look like they are related. I don't know what your complicated animation sequence is, but just having some animation is not enough reason to use a surface view. Worst case, you can just create an off-screen bitmap that you draw the animation in and update the screen by drawing that bitmap to the screen with the normal invalidate() mechanism. If you need the performance of a surface view, then you should design your game so that your entire playfield is on surface view, and you take care of drawing each of your boxes inside of that and manage them however you want (not as their own views). On Tue, Jul 14, 2009 at 4:27 AM, ayanir ayanir...@gmail.com wrote: Hello, I'm a new Android developer. I would like to make a simple game using the SurfaceView (Canvas drawing). the game has a a custom Object name Box. Box can draw itself and need to get an event when it is clicked. when it does, there is an animation sequence coming out of the box like a jumping clown. I have several Boxes on the screen when each of them can be activated. Several Boxes animation can also be presented simultaneously. Here it gets tricky: Since I have a complicated animation sequence, each Box extends SurfaceView. The problem is I haven't figured it out how can I handle several SurfaceView's drawing using only one Thread (in order to present an animation I need to use one) and also how can I get the onClick/ onThouch event from my Activity to each of my Boxes. The LunarLanding example in the SDK uses only one Thread but also uses only one SurfaceView which manage the animation of the game components (there are no several game components SurfaceViews). Also, there is no need to get onTouch event, so this example doesn't match to my case. I have several questions about what is the right approach do code this: 1. Should I use Box extends SurfaceView? 2. Can SurfaceView gets user events like onTouch/onClick? 3. Is there a way to add to the main SurfaceView another SurfaceView (Box)? 4. If none of the above questions is positive, should I use one SurfaceView (and one Thread) and try to map the other Boxes on the screen for user event handling. I mean Box only paints itself but the user event is being handled by me (not by the OS). 5. Should each Box (SurfaceView) should handle it's own Thread in case of animation (it is not good design but it is also an option)? 6. do you have any other proposal? I know that these are a lot of questions but I'll appreciate if you can answer some of them. Thanks in advance, ayanir -- 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: Is Zoom in And Zoom out is Possible for Image View In android............
desu, plz make use of the zoomcontrols widget available... it will make things easier for u... On Wed, Jul 15, 2009 at 5:12 PM, hanged_man majd...@gmail.com wrote: Hi Desu, i thought you were trying to implement your own image viewer and implementing your own Zoom in out buttons, therefore i recommended to you to use the default image viewer as you can see in my previous post but it turned out that what you're looking for is zoom in and out on touching the image/screen and i dont think is going to be useable or useful for the user, what if the user wished to drag around and view different parts of it ? any touch on the screen would cause a zoom in/out and as i said before he wouldn't be able to move the screen and view different parts of the image. On Jul 15, 10:48 am, Desu Vinod Kumar vinny.s...@gmail.com wrote: HI U told that will send the code in a short hours i didn't get the code for zooming . On Tue, Jul 14, 2009 at 5:09 PM, hanged_man majd...@gmail.com wrote: you can use the default image viewer using intents (you dont have to implement your own), i don't remember exactly how it is done but ill send you the code in a few hours. On Jul 14, 8:37 am, Desu Vinod Kumar vinny.s...@gmail.com wrote: Hi One More thing I need to Specify I need to zoom in and Zoom out with Touch ... not with key events On Tue, Jul 14, 2009 at 10:50 AM, android.vinny vinny.s...@gmail.com wrote: Hi Is Zooming is possible to do in android for Image view . I have a images in full screen view, i need to zoom in and zoom out for that images present in image view . Can any body give me suggestions regarding this Thanks in advance. -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09916009493 -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 -- Regards, Sujay Milton Berle http://www.brainyquote.com/quotes/authors/m/milton_berle.html - If opportunity doesn't knock, build a door. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Is Zoom in And Zoom out is Possible for Image View In android............
HI Thanks for ur response like in Iphone Multi touch zooming events are not available in android actually i got he specification like that nly i want to this by touch the image only ... what about this circle Zoom in android? On Wed, Jul 15, 2009 at 5:12 PM, hanged_man majd...@gmail.com wrote: Hi Desu, i thought you were trying to implement your own image viewer and implementing your own Zoom in out buttons, therefore i recommended to you to use the default image viewer as you can see in my previous post but it turned out that what you're looking for is zoom in and out on touching the image/screen and i dont think is going to be useable or useful for the user, what if the user wished to drag around and view different parts of it ? any touch on the screen would cause a zoom in/out and as i said before he wouldn't be able to move the screen and view different parts of the image. On Jul 15, 10:48 am, Desu Vinod Kumar vinny.s...@gmail.com wrote: HI U told that will send the code in a short hours i didn't get the code for zooming . On Tue, Jul 14, 2009 at 5:09 PM, hanged_man majd...@gmail.com wrote: you can use the default image viewer using intents (you dont have to implement your own), i don't remember exactly how it is done but ill send you the code in a few hours. On Jul 14, 8:37 am, Desu Vinod Kumar vinny.s...@gmail.com wrote: Hi One More thing I need to Specify I need to zoom in and Zoom out with Touch ... not with key events On Tue, Jul 14, 2009 at 10:50 AM, android.vinny vinny.s...@gmail.com wrote: Hi Is Zooming is possible to do in android for Image view . I have a images in full screen view, i need to zoom in and zoom out for that images present in image view . Can any body give me suggestions regarding this Thanks in advance. -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09916009493 -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 --~--~-~--~~~---~--~~ 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] Landscape mode without reLaunching the activity
Hello everyone, So im confronted to a little problem. I'd like to use the landscape view when the sensor is having particular values (i decide it myself) so i call setRequestedOrientation(2) (for the landscape view) but i notice that this call just redraw the whole activity plus it does add a standard android blur effect. Si my question is, how to set the phone on landscape mode without having the blur effect and the call of myActivity. 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] Device firmware update
Are there any good source detailing the steps for firmware update for my g1 deve phone with new 1.5 images.. with or without gmaps support etc. Is such updates possible and supported.. 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 android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Is Zoom in And Zoom out is Possible for Image View In android............
HI i want to use it by touch events not by key events for Zoomcontrol widget is it possibe ... can u tell me where will get the tutorials or examples regarding this? On Wed, Jul 15, 2009 at 5:17 PM, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: desu, plz make use of the zoomcontrols widget available... it will make things easier for u... On Wed, Jul 15, 2009 at 5:12 PM, hanged_man majd...@gmail.com wrote: Hi Desu, i thought you were trying to implement your own image viewer and implementing your own Zoom in out buttons, therefore i recommended to you to use the default image viewer as you can see in my previous post but it turned out that what you're looking for is zoom in and out on touching the image/screen and i dont think is going to be useable or useful for the user, what if the user wished to drag around and view different parts of it ? any touch on the screen would cause a zoom in/out and as i said before he wouldn't be able to move the screen and view different parts of the image. On Jul 15, 10:48 am, Desu Vinod Kumar vinny.s...@gmail.com wrote: HI U told that will send the code in a short hours i didn't get the code for zooming . On Tue, Jul 14, 2009 at 5:09 PM, hanged_man majd...@gmail.com wrote: you can use the default image viewer using intents (you dont have to implement your own), i don't remember exactly how it is done but ill send you the code in a few hours. On Jul 14, 8:37 am, Desu Vinod Kumar vinny.s...@gmail.com wrote: Hi One More thing I need to Specify I need to zoom in and Zoom out with Touch ... not with key events On Tue, Jul 14, 2009 at 10:50 AM, android.vinny vinny.s...@gmail.com wrote: Hi Is Zooming is possible to do in android for Image view . I have a images in full screen view, i need to zoom in and zoom out for that images present in image view . Can any body give me suggestions regarding this Thanks in advance. -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09916009493 -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 -- Regards, Sujay Milton Berlehttp://www.brainyquote.com/quotes/authors/m/milton_berle.html - If opportunity doesn't knock, build a door. -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 --~--~-~--~~~---~--~~ 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] AsyncTask on a button
Hello, My application parse an xml file dans display data in a list view. On start of application i load data using an AsyncTask. A Progress Dialog is display during the load. This part works fine. A button in the application make it possible to reload the data. I would like to run the AsyncTask but the sytem say i can't alter view in other thread. I have also read an AsyncTask can't be run another time : http://android-developers.blogspot.com/2009/05/painless-threading.html If i use Activity.runOnUiThread(Runnable) i have the message application not responding. So i would like to know what is the best way to do this and not to have the application not responding message. 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: Is Zoom in And Zoom out is Possible for Image View In android............
It is very simple, i would recommend u to read the documentation the try exploring ur self... the zoom controls widget actually displays 2 button like images one for zoom in 1 for zoom out. it is similar to the one used by maps app... or the image viewer app... On Wed, Jul 15, 2009 at 5:22 PM, Desu Vinod Kumar vinny.s...@gmail.comwrote: HI i want to use it by touch events not by key events for Zoomcontrol widget is it possibe ... can u tell me where will get the tutorials or examples regarding this? On Wed, Jul 15, 2009 at 5:17 PM, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: desu, plz make use of the zoomcontrols widget available... it will make things easier for u... On Wed, Jul 15, 2009 at 5:12 PM, hanged_man majd...@gmail.com wrote: Hi Desu, i thought you were trying to implement your own image viewer and implementing your own Zoom in out buttons, therefore i recommended to you to use the default image viewer as you can see in my previous post but it turned out that what you're looking for is zoom in and out on touching the image/screen and i dont think is going to be useable or useful for the user, what if the user wished to drag around and view different parts of it ? any touch on the screen would cause a zoom in/out and as i said before he wouldn't be able to move the screen and view different parts of the image. On Jul 15, 10:48 am, Desu Vinod Kumar vinny.s...@gmail.com wrote: HI U told that will send the code in a short hours i didn't get the code for zooming . On Tue, Jul 14, 2009 at 5:09 PM, hanged_man majd...@gmail.com wrote: you can use the default image viewer using intents (you dont have to implement your own), i don't remember exactly how it is done but ill send you the code in a few hours. On Jul 14, 8:37 am, Desu Vinod Kumar vinny.s...@gmail.com wrote: Hi One More thing I need to Specify I need to zoom in and Zoom out with Touch ... not with key events On Tue, Jul 14, 2009 at 10:50 AM, android.vinny vinny.s...@gmail.com wrote: Hi Is Zooming is possible to do in android for Image view . I have a images in full screen view, i need to zoom in and zoom out for that images present in image view . Can any body give me suggestions regarding this Thanks in advance. -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09916009493 -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 -- Regards, Sujay Milton Berlehttp://www.brainyquote.com/quotes/authors/m/milton_berle.html - If opportunity doesn't knock, build a door. -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 -- Regards, Sujay Spike Milliganhttp://www.brainyquote.com/quotes/authors/s/spike_milligan.html - All I ask is the chance to prove that money can't make me happy. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Is Zoom in And Zoom out is Possible for Image View In android............
Hi thanks for response that i already done by using buttons zoom in and zoom out exactly what i need it like circle zoom in android or multitouchphoto event like that i need. u got my point regarding this On Wed, Jul 15, 2009 at 5:28 PM, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: It is very simple, i would recommend u to read the documentation the try exploring ur self... the zoom controls widget actually displays 2 button like images one for zoom in 1 for zoom out. it is similar to the one used by maps app... or the image viewer app... On Wed, Jul 15, 2009 at 5:22 PM, Desu Vinod Kumar vinny.s...@gmail.comwrote: HI i want to use it by touch events not by key events for Zoomcontrol widget is it possibe ... can u tell me where will get the tutorials or examples regarding this? On Wed, Jul 15, 2009 at 5:17 PM, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: desu, plz make use of the zoomcontrols widget available... it will make things easier for u... On Wed, Jul 15, 2009 at 5:12 PM, hanged_man majd...@gmail.com wrote: Hi Desu, i thought you were trying to implement your own image viewer and implementing your own Zoom in out buttons, therefore i recommended to you to use the default image viewer as you can see in my previous post but it turned out that what you're looking for is zoom in and out on touching the image/screen and i dont think is going to be useable or useful for the user, what if the user wished to drag around and view different parts of it ? any touch on the screen would cause a zoom in/out and as i said before he wouldn't be able to move the screen and view different parts of the image. On Jul 15, 10:48 am, Desu Vinod Kumar vinny.s...@gmail.com wrote: HI U told that will send the code in a short hours i didn't get the code for zooming . On Tue, Jul 14, 2009 at 5:09 PM, hanged_man majd...@gmail.com wrote: you can use the default image viewer using intents (you dont have to implement your own), i don't remember exactly how it is done but ill send you the code in a few hours. On Jul 14, 8:37 am, Desu Vinod Kumar vinny.s...@gmail.com wrote: Hi One More thing I need to Specify I need to zoom in and Zoom out with Touch ... not with key events On Tue, Jul 14, 2009 at 10:50 AM, android.vinny vinny.s...@gmail.com wrote: Hi Is Zooming is possible to do in android for Image view . I have a images in full screen view, i need to zoom in and zoom out for that images present in image view . Can any body give me suggestions regarding this Thanks in advance. -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09916009493 -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 -- Regards, Sujay Milton Berlehttp://www.brainyquote.com/quotes/authors/m/milton_berle.html - If opportunity doesn't knock, build a door. -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 -- Regards, Sujay Spike Milliganhttp://www.brainyquote.com/quotes/authors/s/spike_milligan.html - All I ask is the chance to prove that money can't make me happy. -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Is Zoom in And Zoom out is Possible for Image View In android............
HI u have Source code for ImageViewer app if u have that can u plz attach that i am not getting it. On Wed, Jul 15, 2009 at 5:28 PM, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: It is very simple, i would recommend u to read the documentation the try exploring ur self... the zoom controls widget actually displays 2 button like images one for zoom in 1 for zoom out. it is similar to the one used by maps app... or the image viewer app... On Wed, Jul 15, 2009 at 5:22 PM, Desu Vinod Kumar vinny.s...@gmail.comwrote: HI i want to use it by touch events not by key events for Zoomcontrol widget is it possibe ... can u tell me where will get the tutorials or examples regarding this? On Wed, Jul 15, 2009 at 5:17 PM, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: desu, plz make use of the zoomcontrols widget available... it will make things easier for u... On Wed, Jul 15, 2009 at 5:12 PM, hanged_man majd...@gmail.com wrote: Hi Desu, i thought you were trying to implement your own image viewer and implementing your own Zoom in out buttons, therefore i recommended to you to use the default image viewer as you can see in my previous post but it turned out that what you're looking for is zoom in and out on touching the image/screen and i dont think is going to be useable or useful for the user, what if the user wished to drag around and view different parts of it ? any touch on the screen would cause a zoom in/out and as i said before he wouldn't be able to move the screen and view different parts of the image. On Jul 15, 10:48 am, Desu Vinod Kumar vinny.s...@gmail.com wrote: HI U told that will send the code in a short hours i didn't get the code for zooming . On Tue, Jul 14, 2009 at 5:09 PM, hanged_man majd...@gmail.com wrote: you can use the default image viewer using intents (you dont have to implement your own), i don't remember exactly how it is done but ill send you the code in a few hours. On Jul 14, 8:37 am, Desu Vinod Kumar vinny.s...@gmail.com wrote: Hi One More thing I need to Specify I need to zoom in and Zoom out with Touch ... not with key events On Tue, Jul 14, 2009 at 10:50 AM, android.vinny vinny.s...@gmail.com wrote: Hi Is Zooming is possible to do in android for Image view . I have a images in full screen view, i need to zoom in and zoom out for that images present in image view . Can any body give me suggestions regarding this Thanks in advance. -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09916009493 -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 -- Regards, Sujay Milton Berlehttp://www.brainyquote.com/quotes/authors/m/milton_berle.html - If opportunity doesn't knock, build a door. -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 -- Regards, Sujay Spike Milliganhttp://www.brainyquote.com/quotes/authors/s/spike_milligan.html - All I ask is the chance to prove that money can't make me happy. -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 --~--~-~--~~~---~--~~ 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] autocompletetextview: get Cursor
hi, i m using an auto complete text view with a cursor adapter. can anyone tell me how i can get the reference to the cursor of the record that is selected from the auto complete list??? thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Maps liberary as application liberary insted of shared lib
Hi, Is it possible to use api of maps.jar as a application library rather than a shared library! I was able to install a map application on avd profile standard using by removing the line uses-library android:name=com.google.android.maps/ in manifest file however when we run it on emulator it says the following error.. not sure if such approach of using maps.jar is allowed or not. 07-15 17:43:46.367: ERROR/AndroidRuntime(810): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tejasoft.mobile.android.maps/ com.tejasoft.mobile.android.maps.GoogleMaps}: java.lang.IllegalStateException: You are only allowed to have a single MapView in a MapActivity 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2268) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2284) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at android.app.ActivityThread.access$1800(ActivityThread.java:112) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at android.os.Handler.dispatchMessage(Handler.java:99) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at android.os.Looper.loop(Looper.java:123) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at android.app.ActivityThread.main(ActivityThread.java:3948) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at java.lang.reflect.Method.invokeNative(Native Method) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at java.lang.reflect.Method.invoke(Method.java:521) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:782) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at dalvik.system.NativeStart.main(Native Method) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): Caused by: java.lang.IllegalStateException: You are only allowed to have a single MapView in a MapActivity 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at com.google.android.maps.MapActivity.setupMapView(MapActivity.java:180) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at com.google.android.maps.MapView.init(MapView.java:279) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at com.google.android.maps.MapView.init(MapView.java:225) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at com.tejasoft.mobile.android.maps.GoogleMaps.onCreate(GoogleMaps.java: 19) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1123) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2231) 07-15 17:43:46.367: ERROR/AndroidRuntime(810): ... 11 more --~--~-~--~~~---~--~~ 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] Setting Ringer From Resource?
Hopefully someone can point me in the right direction ... In my application I want to set the ringtone to one of the resources in my project. I have not got this to work, yet. I'm setting the default ringer to a resource in my application with the following code. Uri mediaUri = Uri.parse(android.resource:// com.example.myapp/ + mediaId); RingtoneManager.setActualDefaultRingtoneUri(getApplicationContext(), RingtoneManager.TYPE_RINGTONE, mediaUri); I can play the resource via the RingtoneManager with this code: RingtoneManager.getRingtone(getApplicationContext(), mediaUri).play(); This plays the sound I would expect. However, if I ask the RingtoneManager to play the default ringer, it plays the default android ringer. Here is the code I'm using to play the default ringer: Uri defaultUri = RingtoneManager.getDefaultUri (RingtoneManager.TYPE_RINGTONE); Ringtone rt = RingtoneManager.getRingtone(getApplicationContext(), defaultUri); The question is... Why is the setActualDefaultRingtoneUri method call not setting the default ringer? What am I doing wrong? I've searched many user forums, read the docs, and all the news groups and I cant seem to find what I'm doing wrong. 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] Perspective drawing
hi all.. Is there any way to achieve perspective drawing of an image.. are there any APIs.. or is OpenGL the only solution.. kindly help!! Thanks in advance... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AsyncTask on a button
loudo wrote: My application parse an xml file dans display data in a list view. On start of application i load data using an AsyncTask. A Progress Dialog is display during the load. This part works fine. A button in the application make it possible to reload the data. I would like to run the AsyncTask but the sytem say i can't alter view in other thread. In any AsyncTask, you should be modifying your UI via onPostExecute(), or perhaps onProgressUpdate(). Note that modifying your UI includes things like updating an adapter that is already connected to a ListView. I have also read an AsyncTask can't be run another time : http://android-developers.blogspot.com/2009/05/painless-threading.html So, create a new one (new ThisIsMyTask().execute()). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ 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] arabic softkeyboard bidi problem
In softkeyboard I am getting arabic keys and I am able to enter stings from right to left but the text is appearing on Left side of the editor. Is it problem with the font? since Hebrew is working fine. also if I just try to display arabic text using arabic font set using setTypeface(font) the font is appearing on left side of the editor but for hebrew it is appearing on Right side --~--~-~--~~~---~--~~ 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 compile an application for avd profile android with googlemap addons
Raja Nagendra Kumar wrote: What are the differences in ant script we should take care to compile the application which uses maps api. Tried with bootlcasspath with both android and maps.jar file. but it fails to create dex file. Use the generated build files you get from android create project -t 3. The only difference I know of between that and -t 2 is that default.properties has target=android-3. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ 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] MediaStore.EXTRA_OUTPUT
I have seen a number of posts from people who had trouble retrieving a full size image from MediaStore.EXTRA_OUTPUT with code like Intent i = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); pictureUri = Uri.fromFile(new File(/sdcard/ picturefile.jpg)); intent.putExtra(MediaStore.EXTRA_OUTPUT, pictureUri); startActivityForResult(i, PICTURE_TAKEN); Should this code work? I mean, should this result in a file containing the picture? --~--~-~--~~~---~--~~ 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: getDeviceId returns null
I agree with your thought. Would it be a bad idea to expect the android guys to provide a valid deviceid, simcard number and phone number with their emulator. With options to change country and correspondingly get appropriate test bed ? Infact sometime in future I would need multiple emulators to run and test my product under stress. Any ideas here ? Siddharth On Wed, Jul 15, 2009 at 5:09 PM, Mark Murphy mmur...@commonsware.comwrote: MCON Dev wrote: My entire development is based on getting the device id and other details. Without that my product will not be complete. Is there a way I can log a bug and get some attention on it ? Relying on emulators for products is never a great idea. Relying on emulators for products where you are dependent on hardware (and the IMEI is from hardware) is rather dangerous. So, buy a device or two. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ 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] CPU usage api's query
Hello, I'm trying to develop a service, which needs to be run in background as a low priority task and does some complex processing . I need to gracefully quit my service when their is a resource shortage( like CPU running low on memory). Was there any APIs available to know the CPU resource usage ?. Objectives of my service is to - 1. Exit service when a high priority application(s) is running and which might need entire CPU resources. 2. Should store my states before onDestroy() of my service is called. I'm planning to use CPU resource usage api's in service to check periodically the CPU load and quit the service if CPU load exceed a threshold(80 %) after storing states. Please let me know of any better way of handling the objectives of my service stated above. Thanks. Regards, Sukumar. --~--~-~--~~~---~--~~ 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: AsyncTask on a button
why i have the message i can't alter a view in other thread when il launch another time the AsyncTask ? On 15 juil, 14:31, Mark Murphy mmur...@commonsware.com wrote: loudo wrote: My application parse an xml file dans display data in a list view. On start of application i load data using an AsyncTask. A Progress Dialog is display during the load. This part works fine. A button in the application make it possible to reload the data. I would like to run the AsyncTask but the sytem say i can't alter view in other thread. In any AsyncTask, you should be modifying your UI via onPostExecute(), or perhaps onProgressUpdate(). Note that modifying your UI includes things like updating an adapter that is already connected to a ListView. I have also read an AsyncTask can't be run another time :http://android-developers.blogspot.com/2009/05/painless-threading.html So, create a new one (new ThisIsMyTask().execute()). -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Need Android talent? Ask on HADO!http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ 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: Speed up emulator starting
Yes, you can speed it up. From the help on the emuloator: -no-boot-anim disable animation for faster boot --~--~-~--~~~---~--~~ 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: AsyncTask on a button
loudo wrote: why i have the message i can't alter a view in other thread when il launch another time the AsyncTask ? You may have a bug in your AsyncTask subclass. As I wrote: In any AsyncTask, you should be modifying your UI via onPostExecute(), or perhaps onProgressUpdate(). Note that modifying your UI includes things like updating an adapter that is already connected to a ListView. So if in doInBackground() you try modifying the UI, directly or indirectly, you will get the exception you are describing. Determine what part of your code is triggering that exception, and determine how to move it to onPostExecute() or onProgressUpdate(). -- 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: Device firmware update
http://www.htc.com/www/support/android/adp.html On Wed, Jul 15, 2009 at 7:49 AM, Raja Nagendra Kumarnagendra.r...@tejasoft.com wrote: Are there any good source detailing the steps for firmware update for my g1 deve phone with new 1.5 images.. with or without gmaps support etc. Is such updates possible and supported.. 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 android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: getDeviceId returns null
MCON Dev wrote: Would it be a bad idea to expect the android guys to provide a valid deviceid, simcard number and phone number with their emulator. They may not be allowed to, depending how the telecommunications regulations surrounding deviceid, simcard number and phone number are written. And bear in mind that there may be a couple hundred sets of such regulations, one per country with cellular infrastructure. With options to change country and correspondingly get appropriate test bed ? I could certainly see having some emulator command-line switches to allow *you* to put in fake data. Besides, you can do this yourself. Just wrap your calls to getDeviceId() and kin in some class that detects the null values and substitutes in values read off of an SD card image, or some local file, or a value read off of the network. In production, you will use the real values; on emulators, you will use your test data. -- 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: Camera application 1.5 on emulator does nothing
To enable camera, is it simply a matter of hand editing the config.ini in the avd dir? Do I need to update the avd with the android command afterwards? The camera still is not working in emulator after below modifications hw.camera=yes sdcard.size=1000M skin.name=HVGA skin.path=platforms\android-1.5\skins\HVGA image.sysdir.1=platforms\android-1.5\images\ On May 22, 5:50 am, Johnny Song ayi.s...@gmail.com wrote: you must make sure that you have already implemented libcamera in your source code. 2009/5/22 arnouf arnaud.far...@gmail.com Hi all, Strange behaviour with emulator running with Cupcake. When emulator is launched (via ADT), a SD card is mounted correctly, and I click on Camera, I have a black screen and nothing happens, I got the famous error with Wait or Force closewait, wait, waitnothing happens. I create with AVD the target 3. I'm on Windows XP SP2. Best Regards, Johnny Song From China. --~--~-~--~~~---~--~~ 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] List View item ticker.
Hi All, I have the list view with the length text values. So how can i ticker the test? Please give me your comments Thanks in Advance, Muthu Kumar K. --~--~-~--~~~---~--~~ 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: OpenGL ES, How to rotate a cube?(3D Rotation)
Aha... you mean 'how to rotate using the touchscreen'. You're on the right track :-) However, i found that gluUnProject in the api did not work for some reason. I wrote my own (do a search on this forum). Handling swipes and translate them into rotations is not trivial. I wrote the app The Gube, a 3D rubix cube, and handling the user input (touch screen, trackball) is what i spent most my time on. It can not be explained in just a post here (without giving away my code). Some pointers: -On ACTION_DOWN, determine which patch/object your finger is touching. -On a swipe (onFling/onScroll on GestureDetector) and given the earlier found patch/object, determine which direction the swipe is happening in 3D space. -Using the patch/object's normal determine the relation of the swipe relative to the patch and rotate the patch/object accordingly. - To have a smooth interaction with swiping the screen and actually rotating the objects; don't do all the 3D math and such in your main GUI thread. Instead post user-action objects to a queue that is handled by your opengl rendering-thread. The rendering-thread not only renders your cube, but also reads the user-action objects from the queue and does the appropriate 3D handling and instructs the rendering engine how to modify the view/model accordingly. It took me a few months to get this right... On Jul 14, 11:25 pm, quill quill...@163.com wrote: I have read the API Demo code. I have come up an idea to do it like this: 1)Map the touch point to 3D coordinates, and we can get a line when touch point moved, as Line1; 2)Also we can get another line which is vertical to the screen. Signed as Line2: gluunproject(x,y,0)--gluunproject(x,y,1); 3)Line1 and Line2 can form a plane, and we can get the plane's normal line, it is just the rotation axis; 4)With a proper angle according to the touch point's moving distant, we can rotate the object. But this idea has come up a problem. how can I know the previous state of the object? I can't use the total angle to rotate because the axis is changable. I use gl.glLoadMatrixf(mModelViewMatrix, 0) to reach the previous state and then do glRotatef, it can work when I slip my finger quickly, but it works bad when I slip slowly. On Jul 14, 11:34 pm, Streets Of Boston flyingdutc...@gmail.com wrote: Take a careful look at the API Demo code. And then take a look at the OpenGL ES documentation (http://www.khronos.org/opengles/) Having the code that shows you how to rotate around the X or Y axis, it should not be hard to figure out how to rotate along the Z axis On Jul 14, 11:23 am, quill quill...@163.com wrote: In the api demo, there is an example for how to rotate a cube, but it can only rotate about X axis or Y axis, without Z-Axis Rotation. So how to perform 3D Rotation? Any advice is appreciated.- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: getView from CustomizedAdapter called several times
I'm not a google engineer, so i don't know the answer, but i have a theory why this may happen. In your layouts, do you use 'weights' (weightsum and layoutweight)? If i remember correctly, if you use these attributes, layout-code is called twice. If the layout-code for a list-view includes the 'getView' then this would explain it being called 4 times for 2 child views. On Jul 15, 2:40 am, Mika mika.ristim...@tkk.fi wrote: Hi, I'm having the same problem. Did you find any solutions?? -Mika On Jun 24, 7:39 pm, jabu jabu.j...@gmail.com wrote: Hi Everyone, I am implementing my ownadapterthat inherits from BaseAdapter (this is something very classic). Then when I start the activity that owns the listView binded to thisadapterI can see that the getView() method is called moretimesthan what the number of view actually available in the list. For instance, I do have 2 rows in my list and when I first set theadaptergetView is called 6times. Then If I make a call to notifyDataSetChanged(), getView is called 4times. I understand that when you scroll up and down getView must be called to generate or re use a view but I don't scroll up or down, I am really wondering why getView is called so many time. Thanks a lot in advance for your responses. Jabu My code just in case even though it is a pretty basic piece of code: public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder; if (convertView == null) { convertView = mInflater.inflate(R.layout.row_action, null); // Creates a view holder holder = new ViewHolder(); ... convertView.setTag(holder); } else { holder = (ViewHolder)convertView.getTag(); } holder.params.set return convertView; }- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: keeping screen on while activity active
OK now I'm only turning the flag on in the onCreate() and onResume() methods. It works fine on the HTC Magic phone, but in the emulator, after it starts and I don't do anything on the home screen it doesn't go off at all. When I start my app it doesn't go off like required, but when I return back to the home screen it doesn't go off neither. I don't know if this issue is severe enough to be considered an emulator bug? Lex On Jul 14, 9:28 pm, Dianne Hackborn hack...@android.com wrote: You don't even need to clear it. This flag is associated with the window, and it will only keep the screen on while your window is displayed. I really can't explain the behavior you say you are seeing, if your window is not displayed this flag simply will not keep the screen on. On Tue, Jul 14, 2009 at 12:21 PM, Lex hakkinen1...@gmail.com wrote: Hi, I have a map activity for which I would like to have the screen turned on as long it's active (the app consists of one activity only). When the activity is paused or stopped I want to return to normal on/off mode. Keeping the screen on works fine while the app is running but when I exit the app the screen stays on as well. What am I missing? public void onCreate(...) { getWindow().addFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); setContentView } public void onPause(...) { getWindow().cleaFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); } public void onResume(...) { getWindow().addFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); } public void onStop(...) { getWindow().cleaFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); } -- 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] Problem of vertical alignment in a RelativeLayout
Hello. I know my original post (at http://groups.google.com/group/android-developers/browse_thread/thread/57129a72b400754c/cc6cb59adf79bd24?lnk=gst, I could not find a way to perform a reply, maybe it's too old) is not sexy, but I'm now facing that problem in many situations. Let me please rephrase what I attempt to do, and what my problem is. I have a RelativeLayout made of three widgets (named 1, 2 and 3 on the illustrations below): one attached to its parent left border (labelled 1), one to its parent right border (labelled 2) and the third (labelled 3) inserted between the 2 previous ones (its left border is attached to the first widget right border, and its right border is attached to the second widget left border). The third widget (the middle/central one laballed 3) is far taller than the two others, and I would like the first and second items (1 and 2) to be vertically centered with the middle widget. I have resorted to the android:layout_centerVertical attribute for both the first and second widget, but I do not get the expected result. See at the bottom the various layouts I'm mentionning. Could someone please help me, and tell me whether what I intend to do is feasible, and how? Thank you for your time. Layout with no android:layout_centerVertical specified: --- |1|3|2| --|3|-- |3| --- Layout with android:layout_centerVertical set to true: --- |3| |3| |3| --- |1| |2| --- --- What I'd like: --- --|3|-- |1|3|2| --|3|-- --- Regards, Édouard, desperate --~--~-~--~~~---~--~~ 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: Camera application 1.5 on emulator does nothing
Toggling off the orientation in the sounddisplay settings allows camera to work in emulator. On Jul 15, 9:33 am, Thomas McKay - www.winebythebar.com thomasfmc...@gmail.com wrote: To enable camera, is it simply a matter of hand editing the config.ini in the avd dir? Do I need to update the avd with the android command afterwards? The camera still is not working in emulator after below modifications hw.camera=yes sdcard.size=1000M skin.name=HVGA skin.path=platforms\android-1.5\skins\HVGA image.sysdir.1=platforms\android-1.5\images\ On May 22, 5:50 am, Johnny Song ayi.s...@gmail.com wrote: you must make sure that you have already implemented libcamera in your source code. 2009/5/22 arnouf arnaud.far...@gmail.com Hi all, Strange behaviour with emulator running with Cupcake. When emulator is launched (via ADT), a SD card is mounted correctly, and I click on Camera, I have a black screen and nothing happens, I got the famous error with Wait or Force closewait, wait, waitnothing happens. I create with AVD the target 3. I'm on Windows XP SP2. Best Regards, Johnny Song From China. --~--~-~--~~~---~--~~ 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] App crashing on HTC Magic launching camera intent
Wine by the Bar app (free in Android Market) is crashing on the HTC Magic. What intent settings/extras are needed to successfully launch ACTION_IMAGE_CAPTURE on HTC Magic? intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); App works fine on G1. Also need proper intent for choosing an picture already on the phone, and a cropping intent. Help appreciated! Tom --~--~-~--~~~---~--~~ 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: Camera application 1.5 on emulator does nothing
So apparently it is the known SDK1.5_r1 and SDK1.5_r2 emulator bug where calling getSystemService(Context.SENSOR_SERVICE) makes an app hang. On Jul 15, 4:31 pm, Thomas McKay - www.winebythebar.com thomasfmc...@gmail.com wrote: Toggling off the orientation in the sounddisplay settings allows camera to work in emulator. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem of vertical alignment in a RelativeLayout
elDoudou wrote: I have a RelativeLayout made of three widgets (named 1, 2 and 3 on the illustrations below): one attached to its parent left border (labelled 1), one to its parent right border (labelled 2) and the third (labelled 3) inserted between the 2 previous ones (its left border is attached to the first widget right border, and its right border is attached to the second widget left border). The third widget (the middle/central one laballed 3) is far taller than the two others, and I would like the first and second items (1 and 2) to be vertically centered with the middle widget. I have resorted to the android:layout_centerVertical attribute for both the first and second widget, but I do not get the expected result. See at the bottom the various layouts I'm mentionning. Could someone please help me, and tell me whether what I intend to do is feasible, and how? Thank you for your time. android:layout_centerVertical says to center vertically in its parent, not with respect to some other widget. Since you did not post the layout files here, and you did not post screenshots somewhere, it is difficult to tell from your ASCII art what is going on. What I'd like: --- --|3|-- |1|3|2| --|3|-- --- Some ideas: Option #1: Use a horizontal LinearLayout with appropriate android:layout_gravity attributes Option #2: Use android:layout_centerVertical on all three widgets, not just two, plus no other layout attributes that affect their vertical positions -- 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] Build Contact Stand Alone apk - from Android Contact Source Code?
Hi all, I have downloaded the full Android source code pulled out the contact source into a different folder. I am trying to create a separate Contacts stand alone App using the existing android contacts source code, once that done I intend to add some more features ( code ) to contacts source make a contacts.apk out of it. Is it possible? The problem I faced was, when I pulled the contacts app source code, there were many internal api calls Private api references. I tried to resolve them by including those internal api source code class files(available from the android source code) in my project, but there are still many errors internal api calls, which I am not sure how to resolve them like: import android.os.ServiceManager android.provider.Gmail android.provider.Im android.provider.Telephony acquireProvider(Uri) deleteRow() lookupProviderNameFromId(int) ISyncAdapter IContentProvider etc Is there a way to solve these internal API issue? Was there anyone who has successfully extended any of the existing apps (Contacts, Alaram, calendar...) of android with the help of its source code, is this approach possible? I tried to include the framework_immediates classes.jar in the project, but due to duplicate class files present in the project SDK it throws the ususal - UNEXPECTED TOP-LEVEL EXCEPTION: class file already added com/android/ internal/telephony/callerInfosync... I have been trying to achieve this for the past 2 days, with not much success. Can somebody lead me to a correct direction? Any help in this regard would be really great! Thanks, Shibbs --~--~-~--~~~---~--~~ 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] On-screen keyboard bug ?
We have in our app, a non-editable field described in the layout thus EditText android:id=@+id/txtText android:layout_width=fill_parent android:layout_height=wrap_content android:singleLine=false android:selectAllOnFocus=true android:hint=A Hint here android:layout_marginBottom=4dip android:background=@android:drawable/editbox_background/ and in code, this is disabled using setEnabled(false). All was well before Cupcake, but when the on-screen keyboard came along, now you are able to tap on the field (or navigate focus to the field using the ball) and then using the on-screen keyboard, start typing into the field, replacing the text with anything you type. I think this is an unexpected behavior.. Anyone else ? -g --~--~-~--~~~---~--~~ 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] ItemizedOverlay ArrayIndexOutOfBoundsException explanation AND solution !!
Hi all ! I want to share with you the solution to a weird problem I was having. I think it was mostly due to my misunderstanding of the way ItemizedOverlay works. I couldn't find the sources, and the usage is not much documented. Hopefully I could connect the debugger and dig... I have a dynamic ItemizedOverlay, which means that from time to time I update the list of items inside it, removing some and adding others. When I would sometimes click on an item, than update the items, than click again on another item, an ArrayIndexOutOfBoundsException was thrown. I thought that calling the populate() method was enought to get the Overlay updated, and that I only needed to override the createItem(int i) and size() methods. However, one should also call this : setLastFocusedIndex(-1); The ItemizedOverlay remembers the index of the last focused item, and does some stuff with it when you focus on a new item (by clicking on it for instance). If you change the list of items, then the lastFocusedIndex has no more meaning. I think that this should be written in the documentation, or that setLastFocusedIndex(-1); should be called from the populate() method. One more thing : I think that the minimal touchable bounds of a drawable should be customizable. I was playing with the map on the emulator, and I was surprised that click quite far away from a pin would still get it tapped. I realized that the minimal box for an item is 100*100 pixels, which is quite large... Here is a sample code to show how to use a dynamic ItemizedOverlay, and to customize the minimal size of a box (I have simplified it from my real class, to show only the interesting stuff). public class FaultStationOverlay extends ItemizedOverlayFaultStationItem { private ArrayListFaultStationItem faultStations = new ArrayListFaultStationItem(); private DrawablenormalMarker; private DrawablefewFaultsMarker; private Drawable muchFaultsMarker; private RecttouchableBounds = new Rect(); private static final intMIN_TOUCHABLE_WIDTH = 10; private static final intMIN_TOUCHABLE_HEIGHT = 10; public FaultStationOverlay(Drawable normalMarker, Drawable fewFaultsMarker, Drawable muchFaultsMarker) { super(normalMarker); this.normalMarker = boundCenterBottom(normalMarker); this.fewFaultsMarker = boundCenterBottom(fewFaultsMarker); this.muchFaultsMarker = boundCenterBottom(muchFaultsMarker); populate(); } public void updateStations(ListStation stations) { faultStations.clear(); for (Station station : stations) { FaultStationItem stationItem = new FaultStationItem(station); switch (stationItem.getState()) { case FaultStationItem.STATE_NORMAL: stationItem.setMarker(normalMarker); break; case FaultStationItem.STATE_FEW_FAULTS: stationItem.setMarker(fewFaultsMarker); break; case FaultStationItem.STATE_MUCH_FAULTS: stationItem.setMarker(muchFaultsMarker); break; default: throw new IllegalStateException(stationItem should have one of the three available states); } faultStations.add(stationItem); } setLastFocusedIndex(-1); populate(); } @Override protected boolean hitTest(FaultStationItem item, Drawable marker, int hitX, int hitY) { //The code written here was deduced from what happens in the debugger ;-) . Rect bounds = marker.getBounds(); int width = bounds.width(); int height = bounds.height(); int centerX = bounds.centerX(); int centerY = bounds.centerY(); int touchWidth = Math.max(MIN_TOUCHABLE_WIDTH, width); int touchLeft = centerX - touchWidth / 2; int touchHeight = Math.max(MIN_TOUCHABLE_HEIGHT, height); int touchTop = centerY - touchHeight / 2; touchableBounds.set(touchLeft, touchTop, touchLeft + touchWidth, touchTop + touchHeight); return touchableBounds.contains(hitX, hitY); } @Override protected FaultStationItem createItem(int i) { return
[android-developers] Re: Build Contact Stand Alone apk - from Android Contact Source Code?
Shibbs wrote: I am trying to create a separate Contacts stand alone App using the existing android contacts source code, once that done I intend to add some more features ( code ) to contacts source make a contacts.apk out of it. Is it possible? Not without a lot of work. The problem I faced was, when I pulled the contacts app source code, there were many internal api calls Private api references. I tried to resolve them by including those internal api source code class files(available from the android source code) in my project, but there are still many errors internal api calls, which I am not sure how to resolve them like: import android.os.ServiceManager android.provider.Gmail android.provider.Im android.provider.Telephony acquireProvider(Uri) deleteRow() lookupProviderNameFromId(int) ISyncAdapter IContentProvider etc Is there a way to solve these internal API issue? Do not try to build that code as a separate project. The built-in applications, in general, are designed to be built as part of the firmware, not simply to the SDK. Can somebody lead me to a correct direction? You have not indicated what the direction is. If you are trying to assist with the Android open source project, and make patches to Contacts, do not pull it into a separate application. Rather, follow the instructions at http://source.android.com to build firmware and make your changes that way. If you are trying to make a separate installable application, remove all functionality from the code that relies upon classes not in the SDK. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 0.9 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: On-screen keyboard bug ?
Yes, this is working as intended, setEnabled() doesn't relate to the edibility of a text field, it relates usually to focusability, but its actually up to the View to determine what enabled means. If you'd like to prevent the EditText from being edited (but then, why are you using EditText instead of TextView?) you can set android:editable=false in your layout. I believe you call also use the two argument form of setText() and specify TextView.BufferType.NORMAL as the second argument. I haven't actually tried this, so I'd be interested in your results if you do. Cheers, Justin Android Team @ Google On Jul 15, 7:57 am, NitroDesk gsuku...@gmail.com wrote: We have in our app, a non-editable field described in the layout thus EditText android:id=@+id/txtText android:layout_width=fill_parent android:layout_height=wrap_content android:singleLine=false android:selectAllOnFocus=true android:hint=A Hint here android:layout_marginBottom=4dip android:background=@android:drawable/editbox_background/ and in code, this is disabled using setEnabled(false). All was well before Cupcake, but when the on-screen keyboard came along, now you are able to tap on the field (or navigate focus to the field using the ball) and then using the on-screen keyboard, start typing into the field, replacing the text with anything you type. I think this is an unexpected behavior.. Anyone else ? -g --~--~-~--~~~---~--~~ 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: extending parcelables
It looks like your Animal class is abstract and should never be constructed. Declare Animal 'abstract' and see if you get an instantiation error. Have your tried to put the 'public static final Parcelable.Creator CREATORCat' and 'public static final Parcelable.Creator CREATORDog' variables and definitions in both Cat and Dog (and not in Animal)? This will make sure that the factory-method createFromParcel creates the appropriate subclass (Cat or Dog, and not Animal). About the readFromParcel(). If Cat and Dog both implement readFromParcel() it should work fine. Are you sure that the variable 'a' is not an Animal instance? On Jul 15, 10:39 am, Bart van Wissen bartvanwis...@gmail.com wrote: I just noticed that my workaround is not actually working. I did the following inside my Animal's CREATOR.createFromParcel: className = source.readString(); a = (Animal) Class.forName(className).newInstance(); a.readFromParcel(source); Now a has the right type (so Cat or Dog), but somehow still Animal.readFromParcel() is called. Aren't methods supposed to be virtual by default? On Jul 15, 4:11 pm, Bart van Wissen bartvanwis...@gmail.com wrote: My current workaround is as follows: - In each specific Animal subtype's writeToParcel() method, I write the class name as a String into the Parcel as the first element. - In the Animal's CREATOR.createFromParcel() I read the first String out of the parcel, and based on that I create the appropriate type and call the appropriate readFromParcel() method. I think this is kind of ugly though. I would expect the android framework to take care of this for me. (My application is not actually dealing with animals, this is just to make it simpler to explain the issue)- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: extending parcelables
On Jul 15, 5:21 pm, Streets Of Boston flyingdutc...@gmail.com wrote: It looks like your Animal class is abstract and should never be constructed. Declare Animal 'abstract' and see if you get an instantiation error. It should be abstract, but I cannot make it abstract because then I cannot add the CREATOR to it, which is needed to implement Parcelable. So now it is just an empty superclass. Have your tried to put the 'public static final Parcelable.Creator CREATORCat' and 'public static final Parcelable.Creator CREATORDog' variables and definitions in both Cat and Dog (and not in Animal)? This will make sure that the factory-method createFromParcel creates the appropriate subclass (Cat or Dog, and not Animal). I did that, but it doesn't work. Those CREATORs are never actually called. The AIDL compiler sees the ListAnimal and assumes that every element in the list is an Animal, and no subclass of it, and it creates the unmarshalling code accordingly. About the readFromParcel(). If Cat and Dog both implement readFromParcel() it should work fine. Are you sure that the variable 'a' is not an Animal instance? That was my mistake, I didn't properly override the method (one was private and the other was public). I deleted my post when I noticed this. Unfortunately this was while you were typing your reply. --~--~-~--~~~---~--~~ 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] google picasa
I have installed the MediaUploader.apk(picasa), when share a picture, it shows: upload failed,no account information available. I know picasa is the new feature of Android 1.5, but how can I solve this problem? --~--~-~--~~~---~--~~ 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] WebView's use of AbsoluteLayout
Are there currently any plans to replace AbsoluteLayout in in WebView? I need to place native controls based on the coordinates of elements in the WebView. I'm currently using a separate View to manage the layer, but I'd prefer to override the layout in WebView. Thanks, Don Thorp Titanium Mobile: 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] How to build Tradition Chinese ROM (zh-TW)
I want to build a Tradition Chinese ROM (zh-TW), but I can't find any information about this. Has someone kindly teach me how to build this image? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to write async socket with Android?
I think you might look at the Java NIO libraries. This is true async. comms. in Java, and is documented in the Android documentation (http:// developer.android.com/reference/java/nio/package-summary.html). [I have never used it under Android] Please be aware that in my experience NIO is not the simplest of APIs, and you'll need to read up on it. Ian Hunter On Jul 14, 5:57 am, Victor Lin borns...@gmail.com wrote: Hi, I am developing a program that needs async socket. I am new to Android and Java. As I can see in the document, to write network program, I got Socket and SocketChannel, but it seems they are all sync socket, it means, I need an extra thread to call blocking read, write... and etc. Here comes the problem, my program is a chat room, the communicate is not linear, I have no idea when the server will send a message to me, if I read in that thread to wait message from server, but the user want to send message to server, the reading function blocked forever, if there is no incoming data, then the pending outgoing message will not be sent. That's why I need async socket. So my question is: How to write async socket under Android environment? Thanks. Victor Lin. --~--~-~--~~~---~--~~ 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] Information about the Layout Editor for Android
Hello, I am NINNI in Japan. I developed the layout editor for android widgets on Windows. This editor make a layout by using the absolute coordinate. I know it is not recommended. So this editor may not be usefull for anyone. But if you want to try it, download site is here. http://up-japan.ddo.jp/AndroidTools_E.html This editor is a free download. 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] Difference between BitBlit algorithms in skia and libpixelflinger
Hi All, In Android, I could see 2 BitBlit functions defined in skia and libpixelflinger libraries. 1) S32A_D565_Opaque function in external/skia/src/core/ SkBlitRow_D16.cpp has one implementation 2) scanline_t32cbl6blend function in system/core/libpixelflinger/ scanline.cpp has another implementation Both implementations look different. Please help me understand the rationale behind these algorithms and the reason for having two different implementations/algorithms. --~--~-~--~~~---~--~~ 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] EditText cursor position in px/dip
We are trying to position a widget at the cursor position on the edit widget. It seems this is only exposed in character position, not pixels. This has been the work-around that we've comeup with - to paint the text and compute the rectangle extents. This seems a tad inefficient - but we couldn't find another way. Would appreciate any help in finding better mechanisms to do the same. EditText entry; String s = entry.getText().toString(); TextPaint p = new TextPaint(); p.setTextSize(entry.getTextSize()); Rect r = new Rect(); p.getTextBounds(s, 0, s.length(), r); // r.width() gives one the cursor position - after adding appropriate offsets. thanks, -vivek --~--~-~--~~~---~--~~ 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] Hooking into an Incoming or Outgoing Call
Hello, I was wondering how to get a toast to pop up (or broadcast an intent) when receiving an incoming/outgoing call. Currently, I have 2 solutions, but I don't know if they're good - albeit one of them sort of works. Solution 1: --- Define a class that extends PhoneStateListener, and also has a Context member variable. So when I create my CustomPhoneStateListener class, I can just pass in the current context (e.g. myActivity.this) and then do the TelephonyManager.listen() thing. This solution works (it allows me to create Toast messages and to broadcast intents), but I don't know if passing myActivity.this context into my CustomPhoneStateListener class is a good idea. Solution 2: --- In this article: http://groups.google.com/group/android-developers/browse_thread/thread/faec71c4ae854271/863b4933b64288af?lnk=gstq=PhoneStateListener+contextutoken=NVF2MTUAAACwwFf96muIoaCUrXmA7_-MWVL371GGq1XIhUq6Q2-xET611MdJTlwC385T8DmntyzHKTO24aHzKC44Y5MO9bT5 it mentions something about a PHONE_STATE_CHANGED intent, but I can't seem to find any documentation about it anywhere. If this exists, would this be a better solution? Also, could someone point me to a website, or in a general direction? Thanks and regards. --Mark --~--~-~--~~~---~--~~ 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] Javailmail port for Android
Hi I've read several posts regarding Javamail lib running on Andoid but I haven't manage so far to make either Sun or Gnu Javamail to run on Android : it looks a bit complicated for me to strip out the unused classes (eg. awt dependencies). Is there anybody that could send a running package for Android ? Or give a clear list of adaptations to be made on Javamail package ? I only need to send a text email (no attachment) over SMTP/TLS (gmail). Thanks in advance for your help Pascal --~--~-~--~~~---~--~~ 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] extra wallpapers
In the launcher application res/values directory, there is a file named extra_wallpapers.xml, but I have no idea what to do so that I could add more wallpapers to the application? the xml is almost empty, is there any doc or example as reference? --~--~-~--~~~---~--~~ 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 share files shareUserId
Hi, I’m questioning about the shareUserId property and the best approach to share files among applications (around 1Mo compressed). More particularly, I’m interested to know what types of files are covered with this flag, and which use cases are supported? For example, does this flag allow an application M to access a file of an application A: - located among its source code (i.e. that can be access from the latter with getClass().getResourceAsStream(name) code) ? - located in its res/raw directory (i.e. that can be access from the latter with the getResources().openRawResource(getResources ().getIndentifier(name, type, package)). - located in its assets directory - located anywhere else (to be determined) In fact, even if the activity M is started by the activity A, the use of the extras of the Intent is not acceptable because of the size of the files. Finally, I read that another way to share files is to use a specialization of the class android.content.ContentProvider. Using this class with the appropriate permissions (Is it the shareUserId property?), would allow the application A to copy all its resource files into a directory (with the Uri: content://) and thus access them from M. But this approach would result in duplicating those resources files. So, is there a way to avoid this? Thanks for your 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] Displaying large Gif Images
I have the following method to display a bit map InputStream is = null ; try { Bitmap bm; is = getContext().getContentResolver().openInputStream( uri); BitmapFactory.Options opt = new BitmapFactory.Options(); opt.inJustDecodeBounds = true; BitmapFactory.decodeStream(is, null, opt); Display d; WindowManager wm = (WindowManager) getContext ().getSystemService( Context.WINDOW_SERVICE); d = wm.getDefaultDisplay(); int h = d.getHeight(); int w = d.getWidth(); opt.inSampleSize = 1 ; while ( (opt.outWidth/opt.inSampleSize) w || opt.outHeight/opt.inSampleSize) h) { opt.inSampleSize = 1 ; } opt.inJustDecodeBounds = false; bm = BitmapFactory.decodeStream(is, null, opt); super.setImageBitmap(bm); } catch (IOException e) { //Error }finally { if (null != is) { try { is.close(); } catch (Exception e) { //Can't do anything } } } It works fine for all(any Size) jpeg, png, bmp images. But it always through a OutOfMemory exception for a GIF(single frame) image larger than 5MB. Has anybody faced this problem or is there a solution for this. PS: I am using cupcake version of android. Thanks, With Regards Muniraju --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Issue to connect at IMAP4 server with Anrdoid
Hi everybody I have a project, it's to connect Android at IMAP4 serveur with eclipse. . Here my .java file: package com.connectionimapandroid; import java.util.Properties; import javax.mail.MessagingException; import javax.mail.Session; import javax.mail.Store; import android.app.Activity; import android.os.Bundle; import android.util.Log; public class ConnectImapAndroid extends Activity { /** Called when the activity is first created. */ private static final String TAG = MyActivity; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // setContentView(R.layout.main); String host=, username=.., password=..; // initialisation des paramètres du systéme Properties props = new Properties(); props.setProperty(mail.transport.protocol, imap); // Spécification du serveur mail IMAP props.put(mail.imap.port, 143); props.put(mail.imap.host, host); // Récupère la session Session session = Session.getDefaultInstance(props, null); try{ // Get a Store object Store store = session.getStore(imap); Log.v(TAG, Connection: Avant le store.connect); // Connection au serveur IMAP store.connect(host, username, password); Log.v(TAG, Connection: Après le store.connect); // Close the Store store.close(); } catch(MessagingException mex) { //mex.printStackTrace(); Log.e(TAG, Connection: Exception Error= + mex); } } } Next I add on the next ligne under the AndroidManifest.xml file to do note have permission denied (maybe missing INTERNET permission): uses-permission android:name=android.permission.INTERNET / ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.connectionimapandroid android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.ConnectImapAndroid android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application uses-sdk android:minSdkVersion=3 / uses-permission android:name=android.permission.INTERNET / /manifest My code run in the consol java but note in android package test; import java.util.Properties; import javax.mail.MessagingException; import javax.mail.Session; import javax.mail.Store; public class ImapClient { public static void main(String[] args){ String host=129.227.81.35, username=33646111214, password=5034207548944431280; // initialisation des paramètres du systéme Properties props = new Properties(); props.setProperty(mail.transport.protocol, imap); // Spécification du serveur mail IMAP props.put(mail.imap.port, 143); props.put(mail.imap.host, host); // Récupère la session Session session = Session.getDefaultInstance(props, null); try{ // Get a Store object Store store = session.getStore(imap); // Connection au serveur IMAP store.connect(host, username, password); System.out.println(CONNECTION REUSSI ); // Close the Store store.close(); } catch(MessagingException mex) { System.out.println(Failed, exception: + mex); } } } Et ça fonctionne très bien avec la console java !!! Problème, avec l'émulateur d'android (affichage sur l'émulateur android) il me met une erreur: The application Connection Imap Android (process com.connectionimapandroid) has stopped unexpectedly. please try again Error here in the Log window : 7-15 12:32:46.328: ERROR/dalvikvm(863): Could not find method javax.activation.DataHandler.getName, referenced from method javax.mail.internet.MimeUtility.getEncoding 07-15 12:32:46.328: WARN/dalvikvm(863): VFY: unable to resolve virtual method 1819: Ljavax/activation/DataHandler;.getName ()Ljava/lang/ String; 07-15 12:32:46.328: WARN/dalvikvm(863): VFY: rejecting opcode 0x6e at 0x0004 07-15 12:32:46.328: WARN/dalvikvm(863): VFY: rejected Ljavax/mail/ internet/MimeUtility;.getEncoding (Ljavax/activation/DataHandler;) Ljava/lang/String; 07-15 12:32:46.328: WARN/dalvikvm(863): Verifier rejected class Ljavax/ mail/internet/MimeUtility; 07-15 12:32:46.328: DEBUG/AndroidRuntime(863): Shutting down VM 07-15 12:32:46.328: WARN/dalvikvm(863): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 07-15 12:32:46.338: ERROR/AndroidRuntime(863): Uncaught handler: thread main exiting due to uncaught exception 07-15 12:32:46.349: ERROR/AndroidRuntime(863): java.lang.VerifyError: javax.mail.internet.MimeUtility 07-15 12:32:46.349: ERROR/AndroidRuntime(863): at com.sun.mail.imap.protocol.IMAPProtocol.init(IMAPProtocol.java:116) 07-15 12:32:46.349: ERROR/AndroidRuntime(863): at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:578) 07-15 12:32:46.349: ERROR/AndroidRuntime(863): at javax.mail.Service.connect(Service.java:291) 07-15 12:32:46.349: ERROR/AndroidRuntime(863): at javax.mail.Service.connect(Service.java:172) 07-15 12:32:46.349: ERROR/AndroidRuntime(863): at
[android-developers] how to find out the percentage of memory used by each process in the android
Hi all, I want to calculate the performance for some of the task/process. How to find out the percentage of memory used by each process in the android. - is there any in build class\process to do this? Thanks and Regards Aravinda --~--~-~--~~~---~--~~ 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] frame buffer in Android
Hi, In Linux, we can get the framebuffer directly by open(/dev/fb0, O_RDWR); Is there any way I can call the similar fuction via JNI in Android or how can I access the frame buffer directly in Android? Thanks. -M --~--~-~--~~~---~--~~ 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] Adding new format to OpenCore
Hi! I am trying to add flash (flv) support to openCORE, i found some hints in this forum but still there are many things that unclear. I would like in the beginning to play local .flv file,from SDCARD, without streaming. As i understand i need to implement Parser within fileformats, parser node and recognizer and register it with player engine, and of cause add h.263 Sorenson codec. Can someone point me to the information on the data flow from the main Player Engine to the parser node, what API is used,? How will parser node send the data to the Codec Engine? Which parts will i have to add to enable streaming later? I also looked inside the documentation within opencore but did not find relevant information, perhaps i missed something and someone can point me to where should i look. Regards, Boris --~--~-~--~~~---~--~~ 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] content Uris built by Uri.Builder causing crashes
my app needs to edit Uris before presentation to ContentResolver and i'm seeing some weird behaviour with Uris built using Uri.Builder. here's some code. contentURI1 is built using the Builder -- Uri.Builder builder = new Uri.Builder (); builder.scheme (content); builder.authority (inURI.getAuthority ()); builder.path (inURI.getPath ()); Uri contentURI1 = builder.build (); contentURI2 is built using a hardcoded content URI and the ID -- String path = inURI.getPath (); int lastSlashIndex = path.lastIndexOf ('/'); String idString = path.substring (lastSlashIndex + 1); Uri contentURI2 = ContentUris.withAppendedId (MediaStore.Video.Media.EXTERNAL_CONTENT_URI, Long.parseLong (idString)); i log the two of them -- contentURI1 is content://media/external/video/media/1 contentURI2 is content://media/external/video/media/1 check they're equal -- contentURI1.equals (contentURI2) is true contentResolver.delete() on contentURI2 works. if i call delete() on contentURI1, then i get a crash -- java.lang.NullPointerException at android.net.Uri$HierarchicalUri.writeToParcel(Uri.java:1117) at android.content.ContentProviderProxy.delete(ContentProviderNative.java:376) at android.content.ContentResolver.delete(ContentResolver.java:526) of course i have a workaround, but it requires me to hardcode the content URI, and ideally this piece of code would be content neutral. (i created a brand new gmail account just for android developers. let's see whether the list likes this one...) thanks for any help with this, -- jason.software.particle --~--~-~--~~~---~--~~ 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] Google market(vending.apk)
I installed the vending.apk to emulator, but it shows:install failed missing shared library how to solve this problem? Thank you! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] File Browser Integration
Hi, I want to integrate a file browser with my application. Does anyone know where I could get the source code for a pretty good file browser? (With the developer's permission of course). The more, the better... Thanks, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to use adb tool on SAMSUNG GALAXY?
That are quite good news. I always have the Samsung Galaxy phone and planned to do some development using it. I really hope it will not take too long to get this SDK update. On 14 Jul., 18:11, David Turner di...@android.com wrote: You need a different version of ADB to access this phone at the moment. A future release of the SDK will provide an ADB binary that should be able to do that, but this is not available yet as far as I know. You're quite on the bleeding edge, aren't you ;-) On Tue, Jul 14, 2009 at 6:05 PM, legerb drim...@gmail.com wrote: Hey, I just got this device too. Trying to figure out how to debug on device too. According this http://groups.google.com/group/android-beginners/browse_thread/thread... Samsung have their own adb. Please update the thread if you've got any progress :) thanks ahead! On Jul 11, 10:54 pm, da yang daboil...@googlemail.com wrote: Hi i got this new mobilephone this week in Germany, wanted to debug my program on the device. but it doesn't work, c:\adbdevices lists no device attached, though i have tried to change the android_usb.inf in order to install the usb driver from SDK. i added some entries as follows: under [Google.NTx86] ; HTC DREAM ... ; SAMSUNGGALAXY %USB\VID_04E8PID_6640. DeviceDescRelease%=androidusb.Dev, USB \VID_04E8PID_6640 %USB\VID_04E8PID_6640MI_01.DeviceDescRelease%=androidusb.Dev, USB \VID_04E8PID_6640MI_01 %USB\VID_04E8PID_6640.DeviceDescRelease%=androidusb.Dev, USB \VID_04E8PID_6640 and [Strings]: USB\VID_04E8PID_6640.DeviceDescRelease=SAMSUNGGALAXY USB\VID_04E8PID_6640MI_01.DeviceDescRelease=SAMSUNGGALAXY CompositeADBInterface USB\VID_04E8PID_6640.DeviceDescRelease=SAMSUNGGALAXYBootloader i got only one VID and one PID through USBVIEW, though for HTC DREAM there are different PIDs used. Theadbinterface got installed, butadbjust didn't work. later i also tried to use the device under linux, set up the device as in Dev guide: If you're developing on Ubuntu Linux, you need to add a rules file: 1. Login as root and create this file: /etc/udev/rules.d/51- android.rules. For Gusty/Hardy, edit the file to read: SUBSYSTEM==usb, SYSFS{idVendor}==0bb4, MODE=0666 For Dapper, edit the file to read: SUBSYSTEM==usb_device, SYSFS{idVendor}==0bb4, MODE=0666 2. Now execute: chmod a+rx /etc/udev/rules.d/51-android.rules adbdevices listed nothing as well. : ( open a terminal on the device, with ps, i guess theadbdaemon adbd is running. but theadbtool just doesn't work. Can someone help me? thanks da --~--~-~--~~~---~--~~ 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: Any updates on ADC-2?
Are applications using NDK (written in native code) eligible? On Jul 14, 5:21 am, David M. d...@google.com wrote: We've posted an update onADC2 to the official Android blog: http://android-developers.blogspot.com/2009/07/adc-2-updates.html Key points to highlight: 1. Final deadline for submissions is August 31 2. The official terms and conditions are available (seehttp://code.google.com/android/adc/adc2_terms.html) 3. We've clarified eligibility of applications. To be specific, applications that are available on Android Market before August 1, 2009 will not be eligible to participate in the contest. Thus, open source projects are eligible so long as the app itself is not made available on the Android Market prior to August 1. Enjoy, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Build Contact Stand Alone apk - from Android Contact Source Code?
Hi Mark, Thanks for the response. Mark wrote: If you are trying to make a separate installable application, remove all functionality from the code that relies upon classes not in the SDK. Yes that's exactly what I am trying to do. As suggested, If i remove all the internal api calls (mentioned in my previous mail), I may have to compromise / even break some of the functionality of Contacts app. I am trying to add more features to the existing contacts app, without loosing any of existing contacts functionality. Is it possible? Well this is what my intended direction, where I am heading, without knowing if that is possible. Thanks, Shibbs On Jul 15, 8:14 pm, Mark Murphy mmur...@commonsware.com wrote: Shibbs wrote: I am trying to create a separate Contacts stand alone App using the existing android contacts source code, once that done I intend to add some more features ( code ) to contacts source make a contacts.apk out of it. Is it possible? Not without a lot of work. The problem I faced was, when I pulled the contacts app source code, there were many internal api calls Private api references. I tried to resolve them by including those internal api source code class files(available from the android source code) in my project, but there are still many errors internal api calls, which I am not sure how to resolve them like: import android.os.ServiceManager android.provider.Gmail android.provider.Im android.provider.Telephony acquireProvider(Uri) deleteRow() lookupProviderNameFromId(int) ISyncAdapter IContentProvider etc Is there a way to solve these internal API issue? Do not try to build that code as a separate project. The built-in applications, in general, are designed to be built as part of the firmware, not simply to the SDK. Can somebody lead me to a correct direction? You have not indicated what the direction is. If you are trying to assist with the Android open source project, and make patches to Contacts, do not pull it into a separate application. Rather, follow the instructions athttp://source.android.comto build firmware and make your changes that way. If you are trying to make a separate installable application, remove all functionality from the code that relies upon classes not in the SDK. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 0.9 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: File Browser Integration
There is no need to literally copy source code into your project. You can use intents to integrate a 3rd party file browser with your application, as described here: http://www.openintents.org/en/node/159 see section Information for developers Peli www.openintents.org On Jul 14, 8:20 pm, johnny johnny.ra...@gmail.com wrote: Hi, I want to integrate a file browser with my application. Does anyone know where I could get the source code for a pretty good file browser? (With the developer's permission of course). The more, the better... 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: Issue to connect at IMAP4 server with Anrdoid
Dayn wrote: I'm don't know what I have to do !! The log told you what is wrong: 7-15 12:32:46.328: ERROR/dalvikvm(863): Could not find method javax.activation.DataHandler.getName, referenced from method javax.mail.internet.MimeUtility.getEncoding You are missing javax.activation.DataHandler, or at least its getName() method. You may be missing activation.jar or whatever JavaMail uses for that package. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 0.9 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] Wikitude API now available as beta
Hello, as you might have heard, our Wikitude API is now available to developers (in beta). to help unleash a wave of innovation within the Mobile AR design and development communities. Developers can build augmented reality apps without needing to build the AR engine. The camera screen will be watermarked during the beta phase. Developers can request the package by sending an E-Mail to developers (at)wikitude.me. The package consists of: - Java API itself - javadocs - a documentation - a sample application The sample app is explained at: http://www.youtube.com/watch?v=dxuJeMfDMFM Please let me know what you think. Suggestions are welcome. All the best, Philipp http://www.wikitude.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] ListActivity + CheckBox = bug ?
hello all , here is an issue that drives me crazy : I have a simple class that extends list activity , for each contact i have in my phone it adds a line to the list containing two checkboxes . It seems to work but when you check for example the first checkbox , and then you scroll the list down , some other contacts will be checked too like they are linked the one to the others. I simplified the code to the extrem minimum and i still have the same bug . here is the code , if someone know how to deal with that it would be really nice i spend half the day to try to find a solution to that . Thanks a lot Maaks [code] public class CtsList extends ListActivity { public void onCreate(Bundle icicle) { super.onCreate(icicle); Cursor C = getContentResolver().query (People.CONTENT_URI, null, People.NAME!='', null,People.NAME); startManagingCursor(C); String[] columns = new String[] {People.NAME}; int[] names = new int[] {R.id.row_entry}; SimpleCursorAdapter mAdapter = new SimpleCursorAdapter (this, R.layout.contactlist, C, columns, names); setListAdapter(mAdapter); } } [/code] and the XML file that represent each row : file name is row_entry.xml [code] ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=horizontal android:layout_width=fill_parent android:layout_height=40px android:gravity=left TextView android:id=@+id/row_entry android:layout_width=wrap_content android:layout_height=wrap_content android:maxLines=1 android:maxLength=20 android:textSize=9pt/ LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=horizontal android:layout_width=fill_parent android:layout_height=fill_parent android:gravity=right CheckBox android:id=@+id/chkbxSMS android:layout_width=wrap_content android:layout_height=fill_parent android:layout_marginRight=5px / CheckBox android:id=@+id/chkbxEMAIL android:layout_width=wrap_content android:layout_height=fill_parent / /LinearLayout /LinearLayout [/code] --~--~-~--~~~---~--~~ 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: ListActivity + CheckBox = bug ?
Maisonobe.A (MaaKs) wrote: here is an issue that drives me crazy : I have a simple class that extends list activity , for each contact i have in my phone it adds a line to the list containing two checkboxes . It seems to work but when you check for example the first checkbox , and then you scroll the list down , some other contacts will be checked too like they are linked the one to the others. I simplified the code to the extrem minimum and i still have the same bug . here is the code , if someone know how to deal with that it would be really nice i spend half the day to try to find a solution to that . You are not holding onto the checkbox states anywhere. Rows in a ListView usually get recycled, meaning that when you scroll, Android does not create a brand-new row, but rather updates an existing row with new data. Since you are not doing anything to manage the contents of your checkboxes, Android is ignoring them, giving you the random checked effect you are seeing. If you are going to put stateful widgets in list rows, like checkboxes or RatingBar, you need to track those values and set/reset them yourself. Here is an excerpt from _The Busy Coder's Guide to Android Development_ that covers this, though bear in mind that it uses RatingBar where you will need to use checkboxes: http://commonsware.com/Android/excerpt.pdf -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 0.9 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: ItemizedOverlays Complications
This post might be of some help: http://groups.google.com/group/android-developers/browse_thread/thread/38b11314e34714c3 On Jul 9, 9:09 pm, aspekt9 aspe...@gmail.com wrote: I have a MapView which utilizes andItemizedOverlayto draw map markers to the map. The application stores the markers for later use in a database and in the mOverlays OverlayItem ArrayList. This works fine for adding new items, but removing items from the ArrayList shrinks the arraylist and throws off the indexes.. I tried to circumvent this by using a regular OverlayItem Array but then I run into the issue of not being able to create a dynamic array to support the ever changing amount of items. How can I get around this so the indexes are always constant and the onTap method works properly when adding AND removing items? --~--~-~--~~~---~--~~ 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] WebView and HTTP Post requests
So I'm attempting to connect to the Tumblr Dashboard using an HTTP Post. The Activity uses a WebView and I do an http post after creating the webview, but the redirect_to in the HTTP Post doesn't work with the WebView. I know my post works and isn't throwing errors, however I need the HTTP Post to work with the webview and am completely lost on how to. private void setupWebView() { webView = new WebView(this); setContentView(webView); webView.setWebViewClient(new OverriddenWebClient()); webView.getSettings().setBuiltInZoomControls(true); webView.getSettings().setJavaScriptEnabled(true); loginTumblrDashboard.start(); webView.loadUrl(http://www.tumblr.com/iphone;); } private Thread loginTumblrDashboard = new Thread(){ public void run(){ // Create a new HttpClient and Post Header HttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(http://www.tumblr.com/login;); try{ //add the needed strings to and ArrayList for posting to tumblr ListNameValuePair tumblr = new ArrayListNameValuePair(3); tumblr.add(new BasicNameValuePair (email,kaiserollofd...@gmail.com)); tumblr.add(new BasicNameValuePair(password,sh1n0b1)); tumblr.add(new BasicNameValuePair(redirect_to,/iphone)); //set the HtppPost entity httpPost.setEntity(new UrlEncodedFormEntity(tumblr)); //execute the post HttpResponse mResponse = httpClient.execute(httpPost); } catch(Exception e){ e.printStackTrace(); } } }; --~--~-~--~~~---~--~~ 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: ListActivity + CheckBox = bug ?
Take a look at ListView's choiceMode. It lets you use checkboxes on list items. On Jul 15, 2009 8:58 AM, Mark Murphy mmur...@commonsware.com wrote: Maisonobe.A (MaaKs) wrote: here is an issue that drives me crazy : I have a simple class tha... You are not holding onto the checkbox states anywhere. Rows in a ListView usually get recycled, meaning that when you scroll, Android does not create a brand-new row, but rather updates an existing row with new data. Since you are not doing anything to manage the contents of your checkboxes, Android is ignoring them, giving you the random checked effect you are seeing. If you are going to put stateful widgets in list rows, like checkboxes or RatingBar, you need to track those values and set/reset them yourself. Here is an excerpt from _The Busy Coder's Guide to Android Development_ that covers this, though bear in mind that it uses RatingBar where you will need to use checkboxes: http://commonsware.com/Android/excerpt.pdf -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 0.9 Available! --~--~-~--~~~---~--~~ You received this message because you are sub... --~--~-~--~~~---~--~~ 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: Build Contact Stand Alone apk - from Android Contact Source Code?
Ah sad ending to our over enthu project: For the past few days, I have been searching like mad, like many other developers from past who were trying to achieve something similar. But, it was not very clear that we won't be able to do, with all respect to your below comment I am stopping further development in this regard. Thanks once again! - Shibbs On Jul 15, 8:37 pm, Mark Murphy mmur...@commonsware.com wrote: Shibbs wrote: As suggested, If i remove all the internal api calls (mentioned in my previous mail), I may have to compromise / even break some of the functionality of Contacts app. Correct. I am trying to add more features to the existing contacts app, without loosing any of existing contacts functionality. Is it possible? Not without changes to the firmware to make the missing classes become part of the SDK. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 0.9 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: WebView and HTTP Post requests
DGupta wrote: So I'm attempting to connect to the Tumblr Dashboard using an HTTP Post. The Activity uses a WebView and I do an http post after creating the webview, but the redirect_to in the HTTP Post doesn't work with the WebView. I know my post works and isn't throwing errors, however I need the HTTP Post to work with the webview and am completely lost on how to. HttpClient and WebView are completely separate engines. Operations done in one will not affect the other. If the Tumblr POST is setting a session cookie or something, you may be able to get that out of the HttpClient cookie jar and feed it to WebView, but I have not tried that. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ListActivity + CheckBox = bug ?
ok i'll try that out , thank you very much !! what i don't understand through is that each checkbox have it's own checked value wich should be used by android when repaint is called ... cheers On Jul 15, 5:58 pm, Mark Murphy mmur...@commonsware.com wrote: Maisonobe.A (MaaKs) wrote: here is an issue that drives me crazy : I have a simple class that extends list activity , for each contact i have in my phone it adds a line to the list containing two checkboxes . It seems to work but when you check for example the first checkbox , and then you scroll the list down , some other contacts will be checked too like they are linked the one to the others. I simplified the code to the extrem minimum and i still have the same bug . here is the code , if someone know how to deal with that it would be really nice i spend half the day to try to find a solution to that . You are not holding onto the checkbox states anywhere. Rows in a ListView usually get recycled, meaning that when you scroll, Android does not create a brand-new row, but rather updates an existing row with new data. Since you are not doing anything to manage the contents of your checkboxes, Android is ignoring them, giving you the random checked effect you are seeing. If you are going to put stateful widgets in list rows, like checkboxes or RatingBar, you need to track those values and set/reset them yourself. Here is an excerpt from _The Busy Coder's Guide to Android Development_ that covers this, though bear in mind that it uses RatingBar where you will need to use checkboxes: http://commonsware.com/Android/excerpt.pdf -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 0.9 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: Build Contact Stand Alone apk - from Android Contact Source Code?
Shibbs wrote: Ah sad ending to our over enthu project: For the past few days, I have been searching like mad, like many other developers from past who were trying to achieve something similar. But, it was not very clear that we won't be able to do, with all respect to your below comment I am stopping further development in this regard. Your work will probably still be valued in improving the built-in Android Contacts application, if you wish to pursue that course. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---