[android-developers] Re: Button placement problems
Thanks for the response. Yeah the centered_vertical is not necessary. I put because I was wondering whether I can o a margin from the center of the screen. For the second question - yes I need the space. The B1 should be placed below the center of the screen, and B2 and B3 should be in the bottom right/left corner of the screen. I figured out that B2 and B3 can also be placed by relativeLayot with aligning to bottom- right\left. But still B1 is a problem. I am using Samsung i5700 (Android 1.5), and Acer liquid E (android 2.1). Btw. Daniel are you from Poland? If so: Dzięki za odpowiedź : -- You received this message because you are subscribed to the Google 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] Placing DB to webserver or phone for LBS
I am creating LBS (android application) as a FYP. Help me where i put the database of my application in a web server(using MYSQL) or in android (My application using SQL Lite). The Poi's are huge so what i think sqlite will take time to filter it. is it well to put the database into web server so than my application send request to the server and than the server will do all the filtration and respond the application back with data in JSON or XML format. Regards, - Faheem Khatri -- You received this message because you are subscribed to the Google 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 capture unlock event in activity.
Hi, For this purpose, you need to override the onResume method. Unlock is irrelevant here. Review the Activity life cycle for better understanding what is going on: http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle Hope this helps. Regards Sarwar Erfan On Dec 1, 10:13 am, Milind Bhusari milindbhusar...@gmail.com wrote: Hi, While mediaplayer playing rtsp stream if user press lock button and then he press menu(unlock) mediaplayer shows blank screen. I want to know how to capture this unlock event inside activity so that i can resume mediaplayer. -- You received this message because you are subscribed to the Google 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: Placing DB to webserver or phone for LBS
Hi, Put it in webserver and make it accessible via some web service (as you have planned). Think of situations if in future you have to update the data (which is quite certain). In that case, you update in your server and the user gets updated information without updating their android application. But, if your POI dataset is fixed and not likely to be changed, your users want to use them offline then you can put that on device. I am not sure about your app, but as it is using POI, it might be using map also, then most probably your maps are coming from the internet. In that case, there is no harm getting the POI's online from server. My suggestion is to put the POI data online. Regards Sarwar Erfan On Dec 1, 2:13 pm, Faheem Khatri faheemkhatr...@gmail.com wrote: I am creating LBS (android application) as a FYP. Help me where i put the database of my application in a web server(using MYSQL) or in android (My application using SQL Lite). The Poi's are huge so what i think sqlite will take time to filter it. is it well to put the database into web server so than my application send request to the server and than the server will do all the filtration and respond the application back with data in JSON or XML format. Regards, - Faheem Khatri -- You received this message because you are subscribed to the Google 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] ListView elements not clickable in all area
Hi at all, I am developing an application which make an intensive use of ListView with different type of rows, for do this I have extended the BaseAdapter class and override its methods, the layout of ListView is very simple: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:clickable=true ListView android:id=@+id/categorieslist android:layout_width=wrap_content android:layout_height=wrap_content / /LinearLayout The first type of row XML is already simple: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:padding=6dip ImageView android:id=@+id/category_image android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:layout_marginRight=20dip android:src=@drawable/icon / TextView android:id=@+id/category_name android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:singleLine=true / /LinearLayout Not all the entire area of the rows is clickable but only the area covered by the ImageView and TextView, and this is my issues.. What's wrong? -- You received this message because you are subscribed to the Google 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: sectionindexer is not updated when adapter's data is changed
Hi, Look in the code of AlphabetIndexer which implements SectionIndexer as well. http://www.google.com/codesearch/p?hl=en#uX1GffpyOZk/core/java/android/widget/AlphabetIndexer.javaq=alphabetindexersa=Ncd=1ct=rc I think the function you're interested in is setCursor. Good luck. Mor. www.contapps.com On Nov 4, 1:14 pm, manigault manig...@gmail.com wrote: Hi all , I have ListView with adapter class which extends ArrayAdapter and implementsSectionIndexer. The problem is section indexer is not updated when adapter data is changed. Even if i add new elements the section remain the same. I tried some options setFaseScrollEnabled(false); setFaseScrollEnabled(true); but i got IndexOutOfBounds exception. So how can i updatesectionIndexerwhen adapter's data is changed. -- You received this message because you are subscribed to the Google 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: ListView elements not clickable in all area
Hi Pedro, Try android:descendantFocusability=blocksDescendants in the LinearLayout of the row xml. Info: http://developer.android.com/reference/android/view/ViewGroup.html#attr_android:descendantFocusability Regards Sarwar Erfan On Dec 1, 2:58 pm, pedr0 pulsarpie...@gmail.com wrote: Hi at all, I am developing an application which make an intensive use of ListView with different type of rows, for do this I have extended the BaseAdapter class and override its methods, the layout of ListView is very simple: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:clickable=true ListView android:id=@+id/categorieslist android:layout_width=wrap_content android:layout_height=wrap_content / /LinearLayout The first type of row XML is already simple: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:padding=6dip ImageView android:id=@+id/category_image android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:layout_marginRight=20dip android:src=@drawable/icon / TextView android:id=@+id/category_name android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:singleLine=true / /LinearLayout Not all the entire area of the rows is clickable but only the area covered by the ImageView and TextView, and this is my issues.. What's wrong? -- You received this message because you are subscribed to the Google 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: Detect OSK shown / hidden events
Hi Dianne, I have overridden the fullscreen mode by adding android:imeOptions=flagNoExtractUi to my EditText. What we're trying to do (or to be exact what our designers demand) is that when clicking an EditText in the UI we will zoom it in nicely and smoothly. We have the animation nailed down (with translation matrix) but we're having big difficulties hooking in zoom in /o out animation starts so that it will work on all platforms (with or without HW keyboard) consistently. I would love to see a way top subscribe to HW / OS keyboard open or closing events more easily. Until now I haven't found any way of doing that. Configuration object seems to give same values regardless what the OSK state is. Am I doing something wrong? Or is what I'm trying to do simply impossible? In that case I should let our designers know that they should find an alternative approach. Cheers, Juhani On Dec 1, 5:34 am, Dianne Hackborn hack...@android.com wrote: There would be no purpose in showing an animation when your size doesn't change, because what is happening is the IME is opening in full-screen mode and completely covering your app. -- You received this message because you are subscribed to the Google 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: ListView elements not clickable in all area
Also, android:clickable=true for the row layout. You might also be interested to make the individual children or a row not clickable. Regards Sarwar Erfan On Dec 1, 3:12 pm, Sarwar Erfan erfanonl...@gmail.com wrote: Hi Pedro, Try android:descendantFocusability=blocksDescendants in the LinearLayout of the row xml. Info:http://developer.android.com/reference/android/view/ViewGroup.html#at... Regards Sarwar Erfan On Dec 1, 2:58 pm, pedr0 pulsarpie...@gmail.com wrote: Hi at all, I am developing an application which make an intensive use of ListView with different type of rows, for do this I have extended the BaseAdapter class and override its methods, the layout of ListView is very simple: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:clickable=true ListView android:id=@+id/categorieslist android:layout_width=wrap_content android:layout_height=wrap_content / /LinearLayout The first type of row XML is already simple: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:padding=6dip ImageView android:id=@+id/category_image android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:layout_marginRight=20dip android:src=@drawable/icon / TextView android:id=@+id/category_name android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:singleLine=true / /LinearLayout Not all the entire area of the rows is clickable but only the area covered by the ImageView and TextView, and this is my issues.. What's wrong? -- You received this message because you are subscribed to the Google 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: ListView elements not clickable in all area
Each solution doesn't work... Is an absurd behavior I think, but if I set android:clickable=true for the row layout I cannot select any item (??!) On 1 Dic, 10:15, Sarwar Erfan erfanonl...@gmail.com wrote: Also, android:clickable=true for the row layout. You might also be interested to make the individual children or a row not clickable. Regards Sarwar Erfan On Dec 1, 3:12 pm, Sarwar Erfan erfanonl...@gmail.com wrote: Hi Pedro, Try android:descendantFocusability=blocksDescendants in the LinearLayout of the row xml. Info:http://developer.android.com/reference/android/view/ViewGroup.html#at... Regards Sarwar Erfan On Dec 1, 2:58 pm, pedr0 pulsarpie...@gmail.com wrote: Hi at all, I am developing an application which make an intensive use of ListView with different type of rows, for do this I have extended the BaseAdapter class and override its methods, the layout of ListView is very simple: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:clickable=true ListView android:id=@+id/categorieslist android:layout_width=wrap_content android:layout_height=wrap_content / /LinearLayout The first type of row XML is already simple: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:padding=6dip ImageView android:id=@+id/category_image android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:layout_marginRight=20dip android:src=@drawable/icon / TextView android:id=@+id/category_name android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:singleLine=true / /LinearLayout Not all the entire area of the rows is clickable but only the area covered by the ImageView and TextView, and this is my issues.. What's wrong? -- You received this message because you are subscribed to the Google 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: LocationListener sometimes not receiving updates from network provider
Hi Geoff, Thanks for your valuable comments - I am relieved that it is not just me going crazy (: I will be logging WIFI status and asking my users to enable WIFI if they have problems. I will also log the phone model. Will let you know when I get some more data. Cheers, Michael. On Dec 1, 12:52 am, Funksta geoff.sim...@gmail.com wrote: Ok, I turned on my wifi connection, and now it got the location. I then turned off my wifi connection and it still works. So I suspect that by enabling wifi, it somehow allowed the network location to get cached. Why doesn't it get set when I'm on 3G (or other cell based) network connections? -Geoff On Nov 30, 4:30 pm, Funksta geoff.sim...@gmail.com wrote: I have also noticed this same problem. When I register just the NETWORK_PROVIDER for updates, I never see them come in. When I try to use getLastKnownLocation(NETWORK), I get a null location. It seems like thenetworkprovider just isn't working on my phone. I have checked my settings and stopped/started thenetworklocation. I have a MyTouch 3G that recently was upgraded to 2.2.1 Is this a bug just on my phone? Is it a 2.2.1 problem? Somebody please help illuminate the situation. I can register for updates with GPS fine, it's justnetworkthat has the problem. -Geoff On Nov 30, 2:53 pm, ip332 iprile...@gmail.com wrote: IMHO getProvider(LocationManager.NETWORK_PROVIDER) should return null only in two cases: 1. AIRPLANE mode. 2. In case of GSM phone when SIM card is missing and WiFI is disabled However I tested both cases on Milestone phone (Android 2.1-update1) and always got some not-null result :( The only possibility left is that user uses hacked phone, i.e. some app which disablesNetworkprovider or LocationService removed at all. Mistery :) On Nov 30, 2:01 pm,michaelmichael.d.peder...@googlemail.com wrote: Hi again Igor, Thanks for your excellent suggestions, I will work on it over the next couple of days. As another curiosity, I am experiencing a very small number of cases where LocationManager.getProvider(LocationManager.NETWORK_PROVIDER) returns null. Apparently some phones do not have this capability. Best, Michael. On Nov 30, 7:57 pm, ip332 iprile...@gmail.com wrote: One more thing: check how and when do you remove listener. On Nov 30, 11:52 am, ip332 iprile...@gmail.com wrote: Michael Here are some suggestions: 1. Additional logging: mCoarseLocationListener details, WiFi status, cell signal status (may be in those 5% cases users don't have any signal?) 2. Get details from users about phone models, running applications and Android versions. Recently I found interesting feature on Motorola phone: sensors do not report events unless the values have been changed - this is a violation of the Android API. May be somewhat similar happens with respect to thenetworklocation on some phones. 3. Add listener restart logic after a certain timeout, i.e. if you didn't getonLocationChanged() after a certain time stop the listener, create and start it again. 4. Get Android source code and study the LocationManager hierarchy. Probably the most complicated approach but I would start from here. Best regards Igor On Nov 30, 3:07 am,michaelmichael.d.peder...@googlemail.com wrote: Hi Igor, Thanks for your reply, it is much appreciated. Thanks also for pointing out the issues with the code I provided. However, this was merely a stripped-down outline of what I am doing. The use of mCoarseLocationListener is a type from the strip-down process, and I agree that the LocationProvider variable is not necessary. However, the problem remains that while the code works fine in 95% of cases, there are still 5% of cases where I never get a call to onLocationChanged. Any suggestions as to why this is the case would still be much appreciated. Best, Michael. On Nov 30, 12:29 am, ip332 iprile...@gmail.com wrote: Michael, According to Android documentation the following call locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, this); requests updates from WiFi or cellularnetworkwhich means you should get some update (from cell tower) even if WiFi location is not available. However, I've seen cases when Google map application failed to set map to MyLocation for several minutes while driving on a freeway. Back to your code. I think you need to replace getLastKnownLocation(mCoarseLocationProvider) with getLastKnownLocation(LocationManager.NETWORK_PROVIDER) - it is not clear where do you get mCoarseLocationProvider.
[android-developers] Re: ListView elements not clickable in all area
I have partially solved the problem: simple change to fill_parent the listview android:layout_width paramter, but now I have all the item of the listView aligned in center position and not on the left.. On 1 Dic, 10:32, pedr0 pulsarpie...@gmail.com wrote: Each solution doesn't work... Is an absurd behavior I think, but if I set android:clickable=true for the row layout I cannot select any item (??!) On 1 Dic, 10:15, Sarwar Erfan erfanonl...@gmail.com wrote: Also, android:clickable=true for the row layout. You might also be interested to make the individual children or a row not clickable. Regards Sarwar Erfan On Dec 1, 3:12 pm, Sarwar Erfan erfanonl...@gmail.com wrote: Hi Pedro, Try android:descendantFocusability=blocksDescendants in the LinearLayout of the row xml. Info:http://developer.android.com/reference/android/view/ViewGroup.html#at... Regards Sarwar Erfan On Dec 1, 2:58 pm, pedr0 pulsarpie...@gmail.com wrote: Hi at all, I am developing an application which make an intensive use of ListView with different type of rows, for do this I have extended the BaseAdapter class and override its methods, the layout of ListView is very simple: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:clickable=true ListView android:id=@+id/categorieslist android:layout_width=wrap_content android:layout_height=wrap_content / /LinearLayout The first type of row XML is already simple: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:padding=6dip ImageView android:id=@+id/category_image android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:layout_marginRight=20dip android:src=@drawable/icon / TextView android:id=@+id/category_name android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:singleLine=true / /LinearLayout Not all the entire area of the rows is clickable but only the area covered by the ImageView and TextView, and this is my issues.. What's wrong? -- You received this message because you are subscribed to the Google 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 review the app inside the app ; need not to go android market to rate app
On Nov 30, 8:33 pm, Shalini coolcool.shal...@gmail.com wrote: I have created an android app and i want to add review option inside the app. user need not to go to market ti rate the app. Can anyone please tell me how to do that. I think the best you can hope for is to give a direct link to your app's market presence and instruct the user to rate it there: Uri uri = Uri.parse(market://search?q=pname:your.package.name); Intent intent = new Intent(Intent.ACTION_VIEW, uri); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); -- You received this message because you are subscribed to the Google 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: What's the best way to have your app 'sleep' for N milliseconds?
On Nov 30, 7:50 am, Emanuel Moecklin 1gravity...@gmail.com wrote: I would recommend using something like: This was actually unnecessarily complex. There's no need to post a whole new runnable to a handler that, in turn, sends a message to the same handler. You can just send the delayed message to the handler and you're done. Doug -- You received this message because you are subscribed to the Google 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
Re: [android-developers] Re: ListView elements not clickable in all area
Pedro, How do you register for click events in this list view? You shouldn't need to play any tricks with clickable, focusable, etc. Also, layout_height=fill_parent is a pretty weird setting for a list view item layout. For item alignment control, set layout_gravity=left on the child views. -- Kostya 01.12.2010 12:44, pedr0 пишет: I have partially solved the problem: simple change to fill_parent the listview android:layout_width paramter, but now I have all the item of the listView aligned in center position and not on the left.. On 1 Dic, 10:32, pedr0pulsarpie...@gmail.com wrote: Each solution doesn't work... Is an absurd behavior I think, but if I set android:clickable=true for the row layout I cannot select any item (??!) On 1 Dic, 10:15, Sarwar Erfanerfanonl...@gmail.com wrote: Also, android:clickable=true for the row layout. You might also be interested to make the individual children or a row not clickable. Regards Sarwar Erfan On Dec 1, 3:12 pm, Sarwar Erfanerfanonl...@gmail.com wrote: Hi Pedro, Try android:descendantFocusability=blocksDescendants in the LinearLayout of the row xml. Info:http://developer.android.com/reference/android/view/ViewGroup.html#at... Regards Sarwar Erfan On Dec 1, 2:58 pm, pedr0pulsarpie...@gmail.com wrote: Hi at all, I am developing an application which make an intensive use of ListView with different type of rows, for do this I have extended the BaseAdapter class and override its methods, the layout of ListView is very simple: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:clickable=true ListView android:id=@+id/categorieslist android:layout_width=wrap_content android:layout_height=wrap_content / /LinearLayout The first type of row XML is already simple: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:padding=6dip ImageView android:id=@+id/category_image android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:layout_marginRight=20dip android:src=@drawable/icon / TextView android:id=@+id/category_name android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:singleLine=true / /LinearLayout Not all the entire area of the rows is clickable but only the area covered by the ImageView and TextView, and this is my issues.. What's wrong? -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Android Grid problem
1) Parse XML with urls for your images; 2) Your implementation how you will be download images (caching on SD or 2 way caching, or direct uri for View) On 26 Лис, 06:38, chamith weerasinghe e05ch...@gmail.com wrote: hi all I'm very new to android. I need to get some Image urls from a xml file on the web and load those images to a grid view. please explain me, how to do this. thanks chamith -- You received this message because you are subscribed to the Google 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: Displaying unicode in a TextView?
Thank you. I have checked the items that I am displaying, and all of them contain tags like this: meta http-equiv=Content-Type content=text/html; charset=utf-8/ In every case, the charset is specified as utf-8 or UTF-8. Apparently, this is not sufficient to cause the text to be interpreted as containing unicode. What can I do to ensure this? -- You received this message because you are subscribed to the Google 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 zoom camera through code
Hello guys, i have created a camera app, but here i dont want to capture the image. just i want to put some zoom control similar like we have on google map inbuilt zoom controls or any else. but i need a funcationality that the after clicking on button the camera should zoom the image.. i have just opened my camera through code and now i m able to see the preview of it. i have implemented the camera.setZoomChangeListener(new OnZoomChangeListener() { public void onZoomChange(int zoomValue, boolean stopped, Camera camera) { // TODO Auto-generated method stub } }); but what exactly should i need to do to achieve the same. 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] Re: how to review the app inside the app ; need not to go android market to rate app
Uri uri = Uri.parse(market://search?q=pname:your.package.name); Intent intent = new Intent(Intent.ACTION_VIEW, uri); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); If you go this way, don't forget to check there is a market intent available. I had a lot of FC's due to some device not having a market to handle such a link. Yahel -- You received this message because you are subscribed to the Google 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: ListView elements not clickable in all area
Thanks a lot guys, I solved, I have to change my rows layout using an RelativeLayout instead an LinearLayout! Kostya, I changed the ListView layout_width setting, not height, why is weird? On 1 Dic, 11:04, Kostya Vasilyev kmans...@gmail.com wrote: Pedro, How do you register for click events in this list view? You shouldn't need to play any tricks with clickable, focusable, etc. Also, layout_height=fill_parent is a pretty weird setting for a list view item layout. For item alignment control, set layout_gravity=left on the child views. -- Kostya 01.12.2010 12:44, pedr0 пишет: I have partially solved the problem: simple change to fill_parent the listview android:layout_width paramter, but now I have all the item of the listView aligned in center position and not on the left.. On 1 Dic, 10:32, pedr0pulsarpie...@gmail.com wrote: Each solution doesn't work... Is an absurd behavior I think, but if I set android:clickable=true for the row layout I cannot select any item (??!) On 1 Dic, 10:15, Sarwar Erfanerfanonl...@gmail.com wrote: Also, android:clickable=true for the row layout. You might also be interested to make the individual children or a row not clickable. Regards Sarwar Erfan On Dec 1, 3:12 pm, Sarwar Erfanerfanonl...@gmail.com wrote: Hi Pedro, Try android:descendantFocusability=blocksDescendants in the LinearLayout of the row xml. Info:http://developer.android.com/reference/android/view/ViewGroup.html#at... Regards Sarwar Erfan On Dec 1, 2:58 pm, pedr0pulsarpie...@gmail.com wrote: Hi at all, I am developing an application which make an intensive use of ListView with different type of rows, for do this I have extended the BaseAdapter class and override its methods, the layout of ListView is very simple: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:clickable=true ListView android:id=@+id/categorieslist android:layout_width=wrap_content android:layout_height=wrap_content / /LinearLayout The first type of row XML is already simple: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:padding=6dip ImageView android:id=@+id/category_image android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:layout_marginRight=20dip android:src=@drawable/icon / TextView android:id=@+id/category_name android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:singleLine=true / /LinearLayout Not all the entire area of the rows is clickable but only the area covered by the ImageView and TextView, and this is my issues.. What's wrong? -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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: How to user my layout
Dear Raju, What are you talking about it's very weird, an activity use a layout loaded with setContentView(), this XML file will be use to find the tag with findViewbyId(). If you don't want some attributes, simply don't declare it's inside the XML file, if you need to set some attributes at run-time set it by code. On 1 Dic, 08:19, Raju rajuma...@gmail.com wrote: Hi all How to use my custom layout properties in my activity , but i dont want it to appear in my screen, i just need to use findViewById to find each property , since all the properties are null , if am not going to use the setContentView(), method, but if i use this method all the attributes are loaded. Is there any solution for this problem, -- Thanks and Regards Raju .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] Contact API problem with save datas
Hello I'm facing a basic problem but i didn't find any tutorial in order to help me... I'm writing an application with sort of backup contact options. I want that my applications works for android phones since 1.5 to 2.2 So i write a two implementation of ContactApi, one for 1.5, 1.6 and an other for new api version. Here is the list of problem I'm facing with. With new api, nothing. All works fine, backing up contacts works well. But with older api I'm not able to backing up some datas : * Email Datas (able to read, but not able to save) * IM datas (able to read, but not able to save) * Notes (able to read the first note, if many notes, I lost datas, same things for backup) Here is the code I'm using : ===EMAIL=== private ArrayListEmail getEmailAddresses(String id) { ArrayListEmail emails = new ArrayListEmail(); Cursor emailCur = this.contentResolver.query(Contacts.ContactMethods.CONTENT_EMAIL_URI, null, Contacts.ContactMethods.PERSON_ID + = ?, new String[] { id }, null); Email email = null; while (emailCur.moveToNext()) { // This would allow you get several email addresses email = new Email(); email.setData(emailCur.getString(emailCur.getColumnIndex(Contacts.ContactMethods.DATA))); email.setType(emailCur.getInt(emailCur.getColumnIndex(Contacts.ContactMethods.TYPE))); email.setLabel(emailCur.getString(emailCur.getColumnIndex(Contacts.PeopleColumns.NAME))); emails.add(email); } emailCur.close(); return emails; } private void saveEmailAddresses(ContentUris contactUri, ListEmail emailList, String id) { if (emailList != null emailList.size() 0) { ContentValues values = null; ContentValues[] valueArray = new ContentValues[emailList.size()]; int i = 0; for (Email email : emailList) { values = new ContentValues(); values.put(Contacts.ContactMethods.PERSON_ID, id); // values.put(Contacts.ContactMethods.KIND, Contacts.KIND_EMAIL); // values.put(Contacts.ContactMethods.DATA, email.getData()); // values.put(Contacts.ContactMethods.TYPE, email.getType()); // values.put(Contacts.PeopleColumns.NAME, email.getLabel()); // valueArray[i] = values; i++; } contentResolver.bulkInsert(Contacts.ContactMethods.CONTENT_EMAIL_URI, valueArray); } } IM adress= private ArrayListIM getIM(Cursor cur, String id) { ArrayListIM imList = new ArrayListIM(); String where = Contacts.ContactMethods.PERSON_ID + = ? AND + Contacts.ContactMethods.KIND + = ?; String[] whereParameters = new String[] { id, String.valueOf(Contacts.KIND_IM) }; Cursor imCur = this.contentResolver.query(Contacts.ContactMethods.CONTENT_URI, null, where, whereParameters, null); IM im = null; while (imCur.moveToNext()) { try { String imName = imCur.getString(imCur.getColumnIndex(Contacts.ContactMethodsColumns.DATA)); im = new IM(); im.setName(imName); im.setType(imCur.getInt(imCur.getColumnIndex(Contacts.ContactMethodsColumns.TYPE))); im.setProtocol(cur.getString(imCur.getColumnIndex(Contacts.ContactMethods.AUX_DATA))); imList.add(im); } catch (Exception e) { Log.e(where, Error im : , e); } } imCur.close(); return imList; } private void saveIM(ListIM imList, String id) { if (imList != null imList.size() 0) { ContentValues values = null; ContentValues[] valueArray = new ContentValues[imList.size()]; int i = 0; for (IM im : imList) { values = new ContentValues(); values.put(Contacts.ContactMethods.PERSON_ID, id); // values.put(Contacts.ContactMethods.KIND, Contacts.KIND_IM); // values.put(Contacts.ContactMethodsColumns.DATA, im.getName()); // values.put(Contacts.ContactMethods.AUX_DATA, ContactMethods.encodeCustomImProtocol(im.getProtocol())); //
[android-developers] Re: Very simple query INTENT
1. Yes. 2. http://groups.google.com/group/android-beginners/browse_thread/thread/f11b306208970031 On 1 Dic, 07:18, Abhishek Talwar r.o.b.i.n.abhis...@gmail.com wrote: Hi guys I have two queries which should be really simple for you to handle :- 1. All the applications are stored in workspace. I want to call one application from another applications button on click listener. Is this possible using intents? 2. How can i pass data from one activity to another. I was making object of the activity but could not pass the data. I think there is something called Bundle which is to be added to intent. -- You received this message because you are subscribed to the Google 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: APK file package name
Ah, you beat me to the answer, excellent. But when checking my answer, I realized that there's no way that I can see to extract the original XML. 'xmltree' is a pain to decode, though I'm sure it's of great help to that one guy who maintains the XML encoding/decoding code! It would be easy to output equivalent XML with an 'aapt dump xml path/ to/apk e.g. res/layout/main.xml', there have been a number of times I would have found this very helpful - mostly to be sure I was debugging what I thought I was debugging! What I'd really like to see would be a .apk inspector integrated into Eclipse. It'd be great if it could also dive into class.dex and at least tell us what's there. I can't find a way to do this now? On Nov 29, 10:45 pm, Dianne Hackborn hack...@android.com wrote: aapt dump badging path/to/apk -- You received this message because you are subscribed to the Google 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] Launcher icon gets scaled on X10 Mini
Hi, I just got a Xperia X10 Mini running Android 1.6, and the launcher icon of my app is awfully scaled. I'm providing an ldpi icon, which strictly respects the icon guidelines, and after testing I can confirm that this ldpi icon is used in the launcher. But this 36x ldpi icon appears to be scaled to 48px. If I put a 48x icon, it is not scaled anymore and looks clean. But an ldpi icon is an ldpi icon and I don't want to break my app to be compatible with this device's bugs. Do you know of any workaround? PS: I know that Android 2.1 has recently been released by Sony, but I'd like to get it right on 1.6, because it's still widespread on these devices. -- Olivier -- You received this message because you are subscribed to the Google 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]
hi, if u want develop any android application pls contact me kcvine...@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] Re: Button placement problems
if you are using a relative layout with b2 b3 achored to the bottom left/right respectively - can you then declare b1 after these in the XML and align it above b2 -- You received this message because you are subscribed to the Google 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 in communicating from tabActivity to Child Activity
Hi All, I am creating a tab application with two tabs. In my TabActivity, I have a button if user clicks on it, i will fetch some data from the net and want to transfer it to the child activity of the tabs. Please help me in doing it. -- You received this message because you are subscribed to the Google 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
Re: [android-developers] Re: ListView elements not clickable in all area
01.12.2010 15:57, pedr0 пишет: Thanks a lot guys, I solved, I have to change my rows layout using an RelativeLayout instead an LinearLayout! Cool! Kostya, I changed the ListView layout_width setting, not height, why is weird? Your original message had height=fill_parent for the list item layout. Setting width to fill_parent is not weird, it's good, makes clicks work right :) -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Help needed for Context object: GPS implementation
My query is as it that at the time of starting GPS listener, I am sending context from one activity. Now If I have moved to some other activity then will I be able to use same GPS Listener which had been started from previous activity. if context object has relation with application and not with activity then it will be possible for me to listen from any actvity. So I want to know about Context object's relation with application or is it associated with the different component? On Nov 26, 2:56 am, TreKing treking...@gmail.com wrote: On Wed, Nov 24, 2010 at 3:02 AM, cool.manish mannishga...@gmail.com wrote: Can I start my GPS listener from one activity and can fetch coordinate in some other activity? You can start it in one activity then *pass* the information you get to another activity, if that's what you mean. ----- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google 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
Re: [android-developers] Re: Button placement problems
01.12.2010 16:29, kernelpanic пишет: if you are using a relative layout with b2 b3 achored to the bottom left/right respectively - can you then declare b1 after these in the XML and align it above b2 You can declare b1 after b2/3 and set layout_above=@id/b2 or b3. http://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_above Positioning the top edge of b1 just below the center of the screen is a bit more tricky. I wish there were settings for width/height that meant x% of available space. What would work is: LinearLayout orientation=vertical View visibility=invisible layout_weight=1/ RelativeLayout layout_weight=1 layout_marginTop=fixed offset below the center b2/ b3/ b1 layout_alignParentTop=true layout_above=@id/b2 / /RelativeLayout /LinearLayout The invisible view is there just to take up space and push the top edge of RelativeLayout to the middle of the screen (this is done by setting equal values for layout_weight). Then there is a top margin on the relative layout to push its top edge some more, by a fixed amount. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] Porting Andoid Apps
Hi everybody, I am developing a game and I tested it in my HTC HERO. Everything works fine ! I thought that it will be OK for all android phones because I carried about screen's density and size. When I launched my game on a Nexus One, I had a memory leak issue. This was normal because I use many Bitmaps at the same time and code wasn't optimized ... How can I be sure that my game will work fine in other devices I didn't tried (Samsung, HTC, SonyEricsson) ?? Someone already had an issue when porting applications from a device to another one ? Thanks ! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Help needed for Context object: GPS implementation
On Wed, Dec 1, 2010 at 8:28 AM, cool.manish mannishga...@gmail.com wrote: Now If I have moved to some other activity then will I be able to use same GPS Listener which had been started from previous activity. Just re-set your listeners in each activity as needed. if context object has relation with application and not with activity Activity IS a context. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google 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
Re: [android-developers] Re: setOnTouchListener
On Wed, Dec 1, 2010 at 12:21 AM, dmodroid dmodr...@gmail.com wrote: So from my map activity, I want to say myOverlay.addEventListener(onTouch, myCallback). Then define your own callback class, add a function to your custom overlay addTouchListener(MyCallBack myCallback) where you set the callback for the overlay (from your mapactivity), then in the custom overlay when the touch event actually happens, forward the call on to your custom callback. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google 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] lower EditText isn't panned to when opening the Virtual Keyboard
Hi. I've made a tester to reproduce the issue: this is my layout: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical android:background=@drawable/flow_background ImageView android:layout_width=fill_parent android:layout_height=wrap_content android:src=@drawable/ header android:scaleType=fitXY / TextView android:layout_width=fill_parent android:layout_height=wrap_content android:paddingRight=5dp style=@style/info_screens_title_text android:id=@+id/title/ View android:layout_width=fill_parent android:layout_height=@dimen/ seperator_height android:background=@color/seperator_color / ScrollView android:layout_width=fill_parent android:layout_height=0dp android:layout_weight=1.0 LinearLayout android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical android:id=@+id/root /LinearLayout /ScrollView View android:layout_width=fill_parent android:layout_height=@dimen/ seperator_height android:background=@color/seperator_color / include layout=@layout/lower_button_compound android:id=@+id/booking_next_button / /LinearLayout under the scroll view root element (the LinearLayout) i add TextView (sub title) and Linear Layout that contains 12 children all of which are FrameLayout which is inflated from this xml: FrameLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=wrap_content style=@style/round_rect_line_style TextView android:layout_width=wrap_content android:layout_height=fill_parent style=@style/text_style_in_coupound.left android:id=@+id/tv_lbl/ EditText android:layout_width=wrap_content android:layout_height=fill_parent style=@style/text_style_in_coupound.right.edit_text android:id=@+id/edit_val android:imeOptions=actionNext android:maxLength=16/ /FrameLayout i programatically inflate the previous layout and add it line after line to create a single compound surrounded by round rectangle. if i try to open the keyboard on item 6 when the screen is NOT scrolled at all i get no panning on my layout! the virtual keyboard opens up and my screen remains as is :-( as far as i know the screen should pan to my field. I checked with both resize and pan options of the windows options and in both the field is totaly ignored, the screen remain as is. Any idea of why this happens ? is it the scrollView ? i can't rememmber reading about scrollView issues with IME... Any help would be appreciated! -- You received this message because you are subscribed to the Google 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 review the app inside the app ; need not to go android market to rate app
This shouldn't be possible, as it would let apps submit fake positive reviews of themselves. On Nov 30, 11:33 pm, Shalini coolcool.shal...@gmail.com wrote: Hi I have created an android app and i want to add review option inside the app. user need not to go to market ti rate the app. Can anyone please tell me how to do that. -- You received this message because you are subscribed to the Google 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] In Android 2.2.1 startSearch() seem to behave differently...
The documentation of startSearch indicates that the globalSearch indicator of false will invoke the glbal search if there is not local search defined. if this indicator is true it will always invoke global search irrespective of local search. I am noticing that on a simple activity in an application calling onSearchRequested() which in turn calls the startSearch() with a false flag, is not invoking Global search. Is this a change in direction? or documentation not updated? Appreciate any input Thanks -- Satya Komatineni http://www.satyakomatineni.com http://www.androidbook.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] Receiving ACTION_MEDIA_* broadcast events
Hello, Wrote a simple activity that uses registerReceiver to register an internal subclass of BroadcastReceiver with an IntentFilter than has ACTION_MEDIA_EJECT as it's action. I have not set any thing else (data/category) or requested permissions in my manifest. I used the APIDemos from the sample code (External Storage) as my guide along with the documentation. Now when I install this app on a Droid or DroidX I do not get that event even though I can see other receivers, e.g. something called Vold on Droid or PhotoWidget on Droid X get those events. As a consolation, even the APIDemos when installed on the phone doesn't get those events:) What am I doing wrong? Best! -Prakash -- You received this message because you are subscribed to the Google 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: Porting Andoid Apps
Someone already had an issue when porting applications from a device to another one ? Every single one of us doing more than just displaying images of cats that purs when you click on it :D Multitouch, opengl support, intent availability, hardware support, the list of compatibility issues goes on and on, some you can test (presence of sensor,...) some you can't. It's the drawback when you have multiple hardware running on framework. There is one company I can't find the name anymore that have some kind of way to let you try your app on as many devices as you can. It costs a lot though. The most spreaded way to go is to add something like android-remote- stacktrace to receive a full stacktrace by email when an unhandled error occurs on one of your client device. Good luck with your game. Yahel -- You received this message because you are subscribed to the Google 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: Market expanding to technically non-compliant devices?
'Standalone' apps don't have to go away. OHA should commit to openness to make sure we don't have to fragment our apps. For example, using a front facing camera shouldn't require separate apks (even Qik had to do this). Fortunately thanks to a tip from Diane, we can now use the undocumented required=false with the uses-library element just like we do with uses-feature but this only works with 2.x so unfortunately you still a need a separate apk for 1.6. It would also help if somehow the market could count downloads from these separate apks together as part of one app. Going back to the start of this thread, I tested the following: uses-feature android:name=android.hardware.touchscreen required=false / But android.hardware.touchscreen is still gets listed in the dev console for market filtering. For apps that made sure that the touchscreen wasn't the sole input UI, it would be great to see these apps work on GoogleTV once the market is available there. -Dario On Dec 1, 2:02 am, Spiral123 cumis...@gmail.com wrote: ah I see what you mean now. Interesting. The situation you are referring to is already upon us: GoogleTV it comes with its own controller that works well and I can also get a separate Logitech app that runs on my Phone that works as a remote controller, effectively replacing the GoogleTV controller. So...yes I agree that you will need to make 2 separate apks. Initially I didn't understand what you meant by 'integrated' - my bad. However, I think I would extend your thought a little. I suppose there are now really 2 types of app: - Complimentary apps where an app on one platform is optionally extended and enhanced. These can be managed as separate (but not independent) entities, as I don't need the extension to be able to perform the main function. - Integrated apps where 2 different devices are actually required in order to deliver some functionality. This case is the one where it would be nice to have a bundling mechanism like you describe. With the introduction of iOS and the expansion of Android to multiple platforms I think the age of the truly 'Standalone' app has gone. In fact, as developers we should welcome the proliferation of device types as it should increase our ability to deliver cool stuff, add value and opportunities to monetize our efforts. -- You received this message because you are subscribed to the Google 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: Receiving ACTION_MEDIA_* broadcast events
Ok, just should've searched a little more before giving up! There is a thread from a year+ back on this that for some reason didn't show up in my earlier searches - I may have been too focussed on Droid at that time thinking this is a platform issue (my bad). In case it helps any one else, this Intent has a data component with a scheme of file at least for the SD card that I am interested in and that needs to be specified. I guess the APIDemos code should do this as well and save everyone some trouble... Thanks! On Dec 1, 11:10 am, Prakash Iyer thei...@gmail.com wrote: Hello, Wrote a simple activity that uses registerReceiver to register an internal subclass of BroadcastReceiver with an IntentFilter than has ACTION_MEDIA_EJECT as it's action. I have not set any thing else (data/category) or requested permissions in my manifest. I used the APIDemos from the sample code (External Storage) as my guide along with the documentation. Now when I install this app on a Droid or DroidX I do not get that event even though I can see other receivers, e.g. something called Vold on Droid or PhotoWidget on Droid X get those events. As a consolation, even the APIDemos when installed on the phone doesn't get those events:) What am I doing wrong? Best! -Prakash -- You received this message because you are subscribed to the Google 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
Re: [android-developers] Re: Displaying unicode in a TextView?
It would help if you were more specific about the problem. 1) What Unicode character code are you setting in the TextView that displays as garbage? 2) What exactly does garbage mean, rectangles, or unexpected characters like upside down question marks, etc? 3) Please post the code you are using to get the contents over the network. I suspect the issue is converting a stream of bytes to characters. -- You received this message because you are subscribed to the Google 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
Re: [android-developers] What is the Android Sequence of Startup
There are a number of scenarios. The basic one is from the home page, but an app can also run when the device boots, wakes up, an alarm fires, or when another application sends an intent. The crux is the manifest which tells the Android OS what interactions the app is expecting and able to respond to. Note that an app doesn't really run. Its code gets loaded into a Dalvic VM and then the Andorid OS calls various lifecycle methods in the app's code. A lot of newbie developers stumble over this, thinking that an Android app runs just like a desktop application (even they are really subject to an event loop as well). If you can think of IOC (inversion of control) you'll have a better grip on how this works. -- You received this message because you are subscribed to the Google 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
Re: [android-developers] Re: Button placement problems
2010/12/1 Serdel adam.lichwierow...@gmail.com: Thanks for the response. Yeah the centered_vertical is not necessary. I put because I was wondering whether I can o a margin from the center of the screen. For the second question - yes I need the space. The B1 should be placed below the center of the screen, and B2 and B3 should be in the bottom right/left corner of the screen. I figured out that B2 and B3 can also be placed by relativeLayot with aligning to bottom- right\left. But still B1 is a problem. I am using Samsung i5700 (Android 1.5), and Acer liquid E (android 2.1). Btw. Daniel are you from Poland? If so: Dzięki za odpowiedź : Serdel, as suggested here, try using relative layout and you will have to be more careful about your screens and dimensions with regards to layouts. Samsung i5700 is a mdpi device (320x480 pix) and Acer Liquid is hdpi one(480x800 pix). As a result even though you were using B1's top margin expressed in DIPs, you would see a shift in the position of it. Btw, I am from Poland, so Nie ma za co! Daniel -- You received this message because you are subscribed to the Google 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
Re: [android-developers] convert JPEG sketch of my apartment to google map
What would an image of your apartment look like and what specific locations do you want to 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] get result when Settings.ACTION_SECURITY_SETTINGS closes, in app widget
Hi, is there a way it can be triggered when Settings.ACTION_SECURITY_SETTINGS closes? I am working on a widget that opens ACTION_SECURITY_SETTINGS activity, should wait for it to close, then execute some code. Actually it starts the activity and execute codes while the activity is still opened, doesn't wait for it to close. Please help! Mariux -- You received this message because you are subscribed to the Google 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
Re: [android-developers] Re: Placing DB to webserver or phone for LBS
Totally agree with you, Thanks Regards - Faheem Khatri On Wed, Dec 1, 2010 at 1:57 PM, Sarwar Erfan erfanonl...@gmail.com wrote: Hi, Put it in webserver and make it accessible via some web service (as you have planned). Think of situations if in future you have to update the data (which is quite certain). In that case, you update in your server and the user gets updated information without updating their android application. But, if your POI dataset is fixed and not likely to be changed, your users want to use them offline then you can put that on device. I am not sure about your app, but as it is using POI, it might be using map also, then most probably your maps are coming from the internet. In that case, there is no harm getting the POI's online from server. My suggestion is to put the POI data online. Regards Sarwar Erfan On Dec 1, 2:13 pm, Faheem Khatri faheemkhatr...@gmail.com wrote: I am creating LBS (android application) as a FYP. Help me where i put the database of my application in a web server(using MYSQL) or in android (My application using SQL Lite). The Poi's are huge so what i think sqlite will take time to filter it. is it well to put the database into web server so than my application send request to the server and than the server will do all the filtration and respond the application back with data in JSON or XML format. Regards, - Faheem Khatri -- You received this message because you are subscribed to the Google 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google 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
Re: [android-developers] Display images at bottom
On Fri, Nov 26, 2010 at 2:17 PM, Daniel dhw4...@gmail.com wrote: I tried the following and it did work - I had a vertical linear layout object, added a TextView to it, and then added my other linear layout object with the images. In my LL object with images, I set the gravity to BOTTOM like this: optionsLayout.setGravity(Gravity.BOTTOM); However, the LL with images did not go to the bottom of the screen. Note that setGravity sets the gravity of the child items of the view, so what you did there was tell the image views to align to the bottom of the containing linear layout. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google 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] Save ID name in list view
I want to save ID name in list view, like in c# while binding combo box i use to set two property combox.VALUEMEMBER combobox.DISPLAYMEMBER. value member saves the ID (for coding purpose) and display member saves the name (for front end) is there any property where i can set ListView value member display member or any other way? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Unable to create Database for content providers
My application has a database that has to be exposed to global search. I have the sqlite database in my res/raw dir. I am trying to copy the database file to the databases directory in my project but it throws a FileNotFoundException. I am guessing that this is a permissions issue. My application is similar to the Searchable dictionary but the problem is that since I have around 2000 records, it is taking around 15-30 seconds to populate the database. I also have to way to tell the user that the data is loading. So I just decided to use the sqlite database which I can copy to the databases directory of my project in the onCreate method of my databasehelper class.[extends SqliteOpenHelper]. Now I use the same method to copy my actual application database and it works fine. This may be because they are running in the same process. How can I copy my database to the databases dir or where to I need to copy it to?. Or alternatively, is there anyway that I can let the users know that the database is being loaded when it is loading. I noticed that the databases are being loaded even before my search results handler's onCreate method is called. So I cannot even display a loading dialog from the onCreate method. 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: Array Adapter
So basically on the function getView. I had a question im not sure about whats the argument View convertView for the middle? is taht suppose to be a default view or iono? On Nov 30, 9:01 pm, TreKing treking...@gmail.com wrote: On Mon, Nov 29, 2010 at 12:48 PM, kiros88 ghui...@gmail.com wrote: Im assuming the array adapter or adapterView parent is like a basic array that creates an array of textviews if thats what you want to create with your listviews. That's the gist of it. I'm just checking if thats right becuase my main questions is how to access the seperate textviews in the array. Generally, you don't - at least not until you need to. When they're going to be drawn, you'll have this method called on your adapter: http://developer.android.com/reference/android/widget/Adapter.html#ge... There you create or update the view as necessary. i got this method from the android library getDropDownView but im not sure if thats the method i want to use for this instance. Probably not. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google 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] getView what the arguments means?
so basically im trying to figure out what View convertView means exactly. On the definition it says The old view to reuse, if possible. Note: You should check that this view is non-null and of an appropriate type before using. If it is not possible to convert this view to display the correct data, this method can create a new view. so if I call getView should my convertView be a default view in case i can't get get the view from my adapterView? -- You received this message because you are subscribed to the Google 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
Re: [android-developers] getView what the arguments means?
Look at some examples and videos from Romain. http://www.youtube.com/watch?v=wDBM6wVEO70 Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Wed, Dec 1, 2010 at 11:52 PM, kiros88 ghui...@gmail.com wrote: so basically im trying to figure out what View convertView means exactly. On the definition it says The old view to reuse, if possible. Note: You should check that this view is non-null and of an appropriate type before using. If it is not possible to convert this view to display the correct data, this method can create a new view. so if I call getView should my convertView be a default view in case i can't get get the view from my adapterView? -- You received this message because you are subscribed to the Google 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google 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
Re: [android-developers] getView what the arguments means?
Isn't getView called from the system and you override it to give back a view typically to display a list item? You say that you are calling getView - any specific reason? On Wed, Dec 1, 2010 at 1:22 PM, kiros88 ghui...@gmail.com wrote: so basically im trying to figure out what View convertView means exactly. On the definition it says The old view to reuse, if possible. Note: You should check that this view is non-null and of an appropriate type before using. If it is not possible to convert this view to display the correct data, this method can create a new view. so if I call getView should my convertView be a default view in case i can't get get the view from my adapterView? -- You received this message because you are subscribed to the Google 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google 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
Re: [android-developers] Re: Array Adapter
This has to do with list item view recycling. http://android-er.blogspot.com/2010/06/using-convertview-in-getview-to-make.html -- Kostya 01.12.2010 21:19, kiros88 пишет: So basically on the function getView. I had a question im not sure about whats the argument View convertView for the middle? is taht suppose to be a default view or iono? On Nov 30, 9:01 pm, TreKingtreking...@gmail.com wrote: On Mon, Nov 29, 2010 at 12:48 PM, kiros88ghui...@gmail.com wrote: Im assuming the array adapter or adapterView parent is like a basic array that creates an array of textviews if thats what you want to create with your listviews. That's the gist of it. I'm just checking if thats right becuase my main questions is how to access the seperate textviews in the array. Generally, you don't - at least not until you need to. When they're going to be drawn, you'll have this method called on your adapter: http://developer.android.com/reference/android/widget/Adapter.html#ge... There you create or update the view as necessary. i got this method from the android library getDropDownView but im not sure if thats the method i want to use for this instance. Probably not. --- -- TreKinghttp://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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
Re: [android-developers] Re: Array Adapter
what do you mean by default view? that method is supposed to return a View which is used to render the list item. the default implementation, whose source i recommend you read, returns back a TextView the id (you can pass a more complex view which has a TextView element etc. all of which is documented) to which you pass in the constructor. the convertView is a recycled view which can be used if it meets all the requirements. you should override this method, as suggested by treking if you want to do anything more than what is done by default. On Wed, Dec 1, 2010 at 1:19 PM, kiros88 ghui...@gmail.com wrote: So basically on the function getView. I had a question im not sure about whats the argument View convertView for the middle? is taht suppose to be a default view or iono? On Nov 30, 9:01 pm, TreKing treking...@gmail.com wrote: On Mon, Nov 29, 2010 at 12:48 PM, kiros88 ghui...@gmail.com wrote: Im assuming the array adapter or adapterView parent is like a basic array that creates an array of textviews if thats what you want to create with your listviews. That's the gist of it. I'm just checking if thats right becuase my main questions is how to access the seperate textviews in the array. Generally, you don't - at least not until you need to. When they're going to be drawn, you'll have this method called on your adapter: http://developer.android.com/reference/android/widget/Adapter.html#ge... There you create or update the view as necessary. i got this method from the android library getDropDownView but im not sure if thats the method i want to use for this instance. Probably not. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google 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] SMS PDU Behaviour
Sms's have a max length of 160 characters. Assuming a sender sent an sms with length 200 chars, does the system send out 2 SMS_RECEIVED broadcasts? or it internally aggregates the 160 + 40 characters and sends out a single broadcast? Cheers, Earlence -- You received this message because you are subscribed to the Google 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: Geocoder throwing exception
Server is always running at Google.com Your phone needs a connection to this server in order to draw the map or to geocode a string. Without such connection you may see some pieces of map because of GoogleMaps caching but geocode interface requires direct channel to the server. On Nov 30, 6:46 pm, kiran saikiran@gmail.com wrote: Can we start Geocoding server through application On Dec 1, 3:23 am, TreKing treking...@gmail.com wrote: On Tue, Nov 30, 2010 at 3:04 PM, ip332 iprile...@gmail.com wrote: As we know Google map is stored on the web therefore you must have 3G, Edge or WiFi channels enabled in order to use Geocoding. Also, even if you have a perfect connection, the actual geo-coding server has to actually be running. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: [android-porting] how to set the SeekBar more narrow?
seekbar of froyo video player?? GUI and video control of video players lies in packages/apps/Gallery3D/src/com/cooliris/media seek bar and update happens at http://git.omapzoom.org/?p=platform/packages/apps/Gallery3D.git;a=blob;f=src/com/cooliris/media/TimeBar.java#l347 http://git.omapzoom.org/?p=platform/packages/apps/Gallery3D.git;a=blob;f=src/com/cooliris/media/TimeBar.java#l347 On Wed, Dec 1, 2010 at 1:21 PM, 袁堂夫 yuantangf...@gmail.com wrote: how to set the SeekBar more narrow and the thumb is still that big? -- unsubscribe: android-porting+unsubscr...@googlegroups.comandroid-porting%2bunsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting -- Regards, Deva www.bittoggler.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: getView what the arguments means?
Well okay so my main purpose to asking was in my app i wanted the user to be able to select the textview from the listview and once the user touches it the text changes colors. but i want also that if the user touches a new text the original one he touch goes back to the original color while the new one he touch changes colors. so to do taht i need to be able to find the previous textview taht i manipulated during the setOnClickListenerView so i figure if i can find the textview from the array i should be able to get the previous one but im still just confused with the call because i dont get the argument in the middle taht u send a View convertView On Dec 1, 10:34 am, Prakash Iyer thei...@gmail.com wrote: Isn't getView called from the system and you override it to give back a view typically to display a list item? You say that you are calling getView - any specific reason? On Wed, Dec 1, 2010 at 1:22 PM, kiros88 ghui...@gmail.com wrote: so basically im trying to figure out what View convertView means exactly. On the definition it says The old view to reuse, if possible. Note: You should check that this view is non-null and of an appropriate type before using. If it is not possible to convert this view to display the correct data, this method can create a new view. so if I call getView should my convertView be a default view in case i can't get get the view from my adapterView? -- You received this message because you are subscribed to the Google 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.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google 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] Dumping the results of DefaultHttpClient.execute()
I want to dump the results of DefaultHttpClient.execute() into the log (just for debugging, not for all time). This methods returns an object of class HttpResponse. This response is going into an XML pull parser which is misbehaving so I'd like to see the raw XML. What method can I call to get at this buffer before it goes into the parser? Ideally, the buffer would not be consumed so that the pull parser would still work when this debugging is turned on. Any pointers? -- You received this message because you are subscribed to the Google 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: Market expanding to technically non-compliant devices?
I can certainly imagine apps that have voice-only navigation as Android moves into the automotive, gaming, and sports markets. Imagine a pair of Android-powered, voice-controlled augmented reality goggles. -- You received this message because you are subscribed to the Google 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
Re: [android-developers] Dumping the results of DefaultHttpClient.execute()
Bret, Kinds of depends on how you connect the http client and the parser. If you're using getEntity().getContent() to get the stream, I'd think you could write a tee input stream (just like the unix tee command). This stream class would read from the entity's stream, and return the data unchanged (consumed by the parser). While doing that, it would dump the data being read into logcat (or whatever). This would provide what you're after - logging that does not interfere with data flow. -- Kostya 01.12.2010 23:05, Bret Foreman пишет: I want to dump the results of DefaultHttpClient.execute() into the log (just for debugging, not for all time). This methods returns an object of class HttpResponse. This response is going into an XML pull parser which is misbehaving so I'd like to see the raw XML. What method can I call to get at this buffer before it goes into the parser? Ideally, the buffer would not be consumed so that the pull parser would still work when this debugging is turned on. Any pointers? -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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
Re: [android-developers] Re: Array Adapter
On Wed, Dec 1, 2010 at 12:19 PM, kiros88 ghui...@gmail.com wrote: I had a question im not sure about whats the argument View convertView for the middle? is taht suppose to be a default view or iono? To add to what Prakash has said: this is a pre-existing view from your list that is no longer used so instead of wasting time deleting it and recreating a new one, you're given it to re-use. It will be the same type as you originally returned from the same function, so all you need to do is fill it in appropriately for the current index. Of course, if there has been no recycling yet, that value will be null, in which case you create a new view to return. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google 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
Re: [android-developers] Re: Geocoder throwing exception
On Wed, Dec 1, 2010 at 12:50 PM, ip332 iprile...@gmail.com wrote: Your phone needs a connection to this server in order to draw the map or to geocode a string. While geocoding and maps are related, they're not the same thing and I highly doubt they're backed by the same server. It's entirely possible to have full Maps access and have the geocoding fail. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google 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: Localization: no compression... huge APK...
Well, I managed to drop 30% off the size of my APK by munging most of the strings over from res/ to assets/ during the build. Thought I was home dry, but then switching to French noticed that the special characters (acute etc) were coming out as the odd '?' symbol. I would say the encoding is wrong, but it looks OK. This is how I read the strings.xml from assets/ InputStream is = am.open( path ); XmlPullParser xp = XmlPullParserFactory.newInstance().newPullParser(); xp.setInput( is, UTF-8 ); Any ideas ? Spent hours trying to fix this. Pent -- You received this message because you are subscribed to the Google 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: Localization: no compression... huge APK...
Course, as soon as I post I solve it :-) The perl script to do all the munging wasn't outputting utf-8. Pent -- You received this message because you are subscribed to the Google 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
Re: [android-developers] Dumping the results of DefaultHttpClient.execute()
Seriously, can't you just dump the server's response with curl or wget on your desktop or else use the debugger to see how the parser is misbehaving? -- You received this message because you are subscribed to the Google 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: Dumping the results of DefaultHttpClient.execute()
My XML source is beta software on a server. I want something the server-side software engineers can see easily in a logcat - I'll dump the data to the log only when the XML parsing fails, of course, not all the time. On Dec 1, 1:12 pm, Frank Weiss fewe...@gmail.com wrote: Seriously, can't you just dump the server's response with curl or wget on your desktop or else use the debugger to see how the parser is misbehaving? -- You received this message because you are subscribed to the Google 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: Dumping the results of DefaultHttpClient.execute()
I'm going to try the mark() and reset() methods on the Entity's InputStream. With luck, I'll be able the read() the bytes into an array and reset the stream back to the beginning. On Dec 1, 1:17 pm, Bret Foreman bret.fore...@gmail.com wrote: My XML source is beta software on a server. I want something the server-side software engineers can see easily in a logcat - I'll dump the data to the log only when the XML parsing fails, of course, not all the time. On Dec 1, 1:12 pm, Frank Weiss fewe...@gmail.com wrote: Seriously, can't you just dump the server's response with curl or wget on your desktop or else use the debugger to see how the parser is misbehaving? -- You received this message because you are subscribed to the Google 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: Dumping the results of DefaultHttpClient.execute()
It turns out that markSupported() returns false so I'll have to override the class and implement mark/reset. -- You received this message because you are subscribed to the Google 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
Re: [android-developers] Re: Localization: no compression... huge APK...
Fwiw, there is nothing that intrinsically requires the resource table to not be compressed. This is done because it allows it to be mmapped instead of loaded into RAM, which can be a lot more efficient at run time. If you want to, you can massage the .apk with a zip tool so that resources.arsc is compressed instead of stored. If the resource table is only 200k, the overhead of loading the whole thing into RAM for each app using it is not that significant... but on the other hand, I don't see 200K as being all that big to get upset about either or go to extreme effort to avoid. :} And I generally wouldn't recommend people start compressing their resource table -- that part of your .apk is generally loaded into at least 3 processes (your own, launcher, and the system), so being able to mmap it is a big win. Also if you target API level 7 or higher, resource strings are stored as UTF-8 instead of UTF-16 which will generally halve the space needed by them. On Wed, Dec 1, 2010 at 1:05 PM, Pent tas...@dinglisch.net wrote: Course, as soon as I post I solve it :-) The perl script to do all the munging wasn't outputting utf-8. Pent -- You received this message because you are subscribed to the Google 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Re: Localization: no compression... huge APK...
On Sun, Nov 28, 2010 at 8:22 AM, DanH danhi...@ieee.org wrote: Yeah, the stuff in values is precompiled into an internal XML representation and isn't compressed. XML files that aren't precompiled should compress quite efficiently. That's not true, the stuff in values is parsed by aapt into a binary resource table and the original XML structure is gone. Files in raw are left entirely as-is and not modified at all. XML files in other directories are pre-compiled into a binary XML format that is much more efficient to parse and does things like combine duplicate strings, and this binary format will also be compressed in the zip. (Older versions of aapt didn't compress those files, but anything newer should and the result is compatible with older versions of the platform.) -- 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] Restlet api
Hi, I am little bit confused about using of restlet framework. Can someone explain me, if restlet api works similarly as a classic web services (JAX-WS)? I cant figure out, how to transfer to server my custom data type and in the same call to return any value or another custom data type like long id = resource.createUser(User); Maybe i m doing anything wrong, but what is working until now for me is just simple call String s = getString(); where method getString() is implemented on server side like this: @Get public String getString() { return Hello world;} -- You received this message because you are subscribed to the Google 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: Market expanding to technically non-compliant devices?
On Nov 30, 9:12 pm, gjs garyjamessi...@gmail.com wrote: I am hoping to avoid the potential user confusion situation for an integrated (tv and phone) app of having to release two separate versions You can probably make a single apk that can do either the phone or tv half of the job. But why exactly would your application need to require a touchscreen anyway? Presumably an android device is going to have some kind of gui-coordinate-input (mouse/trackball/computer vision gestures, whatever), even if not a touchscreen? requiring two separate downloads/installs - one for the phone the other for the tv. I am hoping the user can download the same apk to either or both the tv and the phone and it will just work, eg standalone or integrated based on proximity of the phone to the tv. This strikes me as unlikely. Perhaps having some kind of account integration so you can see a quick list of what's on your other devices, or maybe someday market offering an option to purchase a personal license to use an app on all your devices - but automatic download to all your devices would be a big leap, and not necessarily a desirable one. Simple proximity installs would be a SEVERE security problem. Think about all the mischief people get up to with the tv-b-gone, then imagine installing apps on some publically visible google TV... -- You received this message because you are subscribed to the Google 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: Geocoder throwing exception
Most likely the servers for maps and geocoding are different, however the common thing is that both services require connection. They both use the same network (cellular or WiFi) so if the network is down none of them will work (except cached map data). Geocode may fail if you submit wrong address, that is true but the original question was why is it throwing exception. On Dec 1, 12:31 pm, TreKing treking...@gmail.com wrote: On Wed, Dec 1, 2010 at 12:50 PM, ip332 iprile...@gmail.com wrote: Your phone needs a connection to this server in order to draw the map or to geocode a string. While geocoding and maps are related, they're not the same thing and I highly doubt they're backed by the same server. It's entirely possible to have full Maps access and have the geocoding fail. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google 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: Dumping the results of DefaultHttpClient.execute()
How about instead, logging the exact request that failed? Then, your server engineers can add it to their test suites, and you can use curl or wget to get the response, and add that response to your test suite. What this lacks in tight coupling it more than makes up for by being a test that gets run repeatedly and isn't breakable. However, you really should *never* see this sort of problem. I can think of two likely explanations, both of which deserve more systematic responses than looking at an individual failing case: 1) The output is malformed XML. This should never happen, because your server engineers should not be attempting to format XML as text. They should be creating a DOM and using a standard seralialization API, or they should be using an event-based serialization. Trying to write correct XML by hand under all circumstances is both a formula for bugs and a whole lot of wasted work. And the resulting code is fragile and difficult to maintain! 2) The output is being truncated, due to bad error handling or IO handling on one side or the other or both. If you get an error in the middle of writing, you must close the connection. Ideally, you'd set the content-length header; that's not always possible for performance reasons. But far better than doing it in the middle of writing is to always do any work that might get an error before beginning to write. Then, you handle and ignore IO exceptions during write (because the connection failed -- a routine, expected occurrence that generally doesn't even warrant logging, though you'd like to detect abnormal frequency). Other exceptions, you return a suitable 5xx-category HTTP status, which the client should handle in some user-friendly way, whether that be to remain silent and try it again, or to gently explain to the user that he's totally, irreversibly had his life ruined forever. On the client side, IO exceptions are to be expected as well. If the IO exception is an end-of-file exception, the data is truncated. Finally -- make very sure that the server actually flushes all the output to the network before closing the connection! I'm not saying that logging responses that aren't what you expect isn't a good idea! But in my experience, it's far from essential, and should not form your main line of defense against bad responses. On Dec 1, 1:43 pm, Bret Foreman bret.fore...@gmail.com wrote: It turns out that markSupported() returns false so I'll have to override the class and implement mark/reset. -- You received this message because you are subscribed to the Google 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: Displaying unicode in a TextView?
Thank you very much. 1) I am not explicitly setting any unicode character code in the TextView. I display data that exists within e-books that are stored in epub format. I do not alter this data at all. I display it as is. Most of this displays OK, but quotes look like the following garbage ... 2) Open double quote: a-circumflex something similar to a Euro symbol a scrunched together o-e Close double quote: a-circumflex something similar to a Euro symbol question mark in a black diamond 3) I do not get the contents over the network. These are e-books in epub format that already reside on my sdcard. The mojibake is rendered perfectly (i.e., not as mojibake) by other e-readers such as Laputa, Aldiko, FBReader, Laputa, Nook, Kindle, etc. This is the code that reads the data from the epub file. // this.file is a String which contains the pathname to the // e-book on my sdcard. // this.itemMap is a LinkedHashMap which holds the contents // of each item in the e-book, keyed by the name of the item. // It's initialized to null and instantiated via lazy // evaluation. // More extensive error handling will be added later. private boolean readEpubFile() { FileInputStream f = null; ZipInputStream z = null; try { f = new FileInputStream(this.file); z = new ZipInputStream(f); ZipEntry ze; while ((ze = z.getNextEntry()) != null) { StringBuilder sb = new StringBuilder(); for (int c = z.read(); c = 0; c = z.read()) { sb.append((char) c); } String name = ze.getName(); if (this.itemMap == null) { this.itemMap = new LinkedHashMapString, String(); } this.itemMap.put(name, sb.toString()); } } catch (Throwable t) { return (false); } finally { try { z.close(); } catch (Throwable t) { } try { f.close(); } catch (Throwable t) { } } return (true); } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Displaying unicode in a TextView?
PS: I forgot to add that after I build this map, I just do the following to display the text within my TextView: // this.section is a String which holds the name of the // ebook section that I want to view. It must be a key // to the above-mentioned LinkedHashMap containing the // epub data. // this.view is the TextView object // this.text is a String this.text = this.itemMap.get(this.section); if (this.text != null) { this.view.setText(Html.fromHtml(this.text).toString()); } -- You received this message because you are subscribed to the Google 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] Gallery doesn't both click and drag
I have a Gallery widget where I want each item to be clickable AND I want to be able to swipe the gallery to move it (of course). Once I set the OnClickListener on the items in the Gallery I can click them but no longer can move the gallery right and left. Do I have to play with onTouch down and move events to make this work, or is there another way to make the Gallery items both clickable and draggable? -- You received this message because you are subscribed to the Google 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: starting local service class not found
Still having this problem :/ Anyone? - Original Message - From: Hendrik Greving To: Android Developers Sent: Tuesday, November 30, 2010 11:13 PM Subject: starting local service class not found I have package com.myapps.myapp; public class MyWidgetProvider extends AppWidgetProvider { [..] public MyService extends Service { [..] @Override public int onStartCommand(Intent intent, int flags, int startId) { [..] Intent updateIntent = new Intent(this, com.myapps.myapp.MyWidgetProvider.MyService.class); PendingIntent pendingIntent = PendingIntent.getService(this, 0, updateIntent, PendingIntent.FLAG_CANCEL_CURRENT); [..] } } gives unable to start service intent and not found. I guess this is more a java than an android question, is it? How do I fix this? -- You received this message because you are subscribed to the Google 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
RE: [android-developers] Re: Geocoder throwing exception
I recall there was an openmap where you could just download the area you need and store it to SD card and then view it from there, this can be beneficial to user who does not have internet. I'm trying to develop this software but I need a lot more time. Progress can be found at http://android.littlebearz.com/ -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of kiran Sent: Tuesday, November 30, 2010 9:47 PM To: Android Developers Subject: [android-developers] Re: Geocoder throwing exception Can we start Geocoding server through application On Dec 1, 3:23 am, TreKing treking...@gmail.com wrote: On Tue, Nov 30, 2010 at 3:04 PM, ip332 iprile...@gmail.com wrote: As we know Google map is stored on the web therefore you must have 3G, Edge or WiFi channels enabled in order to use Geocoding. Also, even if you have a perfect connection, the actual geo-coding server has to actually be running. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google 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 -- You received this message because you are subscribed to the Google 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: Displaying unicode in a TextView?
OK. I figured it out after thinking more about what you said in your item 3. I need to convert the bytes that come out of the zip file into correct unicode. I changed the method as follows, and now it renders the characters properly: private boolean readEpubFile() { FileInputStream f = null; ZipInputStream z = null; byte[] buffer = new byte[65536]; try { f = new FileInputStream(this.file); z = new ZipInputStream(f); ZipEntry ze; while ((ze = z.getNextEntry()) != null) { StringBuilder sb = new StringBuilder(); int totlen = 0; int len= 0; while ((len = z.read(buffer)) 0) { sb.append(new String(buffer, 0, len, UTF-8)); totlen += len; } String name = ze.getName(); if (this.itemMap == null) { this.itemMap = new LinkedHashMapString, String(); } this.itemMap.put(name, sb.toString()); } } catch (Throwable t) { return (false); } finally { try { z.close(); } catch (Throwable t) { } try { f.close(); } catch (Throwable t) { } } return (true); } Thanks again to all of you 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] Re: Settings.Secure.ANDROID_ID not unique on DROID2?
I just saw a report about this unique ID issue affecting Galaxy Tabs too. Does anyone have one to verify? Issue 10639:ANDROID_ID not random if ro.serialno isn't set http://code.google.com/p/android/issues/detail?id=10639 Comment 2 by ddlatham, Today (16 minutes ago) This seems to be affecting more and more devices, such as the Motorola Droid 2 and Samsung Galaxy Tab. -- Seni Sangrujee http://fieldteams.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
Re: [android-developers] Re: Market expanding to technically non-compliant devices?
Um. People. Google TV does not have Market on it. This didn't happen by accident. The platform isn't yet ready to give apps and their users a good experience on such devices. You know, a deliberate decision to not cause unreasonable pain for developers. As has been the case at pretty much every point the range of compatible devices for Market has been expanded. It is a little premature to start freaking out about Google TV and making up stories (OMG we'll need to maintain multiple .apks!) about how horrible things are. On Tue, Nov 30, 2010 at 11:02 PM, Spiral123 cumis...@gmail.com wrote: ah I see what you mean now. Interesting. The situation you are referring to is already upon us: GoogleTV it comes with its own controller that works well and I can also get a separate Logitech app that runs on my Phone that works as a remote controller, effectively replacing the GoogleTV controller. So...yes I agree that you will need to make 2 separate apks. Initially I didn't understand what you meant by 'integrated' - my bad. However, I think I would extend your thought a little. I suppose there are now really 2 types of app: - Complimentary apps where an app on one platform is optionally extended and enhanced. These can be managed as separate (but not independent) entities, as I don't need the extension to be able to perform the main function. - Integrated apps where 2 different devices are actually required in order to deliver some functionality. This case is the one where it would be nice to have a bundling mechanism like you describe. With the introduction of iOS and the expansion of Android to multiple platforms I think the age of the truly 'Standalone' app has gone. In fact, as developers we should welcome the proliferation of device types as it should increase our ability to deliver cool stuff, add value and opportunities to monetize our efforts. -- You received this message because you are subscribed to the Google 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Re: starting local service class not found
On Wed, Dec 1, 2010 at 7:09 PM, Hendrik Greving fourhend...@gmail.com wrote: Still having this problem :/ Anyone? Perhaps you do not have the service listed in the AndroidManifest.xml file. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 3.0.1 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
Re: [android-developers] Re: Market expanding to technically non-compliant devices?
On Wed, Dec 1, 2010 at 8:42 AM, dario dario.nycj...@gmail.com wrote: 'Standalone' apps don't have to go away. OHA should commit to openness to make sure we don't have to fragment our apps. For example, using a front facing camera shouldn't require separate apks (even Qik had to do this). What does OHA should commit to openness to make sure we don't have to fragment our apps mean? I thought all this openness was the cause of all these fragmentation problems. :) Anyway. I can't count the times I have pointed out and cajoled and generally tried to promote to developers to not maintain separate .apks. 50% of the time developers seem to *want* that. I don't know why. (Actually, there are some reasons, but having little to do with Android OMG FRAGMENTATION, and they are few.) There are very few things forcing people to use separate .apks. Yes, prior to 2.0, if an API was being made available as a shared library, you couldn't use android:required=false to allow your app to still be installed even if it doesn't exist. That was fixed last year, however, and the devices running pre-2.0 versions of the platform are fairly rapidly going down. So. Well, problem being solved. Re: Going back to the start of this thread, I tested the following: uses-feature android:name=android.hardware.touchscreen required=false / The syntax is android:required=false. -- 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: Displaying unicode in a TextView?
... but I should actually use a ByteArrayOutputStream to avoid breaking up unicode characters that might span the 65536-byte boundary of my input buffer: private boolean readEpubFile() { FileInputStream f= null; ZipInputStream z= null; bytebuffer[] = new byte[65536]; try { f = new FileInputStream(this.file); z = new ZipInputStream(f); ZipEntry ze; while ((ze = z.getNextEntry()) != null) { ByteArrayOutputStream bs = new ByteArrayOutputStream(); int len = 0; while ((len = z.read(buffer)) 0) { bs.write(buffer, 0, len); } byte[] bytes = bs.toByteArray(); if (this.itemMap == null) { this.itemMap = new LinkedHashMapString, String(); } String name= ze.getName(); String content = new String(bytes); this.itemMap.put(name, content); } } catch (Throwable t) { return (false); } return (true); } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Dumping the results of DefaultHttpClient.execute()
Bob, The server side is enterprise stuff - code that has been around for at least a decade. I have no idea how the server-side engineers are generating their XML, nor do I want to know. But what I've observed is that the XML tree in the data I receive sometimes does not match the documentation. In those cases, I need the enterprise people to fix either the docs or their code. Either way, the best way to get them to do that is to show them the actual XML received by the 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: Displaying unicode in a TextView?
I should clarify that I now don't need to do this: String content = new String(bytes, UTF-8); This is because java's default is unicode. I get the same result with or without the second argument to the String constructor. I now see that my original error resulted because I was converting to individual chars and appending them one-by-one, instead of dealing with a mass of bytes, which then could have been properly converted to unicode. -- You received this message because you are subscribed to the Google 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
Re: [android-developers] Re: Market expanding to technically non-compliant devices?
On Wed, Dec 1, 2010 at 7:40 PM, Dianne Hackborn hack...@android.com wrote: There are very few things forcing people to use separate .apks. Yes, prior to 2.0, if an API was being made available as a shared library, you couldn't use android:required=false to allow your app to still be installed even if it doesn't exist. That was fixed last year, however, and the devices running pre-2.0 versions of the platform are fairly rapidly going down. So. Well, problem being solved. Except that what you describe is undocumented: http://developer.android.com/guide/topics/manifest/uses-library-element.html and, apparently, has been undocumented for over a year. While I have been quietly pointing this undocumented feature out, based on your assertions that we should be using it, please do not expect the bulk of Android developers to be using features they are unaware of, outside of the occasional [android-developers] post. FWIW, this is reported as: http://code.google.com/p/android/issues/detail?id=10354 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 3.0.1 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
Re: [android-developers] Re: Geocoder throwing exception
On Wed, Dec 1, 2010 at 5:07 PM, ip332 iprile...@gmail.com wrote: however the common thing is that both services require connection. They both use the same network (cellular or WiFi) so if the network is down none of them will work (except cached map data). Well ... yeah ... - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google 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: Geocoder throwing exception
Off-topic, but 2 important cents: Do you really need to develop it by yourself when several more or less completed projects are available on the Android market already ? For example: http://www.mapdroyd.com/ or http://www.andnav.org/ The second one is (or going to be) an open source project. On Dec 1, 4:22 pm, XiaoXiong Weng ad...@littlebearz.com wrote: I recall there was an openmap where you could just download the area you need and store it to SD card and then view it from there, this can be beneficial to user who does not have internet. I'm trying to develop this software but I need a lot more time. Progress can be found athttp://android.littlebearz.com/ -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of kiran Sent: Tuesday, November 30, 2010 9:47 PM To: Android Developers Subject: [android-developers] Re: Geocoder throwing exception Can we start Geocoding server through application On Dec 1, 3:23 am, TreKing treking...@gmail.com wrote: On Tue, Nov 30, 2010 at 3:04 PM, ip332 iprile...@gmail.com wrote: As we know Google map is stored on the web therefore you must have 3G, Edge or WiFi channels enabled in order to use Geocoding. Also, even if you have a perfect connection, the actual geo-coding server has to actually be running. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google 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 athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google 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] onItemClick(AdapterView? parent, View view,
Okay i dont want to get to many ppl confused so im going to try to ask this very simply. When android goes to this function when a user clicks on a item on your listview. basically u get a parent who im assuming is the array of textview that was set up during the setAdapter phase and view which the the corresponding View to which the user touched. My main and only questions is i know i can adjust the view of View by saying stuff like (TextView)view = setText(hello) during the same time i want to beable to change another TextView in the AdapterView like the View after the View view so i guess view +1 i want to also be able to change that view into another word. Please dont ask me y im doing this just that im doing it for a reason I just really need help and i hope this explains that During the onItemClick listener function basically I want to adjust 2 different Views in the arrays of Views but i have no idea how to access the any other view then the given View view thats the argument they give 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: getView what the arguments means?
ArrayAdapter is a bridge between all of the items that can potentially be displayed (the items in your array) and those currently on the screen. Only the ones on the screen need to have View objects. getView() is an optimization method that allows you to reuse previously constructed Views as items scroll off the screen and others scroll on. If the View that's received in getView() is non-null and of the right type for the array item at the given position that's coming onto the screen, then all you need to do is set the state of all of the items in the View by calling setText(), setChecked(), etcetera to match the state of the array item. In your case it sounds like an action performed on one item in your array, via its View, can affect the state of another item in your array. If that's the case, then all you need to do is update the state of the affected item(s) in your array when the action is performed, and then call your array adapter's notifyDataSetChanged() method. This will force a refresh of all of the items currently displayed. On Dec 1, 2:53 pm, kiros88 ghui...@gmail.com wrote: Well okay so my main purpose to asking was in my app i wanted the user to be able to select the textview from the listview and once the user touches it the text changes colors. but i want also that if the user touches a new text the original one he touch goes back to the original color while the new one he touch changes colors. so to do taht i need to be able to find the previous textview taht i manipulated during the setOnClickListenerView so i figure if i can find the textview from the array i should be able to get the previous one but im still just confused with the call because i dont get the argument in the middle taht u send a View convertView On Dec 1, 10:34 am, Prakash Iyer thei...@gmail.com wrote: Isn't getView called from the system and you override it to give back a view typically to display a list item? You say that you are calling getView - any specific reason? On Wed, Dec 1, 2010 at 1:22 PM, kiros88 ghui...@gmail.com wrote: so basically im trying to figure out what View convertView means exactly. On the definition it says The old view to reuse, if possible. Note: You should check that this view is non-null and of an appropriate type before using. If it is not possible to convert this view to display the correct data, this method can create a new view. so if I call getView should my convertView be a default view in case i can't get get the view from my adapterView? -- You received this message because you are subscribed to the Google 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.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google 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: Gallery doesn't both click and drag
Oops - I was using setOnCLickListener() [wrong thing to do] on the item instead of setOnItemClickListener() on the Gallery [right thing to do]. On Dec 1, 3:54 pm, jotobjects jotobje...@gmail.com wrote: I have a Gallery widget where I want each item to be clickable AND I want to be able to swipe the gallery to move it (of course). Once I set the OnClickListener on the items in the Gallery I can click them but no longer can move the gallery right and left. Do I have to play with onTouch down and move events to make this work, or is there another way to make the Gallery items both clickable and draggable? -- You received this message because you are subscribed to the Google 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: onItemClick(AdapterView? parent, View view,
Its probably a bad idea to play with any View managed by the Adapter other than the one that is passed to onItemClick() or to getView(). So the idea that you find view + 1 is not going to work. There is lots of tricky View pool activity behind the scenes so you can't make any assumptions about what view is at any other location. If might seem to work part of the time but you can't depend on it. On Dec 1, 6:14 pm, kiros88 ghui...@gmail.com wrote: Okay i dont want to get to many ppl confused so im going to try to ask this very simply. When android goes to this function when a user clicks on a item on your listview. basically u get a parent who im assuming is the array of textview that was set up during the setAdapter phase and view which the the corresponding View to which the user touched. My main and only questions is i know i can adjust the view of View by saying stuff like (TextView)view = setText(hello) during the same time i want to beable to change another TextView in the AdapterView like the View after the View view so i guess view +1 i want to also be able to change that view into another word. Please dont ask me y im doing this just that im doing it for a reason I just really need help and i hope this explains that During the onItemClick listener function basically I want to adjust 2 different Views in the arrays of Views but i have no idea how to access the any other view then the given View view thats the argument they give 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
Re: [android-developers] Re: Market expanding to technically non-compliant devices?
I am sorry it is undocumented. But it is there, and you can use it starting with 2.0 and later. On Wed, Dec 1, 2010 at 4:51 PM, Mark Murphy mmur...@commonsware.com wrote: On Wed, Dec 1, 2010 at 7:40 PM, Dianne Hackborn hack...@android.com wrote: There are very few things forcing people to use separate .apks. Yes, prior to 2.0, if an API was being made available as a shared library, you couldn't use android:required=false to allow your app to still be installed even if it doesn't exist. That was fixed last year, however, and the devices running pre-2.0 versions of the platform are fairly rapidly going down. So. Well, problem being solved. Except that what you describe is undocumented: http://developer.android.com/guide/topics/manifest/uses-library-element.html and, apparently, has been undocumented for over a year. While I have been quietly pointing this undocumented feature out, based on your assertions that we should be using it, please do not expect the bulk of Android developers to be using features they are unaware of, outside of the occasional [android-developers] post. FWIW, this is reported as: http://code.google.com/p/android/issues/detail?id=10354 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 3.0.1 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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: What's the best way to have your app 'sleep' for N milliseconds?
You are right: private static final int WAKE_UP_DELAY = 5000; private static final int WAKE_UP_CALL = 0; private Handler handler; handler = new Handler(new Handler.Callback() { @Override public boolean handleMessage(Message msg) { if (msg.what==WAKE_UP_CALL) { // change message, your code goes here... handler.sendMessageDelayed(handler.obtainMessage(WAKE_UP_CALL), WAKE_UP_DELAY); return true; } return false; } } ); handler.sendMessageDelayed(handler.obtainMessage(WAKE_UP_CALL), WAKE_UP_DELAY); // do something... Emanuel Moecklin 1gravity LLC On Dec 1, 4:47 am, Doug beafd...@gmail.com wrote: On Nov 30, 7:50 am, Emanuel Moecklin 1gravity...@gmail.com wrote: I would recommend using something like: This was actually unnecessarily complex. There's no need to post a whole new runnable to a handler that, in turn, sends a message to the same handler. You can just send the delayed message to the handler and you're done. Doug -- You received this message because you are subscribed to the Google 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
Re: [android-developers] onItemClick(AdapterView? parent, View view,
My 2c - you are over-complicating this.The getView is ONLY to give back the view for the item that is requested. If you want this item to be colored X then do it here. If you want another item to be colored Y then do it when getView is called for that item. The state maintenance, i.e. what is X or Y is done independent of the code within getView which needs to just return the View... As for the specific text, if you are returning a TextView t, then t.setText would work. On Wed, Dec 1, 2010 at 9:14 PM, kiros88 ghui...@gmail.com wrote: Okay i dont want to get to many ppl confused so im going to try to ask this very simply. When android goes to this function when a user clicks on a item on your listview. basically u get a parent who im assuming is the array of textview that was set up during the setAdapter phase and view which the the corresponding View to which the user touched. My main and only questions is i know i can adjust the view of View by saying stuff like (TextView)view = setText(hello) during the same time i want to beable to change another TextView in the AdapterView like the View after the View view so i guess view +1 i want to also be able to change that view into another word. Please dont ask me y im doing this just that im doing it for a reason I just really need help and i hope this explains that During the onItemClick listener function basically I want to adjust 2 different Views in the arrays of Views but i have no idea how to access the any other view then the given View view thats the argument they give 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google 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