[android-developers] Re: Dalvikvm exception instantiating org.apache.http.entity.mime.content.FileBody
Problem solved by using source code of httpmime module embedded into the project. I suspect that tehre is a problem converting jar library into dex code. вторник, 10 апреля 2012 г., 15:49:38 UTC+3 пользователь DennisG написал: Hi, I used to use org.apache.http.entity.mime.content.FileBody with org.apache.http.entity.mime.MultipartEntity sending files to server before. Suddenly I got a problem when upgrated to Android SDK ver 17th. Program is still compiled and started, but when it tries to instantiate org.apache.http.entity.mime.content.FileBody class it raises the following exception: 04-10 11:35:43.385: E/dalvikvm(457): Could not find class 'org.apache.http.entity.mime.content.FileBody', referenced from method com.leadertask.todo.android.service.LTSyncHandler$UploadSyncFileAsync.doInBackground 04-10 11:35:43.385: W/dalvikvm(457): VFY: unable to resolve new-instance 818 (Lorg/apache/http/entity/mime/content/FileBody;) in Lcom/leadertask/todo/android/service/LTSyncHandler$UploadSyncFileAsync; I tried different versions of httpmimeXXX.jar but problem persists. Funny thing is that org.apache.http.entity.mime.content.StringBody and other classes from this library work fine. I guess that there is some conflict. When compiled on older version of Android SDK (ver 16) - everythihg works smoothly. So now I keeping old version of SDK on my backup laptop to compile this project. Could enyone to explain me please how can I solve this annoying problem? Regards, Dennis. -- You received this message because you are subscribed to the Google 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: Search a contact using phone number
Atif, when you are working with contacts and your code works on the emulator but not on the device, it's usually the case that a contact entry on your phone is different than what you've thought. To elaborate, I guess you synchronized your phone with your GMail, right? In this case when you query your contacts, you also get entries which consist purely of e-mail addresses, without names etc. If you assumed that every contacts should have a name, your code would probably crash then. As Justin already suggested, debug your code, investigate your contact objects and change the logic of your code accordingly. - Ali Chousein http://socialnav.blogspot.com | http://twitter.com/socialnav1 http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy http://www.codeproject.com/KB/android/PayGol-Android.aspx http://geo-filtered-assistant.blogspot.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: Hello Everyone---a Quick question please
Yes i know, it's very beginner, and i dint even expected to be the problem in my code, until i discovered it, i tried the other way with String[] t1 = str.split( ); right after posting my thread, but for some reason its still giving me the same output :S On Apr 15, 2:22 am, Justin Anderson magouyaw...@gmail.com wrote: This isn't an android question... This is more of a really beginner java question. That being said, what are you doing to print out the strings?http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/String.html#sp... Thanks, Justin Anderson MagouyaWare Developerhttp://sites.google.com/site/magouyaware On Sat, Apr 14, 2012 at 2:49 PM, Soyer mblack...@gmail.com wrote: Hello everybody, i am trying to split a line to a set of strings, and i am using the following bunch of code: str = hello welcome to your application text= X, A String t1[]=str.split( ); String t2[]=text.split( ); the problem is that the strings (the original ones) are printed correctly but once it's splatted, it gets printed something like: 04-14 21:29:56.985: W/System.err(3427): ===132[Ljava.lang.String;@4462ac88 before splitting method was: 04-14 21:29:56.985: W/System.err(3427): ===133A, X Please any help will be very appreciated. cheers. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google 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: Hello Everyone---a Quick question please
yes i know its a very beginner question, i even dint expect to be the problem with my code, however i tried the other way String[] t1 = str.split( ); and for some reason it's still giving me the same output. On Apr 15, 2:22 am, Justin Anderson magouyaw...@gmail.com wrote: This isn't an android question... This is more of a really beginner java question. That being said, what are you doing to print out the strings?http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/String.html#sp... Thanks, Justin Anderson MagouyaWare Developerhttp://sites.google.com/site/magouyaware On Sat, Apr 14, 2012 at 2:49 PM, Soyer mblack...@gmail.com wrote: Hello everybody, i am trying to split a line to a set of strings, and i am using the following bunch of code: str = hello welcome to your application text= X, A String t1[]=str.split( ); String t2[]=text.split( ); the problem is that the strings (the original ones) are printed correctly but once it's splatted, it gets printed something like: 04-14 21:29:56.985: W/System.err(3427): ===132[Ljava.lang.String;@4462ac88 before splitting method was: 04-14 21:29:56.985: W/System.err(3427): ===133A, X Please any help will be very appreciated. cheers. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google 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: Hello Everyone---a Quick question please
String string = This is what i want to split; String[] tokens = string.split( ); for(int i =0;itokens.length;i++){ Log.d(TOKEN : , tokens[i]); } I think you are looking for something like this. This has nothing to do with android SDK, you should first google your questions up before you post them here On Sun, Apr 15, 2012 at 2:31 PM, Soyer mblack...@gmail.com wrote: yes i know its a very beginner question, i even dint expect to be the problem with my code, however i tried the other way String[] t1 = str.split( ); and for some reason it's still giving me the same output. On Apr 15, 2:22 am, Justin Anderson magouyaw...@gmail.com wrote: This isn't an android question... This is more of a really beginner java question. That being said, what are you doing to print out the strings? http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/String.html#sp... Thanks, Justin Anderson MagouyaWare Developerhttp://sites.google.com/site/magouyaware On Sat, Apr 14, 2012 at 2:49 PM, Soyer mblack...@gmail.com wrote: Hello everybody, i am trying to split a line to a set of strings, and i am using the following bunch of code: str = hello welcome to your application text= X, A String t1[]=str.split( ); String t2[]=text.split( ); the problem is that the strings (the original ones) are printed correctly but once it's splatted, it gets printed something like: 04-14 21:29:56.985: W/System.err(3427): ===132[Ljava.lang.String;@4462ac88 before splitting method was: 04-14 21:29:56.985: W/System.err(3427): ===133A, X Please any help will be very appreciated. cheers. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google 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: Search action not working
Hi Ali, Thank you for the reply and I apologize for the delay. My wife had our third little one, so work came to a halt. Preface this with I am definitely new to this, so I offer this with a major does of humility. Please read it that way ;-) I am not trying to use web search. While I am using the search tool, as far as the android app is concerned, I am just going to a new URL. The search is handled in my online app, and I am simply passing the search string. None of that really matters for this conversation (I think). I have one activity with two intents (Main and Search). The problem is when the search intent is called, the if (Intent.ACTION_SEARCH.equals(intent.getAction())) { String query = intent.getStringExtra(SearchManager.QUERY); doMySearch(query); } is not working (doMySearch function is not being called). @TreKing, I could not get debugging to work well. It kept crashing. If anyone has a good overview to post on debugging, let me know. I am growing frustrated with the android documentation which is why I am coming to the user community. Thanks you both again. I appreciate it. On Wednesday, April 11, 2012 3:19:17 AM UTC-4, Ali Chousein wrote: To be honest, I think Dwayne is trying to integrate web search but he's completely lost in the process. @Dwayne: If you are trying to integrate web search in your application, you cannot do it by using webview only. You have to integrate the API of a search engine. Google Custom Search API is one alternative, but it's not really free: https://developers.google.com/custom-search/v1/overview Have a look at Yahoo Search Web Service: http://developer.yahoo.com/search/ and also at Bing Developer: http://www.bing.com/toolbox/bingdeveloper/ - Ali Chousein http://socialnav.blogspot.com | http://twitter.com/socialnav1 http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy http://www.codeproject.com/KB/android/PayGol-Android.aspx http://geo-filtered-assistant.blogspot.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: Hello Everyone---a Quick question please
my program it does a comparison after splitting the lines, and The problem is solved now, it was counting the ',' with the string which makes the comparison on and off correct, depending on the order of the strings, so if the string i want to match is in the beginning of the line then, a comma will be added which makes the condition of the equality false, and if it comes in the last position in the line then the comma won't appear so the condition is true, so i had to notice the comma in the logcat.(the line changes...) Thanks for your replies guys. cheers. On Apr 15, 2:19 pm, Farhan Tariq farhan@gmail.com wrote: String string = This is what i want to split; String[] tokens = string.split( ); for(int i =0;itokens.length;i++){ Log.d(TOKEN : , tokens[i]); } I think you are looking for something like this. This has nothing to do with android SDK, you should first google your questions up before you post them here On Sun, Apr 15, 2012 at 2:31 PM, Soyer mblack...@gmail.com wrote: yes i know its a very beginner question, i even dint expect to be the problem with my code, however i tried the other way String[] t1 = str.split( ); and for some reason it's still giving me the same output. On Apr 15, 2:22 am, Justin Anderson magouyaw...@gmail.com wrote: This isn't an android question... This is more of a really beginner java question. That being said, what are you doing to print out the strings? http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/String.html#sp... Thanks, Justin Anderson MagouyaWare Developerhttp://sites.google.com/site/magouyaware On Sat, Apr 14, 2012 at 2:49 PM, Soyer mblack...@gmail.com wrote: Hello everybody, i am trying to split a line to a set of strings, and i am using the following bunch of code: str = hello welcome to your application text= X, A String t1[]=str.split( ); String t2[]=text.split( ); the problem is that the strings (the original ones) are printed correctly but once it's splatted, it gets printed something like: 04-14 21:29:56.985: W/System.err(3427): ===132[Ljava.lang.String;@4462ac88 before splitting method was: 04-14 21:29:56.985: W/System.err(3427): ===133A, X Please any help will be very appreciated. cheers. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google 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
Re: [android-developers] Program crashes on Android 4.0.4 but not on 2.3.3
The Activity just disappears. So, if I am on the home page, then I start my application, I get the first screen, then the second activity comes up, starts the remote service, and then I end up on the home page again, as the second activity ended. But, the exact same program works fine on Android 2.3.3. Unfortunately I have no other information than what I am seeing. I don't get any logging from onStop or onDestroy, but that may be expected, so I am not certain how to tell if it went through there, are, as I fear, it was killed and doesn't go through the lifecycle steps in this case. On Sun, Apr 15, 2012 at 1:29 AM, TreKing treking...@gmail.com wrote: On Sat, Apr 14, 2012 at 11:06 PM, James Black planiturth...@gmail.comwrote: Almost immediately after binding to and calling onStart on the service the mapview activity dies. Can you elaborate on dies? - 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 -- I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant. - Robert McCloskey -- You received this message because you are subscribed to the Google 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] Program crashes on Android 4.0.4 but not on 2.3.3
Are you using 'startActivityForResult()' method in your code to start the new activity? On Sun, Apr 15, 2012 at 5:27 PM, James Black planiturth...@gmail.comwrote: The Activity just disappears. So, if I am on the home page, then I start my application, I get the first screen, then the second activity comes up, starts the remote service, and then I end up on the home page again, as the second activity ended. But, the exact same program works fine on Android 2.3.3. Unfortunately I have no other information than what I am seeing. I don't get any logging from onStop or onDestroy, but that may be expected, so I am not certain how to tell if it went through there, are, as I fear, it was killed and doesn't go through the lifecycle steps in this case. On Sun, Apr 15, 2012 at 1:29 AM, TreKing treking...@gmail.com wrote: On Sat, Apr 14, 2012 at 11:06 PM, James Black planiturth...@gmail.comwrote: Almost immediately after binding to and calling onStart on the service the mapview activity dies. Can you elaborate on dies? - 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 -- I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant. - Robert McCloskey -- You received this message because you are subscribed to the Google 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
Re: [android-developers] Program crashes on Android 4.0.4 but not on 2.3.3
I have it working, at the moment, by having this in my manifest: uses-sdk android:minSdkVersion=7 android:targetSdkVersion=9 / So targeting SDK 11 or 18 leads to it to crash. And no, I just use startActivity(intent); with these flags: intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP); On Sun, Apr 15, 2012 at 8:30 AM, Farhan Tariq farhan@gmail.com wrote: Are you using 'startActivityForResult()' method in your code to start the new activity? On Sun, Apr 15, 2012 at 5:27 PM, James Black planiturth...@gmail.comwrote: The Activity just disappears. So, if I am on the home page, then I start my application, I get the first screen, then the second activity comes up, starts the remote service, and then I end up on the home page again, as the second activity ended. But, the exact same program works fine on Android 2.3.3. Unfortunately I have no other information than what I am seeing. I don't get any logging from onStop or onDestroy, but that may be expected, so I am not certain how to tell if it went through there, are, as I fear, it was killed and doesn't go through the lifecycle steps in this case. On Sun, Apr 15, 2012 at 1:29 AM, TreKing treking...@gmail.com wrote: On Sat, Apr 14, 2012 at 11:06 PM, James Black planiturth...@gmail.comwrote: Almost immediately after binding to and calling onStart on the service the mapview activity dies. Can you elaborate on dies? - 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 -- I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant. - Robert McCloskey -- You received this message because you are subscribed to the Google 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 -- I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant. - Robert McCloskey -- You received this message because you are subscribed to the Google 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] Program crashes on Android 4.0.4 but not on 2.3.3
On Sun, Apr 15, 2012 at 8:45 AM, James Black planiturth...@gmail.com wrote: I have it working, at the moment, by having this in my manifest: uses-sdk android:minSdkVersion=7 android:targetSdkVersion=9 / So targeting SDK 11 or 18 leads to it to crash. And no, I just use startActivity(intent); with these flags: intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP); Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and look at the stack trace associated with your crash. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.5 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to pair and connect a device programmatically using bluetooth in Android?
Hi, Well there are plenty of question already have been asked on StackOverflow about how to paired connect a remote bluetooth device with android. I have tried all the of them, haven't find any proper link or documentation regarding pairing with remote device. Also about I have tried with connecting my laptop with android programmatically, but I was getting following error: java.io.IOException: Service discovery failed at android.bluetooth.BluetoothSocket$SdpHelper.doSdp(BluetoothSocket.java:395) at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:209) There are number of reference for connecting android device, one that I follow is thishttp://stackoverflow.com/questions/6369585/how-to-connect-with-paired-bluetooth-device-programmatic-in-android. But it's not working in my case. I am trying to connect with my vaio laptop and I have Samsung Galaxy S android device. If anybody knows how to pair as well as connect the device programmatically then please tell me the solution, Any help would be highly appreciated Thanks, Pawan -- You received this message because you are subscribed to the Google 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] Program crashes on Android 4.0.4 but not on 2.3.3
That is the problem, with logcat there is no additional information. I have it attached to my computer through the usb connection, and am able to see all the data in logcat. That is why I decided to ask for help in how to approach it, as I am confused as to what is going on. Here is what I see when it dies: 04-15 08:50:02.213: I/ErrandMapActivity(5805): onServiceConnected 04-15 08:50:02.213: I/ErrandMapActivity(5805): registering callback 04-15 08:50:02.213: I/ErrandAssistantService(5931): registerCallback 04-15 08:50:02.217: I/ErrandMapActivity(5805): onResume - binding succeeded OK, then I see this, which may explain it: 04-15 08:50:08.682: D/CDA(5805): onBackPressed Called 04-15 08:50:08.682: D/CustomMapActivity(5805): finish entered And, when I look much further in the log I found onStop and onDestroy, being logged, which makes me feel better. So, now it appears that the phone thinks the back button is being pressed when it is sitting untouched, but only if the SDK version is 9. On Sun, Apr 15, 2012 at 8:48 AM, Mark Murphy mmur...@commonsware.comwrote: On Sun, Apr 15, 2012 at 8:45 AM, James Black planiturth...@gmail.com wrote: I have it working, at the moment, by having this in my manifest: uses-sdk android:minSdkVersion=7 android:targetSdkVersion=9 / So targeting SDK 11 or 18 leads to it to crash. And no, I just use startActivity(intent); with these flags: intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP); Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and look at the stack trace associated with your crash. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.5 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 -- I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant. - Robert McCloskey -- You received this message because you are subscribed to the Google 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] Program crashes on Android 4.0.4 but not on 2.3.3
On Sun, Apr 15, 2012 at 9:02 AM, James Black planiturth...@gmail.com wrote: That is the problem, with logcat there is no additional information. Then it is not crashing. OK, then I see this, which may explain it: 04-15 08:50:08.682: D/CDA(5805): onBackPressed Called 04-15 08:50:08.682: D/CustomMapActivity(5805): finish entered And, when I look much further in the log I found onStop and onDestroy, being logged, which makes me feel better. So, now it appears that the phone thinks the back button is being pressed when it is sitting untouched, but only if the SDK version is 9. I assume that CDA is your code. If so, set a breakpoint or throw a RuntimeException in onBackPressed() to see if there is something in the call trace that indicates what is triggering it. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.5 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] Program crashes on Android 4.0.4 but not on 2.3.3
OK, I have tried it a couple of more times, and don't see the back button log again. This is what I see: 04-15 09:13:46.614: I/ErrandAssistantService(7015): Setting a new request for location updates 04-15 09:13:46.661: I/ErrandAssistantService(7015): saveProximityAlert - used GPS 04-15 09:13:46.669: I/ErrandAssistantService(7015): saveProximityAlert - used network 04-15 09:13:46.677: I/ErrandAssistantService(7015): saveProximityAlert - used GPS 04-15 09:13:46.681: I/ErrandAssistantService(7015): saveProximityAlert - used network 04-15 09:13:47.025: W/CursorWrapperInner(7039): Cursor finalized without prior close() 04-15 09:13:47.044: I/MapViewActivity(7039): OnResume: mapView loaded = true 04-15 09:13:47.083: I/MapActivity(7039): Handling network change notification:CONNECTED 04-15 09:13:47.083: E/MapActivity(7039): Couldn't get connection factory client 04-15 09:13:47.196: I/ErrandMapActivity(7039): onServiceConnected 04-15 09:13:47.196: I/ErrandMapActivity(7039): registering callback 04-15 09:13:47.200: I/ErrandAssistantService(7015): registerCallback 04-15 09:13:47.200: I/ErrandMapActivity(7039): onResume - binding succeeded Then I see this: 04-15 09:13:49.142: I/ErrandAssistantService(7015): Sent location changed callback 04-15 09:13:49.142: I/ErrandAssistantService(7015): Sent route changed 04-15 09:13:49.142: I/ErrandAssistantService(7015): geoPoint set So, the activity had bound to the service, and then later the service sends back data to the activity, but that activity has already exited. And, there is no longer anything about the back button having been pressed. I had cleared the logcat in Eclipse then ran it again, in case I was confusing when certain code was happening, and that may indeed have been the case. On Sun, Apr 15, 2012 at 9:09 AM, Mark Murphy mmur...@commonsware.comwrote: On Sun, Apr 15, 2012 at 9:02 AM, James Black planiturth...@gmail.com wrote: That is the problem, with logcat there is no additional information. Then it is not crashing. OK, then I see this, which may explain it: 04-15 08:50:08.682: D/CDA(5805): onBackPressed Called 04-15 08:50:08.682: D/CustomMapActivity(5805): finish entered And, when I look much further in the log I found onStop and onDestroy, being logged, which makes me feel better. So, now it appears that the phone thinks the back button is being pressed when it is sitting untouched, but only if the SDK version is 9. I assume that CDA is your code. If so, set a breakpoint or throw a RuntimeException in onBackPressed() to see if there is something in the call trace that indicates what is triggering it. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.5 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 -- I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant. - Robert McCloskey -- You received this message because you are subscribed to the Google 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: Large data downloads from a Web app to Android client getting Out of memory error
On Apr 4, 11:51 am, Kostya Vasilyev kmans...@gmail.com wrote: Perhaps your base64 encoded data doesn't contain line breaks, or contains too few of them? There are none; the data stream is a single 5 MB line. Causing the readline() to try and read the entire 5 MB (or a large portion of it) in memory? Yes, I could alter delivery of the data so that it comes in in smaller chunks. For email content (since you mentioned K9) it's common to line-wrap base64 data at some reasonable line size, like 76 characters (you know, many people still use DOS, even in this day and age). The same principle could apply to web data. Besides, line breaks do not have any significance for base64 encoded data (unlike, e.g. quoted-printable, or format-flowed text/plain), so you could just ignore the line structure. I'm sure there is piece of code somewhere in K9 sources that can decode base64 data on the fly without excessive buffering. There is also this: http://developer.android.com/reference/android/util/Base64InputStream... ... which is part of Android starting with API 8, but hey, the sources are only a few clicks away. Thanks for your ideas, Kostya. The approach I ultimately took was to save the incoming data to the SD card, in 76 byte pieces, and then reference it via its Uri. Does the job, albeit somewhat slow. Now I'm having to deal with the reverse problem: sending a big file up to the server and I don't think that that can be done in single request, so I'll probably have to modify the server to support piecewise uploads. -- K 4 апреля 2012 г. 22:27 пользователь FractalBob ruom...@gmail.com написал: On Apr 4, 8:48 am, TreKing treking...@gmail.com wrote: On Wed, Apr 4, 2012 at 10:38 AM, FractalBob ruom...@gmail.com wrote: The data, a kind of mail attachment, is a music file Why are you reading lines from this data then? The data is coming in Base 64 encoded from the Web app and then passed directly to the processing application. This scheme works fine for all known types of data and is eventually loaded into an MP3 player. What does that mean? I can't simply point the player to the file, unfortunately; too much legacy code. Not sure what that means. My app is based on the K9 Mail mail client and it expects the data delivered to its providers in a certain format. --- -- 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: Large data downloads from a Web app to Android client getting Out of memory error
Yes, this is fine, until you try to convert the output to a String, which was what I needed until I took the approach I mentioned in my reply to Kostya. On Apr 5, 1:12 am, Vo Trung Liem lie...@gmail.com wrote: Follow the code may will help you. URL url = new URL(path); URLConnection cn = url.openConnection(); cn.connect(); InputStream stream = cn.getInputStream(); if (stream == null) throw new RuntimeException(stream is null); if (BTAG) Log.d(TAG, TAG + File temp + audios_local[currentPosition]); FileOutputStream out = new FileOutputStream(temp); byte buf[] = new byte[128]; do { int numread = stream.read(buf); if (numread = 0) break; out.write(buf, 0, numread); } while (true); try { stream.close(); } catch (IOException ex) { if (BTAG) Log.d(TAG, TAG + + ex.toString()); } I can read file bigger than 5MB. 2012/4/5 Kostya Vasilyev kmans...@gmail.com Perhaps your base64 encoded data doesn't contain line breaks, or contains too few of them? Causing the readline() to try and read the entire 5 MB (or a large portion of it) in memory? For email content (since you mentioned K9) it's common to line-wrap base64 data at some reasonable line size, like 76 characters (you know, many people still use DOS, even in this day and age). The same principle could apply to web data. Besides, line breaks do not have any significance for base64 encoded data (unlike, e.g. quoted-printable, or format-flowed text/plain), so you could just ignore the line structure. I'm sure there is piece of code somewhere in K9 sources that can decode base64 data on the fly without excessive buffering. There is also this: http://developer.android.com/reference/android/util/Base64InputStream... ... which is part of Android starting with API 8, but hey, the sources are only a few clicks away. -- K 4 апреля 2012 г. 22:27 пользователь FractalBob ruom...@gmail.comнаписал: On Apr 4, 8:48 am, TreKing treking...@gmail.com wrote: On Wed, Apr 4, 2012 at 10:38 AM, FractalBob ruom...@gmail.com wrote: The data, a kind of mail attachment, is a music file Why are you reading lines from this data then? The data is coming in Base 64 encoded from the Web app and then passed directly to the processing application. This scheme works fine for all known types of data and is eventually loaded into an MP3 player. What does that mean? I can't simply point the player to the file, unfortunately; too much legacy code. Not sure what that means. My app is based on the K9 Mail mail client and it expects the data delivered to its providers in a certain format. --- -- 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 -- You received this message because you are subscribed to the Google 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] Declaring fragments in XML
Hello all, When adding a fragment to an XML layout file, it seems that one can use either the class attribute or the android:name attribute to declare the fragment class, i.e. both : fragment class=my.awesome.fragment / or fragment android:name=my.awesome.fragment / seem to work. Is there any difference between the two? Which attribute should a fellow prefer: class or android:name? -- http://www.opgenorth.net -- You received this message because you are subscribed to the Google 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 stop getCount() of ArrayAdapter for custom listview from being called automatically?
Hi all, I want to populate the listview (custom listview). I am doing that using - a) EditText, in which I type a word. b) Button, onClick of which sets the adapter to the list. c) SQLiteDatabase, for firing query in order to populate the list. *Note: *The query uses the text from EditText. d) Custom ListView, which is to be populated. Everything is fine here, except when my EditText goes empty, as in my getCount() method of ArrayAdapter, I am putting the count value, which is being generated by the query, that uses the text of EditText. Well, I am not getting why the getCount() method is being called, without even clicking the button. Here is my button Click button onclick { String s=mEditText.getText().toString(); if(!s.equals() { mListView.setAdapter(new TextAdapter(getApplicationContext,R.layout.list_item)); // TextAdapter is the class extending ArrayAdapter int number=Integer.parseInt(s); mCursor=dataHelper.myMethod(number); count=mCursor.getCount(); mCursor.close(); } } Here is the getCount() method of Adapter class. class TextAdapter extends ArrayAdapterString { .. ... *@Override* *public int getCount()* *{* *return count;* *}* .. .. } which as per my requirement should be called when I click the button, not when I change something in my EditText. After the appearance of my list, when I try to change the editText value by removing the old one, an exception is thrown. NumberFormatException: Unable to parse ' ' as number. What should I do in order to solve my problem? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] R cannot be resolved to a variable when deleting main.out.xml file
Hello, I had the mistake of clicking on Run on eclipse while I was on a xml file (main.xml). Eclipse created the main.out.xml file and I got a lot of problems. I deleted the main.out.xml file and cleaned the project and I still get the error that says: R cannot be resolved to a variable I didn't write anything, it is some problem generated by eclipse... Does anyone have an idea of what could it happen? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Search action not working
On Sun, Apr 15, 2012 at 6:44 AM, Dwayne Boulden dwayne...@gmail.com wrote: @TreKing, I could not get debugging to work well. It kept crashing. You have to elaborate on not working well. What kept crashing? Your debugger? If anyone has a good overview to post on debugging, let me know. http://developer.android.com/guide/developing/debugging/index.html - 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] noticed SET_ROOT_LAYER_MSG_ID called many times before native crash - SIGSEGV 11
Hey. I have a pure Java application written for Android and I've been investigating a native crash for the past week or so. I have noticed that this happens to my UIWebView app also when hitting the endpoint from an Android Native Browser. This crash dump is from an LG Thrill, which is android 2.2.2. I've really noticed this crash in 2.2.2, and in some earlier versions of 2.3. I've haven't noticed this problem on Android 2.3.4+. From this crash dump, you notice something suspicious, SET_ROOT_LAYER_MSG_ID called many times right before it crashes. I'm wondering if there is something I can gain from this knowledge. I've been at a road block on how to move forward on this problem. I will be looking at the source code next tro see where SET_ROOT_LAYER_MSG_ID is called, but I'm wondering if people have any advice for this. Thanks, stringa 04-05 16:10:22.263: V/http(6301): 264756112 http5 DRAIN pipe 0 04-05 16:10:22.263: V/http(6301): 264756112 http5 IdleCacheTIOpt size 4 host http://qa.dd.com:80list size4 04-05 16:10:22.263: V/http(6301): 264756112 http5 Cached Cnxn Increment5list size5 04-05 16:10:22.263: V/http(6301): 264756112 http5 RequestQueue.getRequest() = null 04-05 16:10:22.263: V/http(6301): 264756112 http5 ConnectionThread: Waiting for work 04-05 16:10:22.263: V/webcore(6301): webkitDraw NEW_PICTURE_MSG_ID 04-05 16:10:22.271: V/webkit(6301): LoadListener.parseContentTypeHeader: contentType: image/png 04-05 16:10:22.271: V/webkit(6301): [CIQ][BROWSER] [EVENT]:EVENT_DATA_RCV_START 04-05 16:10:22.271: D/ciq(6301): [CIQ][BROWSER]browserCallEvent() not Started!!! 0 04-05 16:10:22.271: V/webkit(6301): LoadListener.detachRequestHandle(): requestHandle: null 04-05 16:10:22.271: V/webkit(6301): LoadListener.parseContentTypeHeader: contentType: text/html; charset=utf-8 04-05 16:10:22.271: V/webkit(6301): [CIQ][BROWSER] [EVENT]:EVENT_DATA_RCV_START 04-05 16:10:22.271: D/ciq(6301): [CIQ][BROWSER]browserCallEvent() not Started!!! 0 04-05 16:10:22.271: V/webkit(6301): LoadListener.detachRequestHandle(): requestHandle: android.net.http.RequestHandle@464197b0 04-05 16:10:22.302: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.302: V/webview(6301): IMMEDIATE_REPAINT_MSG_ID 04-05 16:10:22.302: V/webview(6301): NEW_PICTURE_MSG_ID 04-05 16:10:22.302: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.302: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.302: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.302: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.302: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.302: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.302: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.302: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.302: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.302: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.302: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.302: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.310: V/webview(6301): IMMEDIATE_REPAINT_MSG_ID 04-05 16:10:22.396: V/AudioSink(114): stop 04-05 16:10:22.396: V/AudioPolicyManagerBase(114): changeRefCount() stream 3, count 3 04-05 16:10:22.396: V/MediaPlayerService(114): [1960] notify (0xa6298, 2, 0, 0) 04-05 16:10:22.411: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.411: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.411: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.411: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.411: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.411: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.411: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.411: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.411: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.411: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.411: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.411: V/webview(6301): SET_ROOT_LAYER_MSG_ID 04-05 16:10:22.411:
Re: [android-developers] How to stop getCount() of ArrayAdapter for custom listview from being called automatically?
On Sun, Apr 15, 2012 at 11:27 AM, Narendra Singh Rathore nsr.curi...@gmail.com wrote: NumberFormatException: Unable to parse ' ' as number. What should I do in order to solve my problem? Check that what you're parsing is actually a number? Handle the exception? - 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: How to pair and connect a device programmatically using bluetooth in Android?
I thought the concept of pairing was created exactly to prevent stuff like that from happening. Plus, you normally only need to pair once. Why go through the effort to automate that? On Sunday, April 15, 2012 8:57:24 AM UTC-4, Pawan wrote: Hi, Well there are plenty of question already have been asked on StackOverflow about how to paired connect a remote bluetooth device with android. I have tried all the of them, haven't find any proper link or documentation regarding pairing with remote device. Also about I have tried with connecting my laptop with android programmatically, but I was getting following error: java.io.IOException: Service discovery failed at android.bluetooth.BluetoothSocket$SdpHelper.doSdp(BluetoothSocket.java:395) at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:209) There are number of reference for connecting android device, one that I follow is thishttp://stackoverflow.com/questions/6369585/how-to-connect-with-paired-bluetooth-device-programmatic-in-android. But it's not working in my case. I am trying to connect with my vaio laptop and I have Samsung Galaxy S android device. If anybody knows how to pair as well as connect the device programmatically then please tell me the solution, Any help would be highly appreciated Thanks, Pawan -- You received this message because you are subscribed to the Google 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] Ubuntu Eclipse - Repos or Manual install?
Ubuntu 12.04, 64 Bit Whats peoples opinions on installing eclipse on Ubuntu? Easy enough to do so from the repo (gets me Indigo) but I found that doing updates from eclipse pretty much broke my setup. Its also pretty easy to install manually so maybe thats the best way, but I don't like sidestepping the package system. So it would appear the options are: 1. Install from repos, disable updates in eclipse (rely on repos for updates) or 2. Manual Install. Run updates from eclipse. Either Way, the ADT plugin would be installed via the Google update site. -- Lindsay -- You received this message because you are subscribed to the Google 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] R cannot be resolved to a variable when deleting main.out.xml file
Have you added an import to your activity? You may want to look at this: http://stackoverflow.com/questions/885009/r-cannot-be-resolved-android-error On Sun, Apr 15, 2012 at 1:34 PM, Ruben Royo rubenroyolo...@gmail.comwrote: Hello, I had the mistake of clicking on Run on eclipse while I was on a xml file (main.xml). Eclipse created the main.out.xml file and I got a lot of problems. I deleted the main.out.xml file and cleaned the project and I still get the error that says: R cannot be resolved to a variable I didn't write anything, it is some problem generated by eclipse... Does anyone have an idea of what could it happen? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant. - Robert McCloskey -- You received this message because you are subscribed to the Google 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: Media Effect artifact
I found out what was causing the problem: the width and height that were passed to the effect.apply() were different than the width/height of the texture at the time of creation. After fixing that I can now see some sensible output. I haven't seen the errors that I mentioned above as of the fix; so, I'm still not sure if the errors have the same cause. --Hossein On Apr 13, 6:55 pm, hmohtasham shmohtas...@gmail.com wrote: Oh, I forgot to mention that the app occasionally crashes with the following error: 04-13 09:10:33.890: E/AndroidRuntime(17201): FATAL EXCEPTION: GLThread 2351 04-13 09:10:33.890: E/AndroidRuntime(17201): java.lang.RuntimeException: Applying effect in wrong GL context! 04-13 09:10:33.890: E/AndroidRuntime(17201): at android.media.effect.EffectContext.assertValidGLState(EffectContext.java: 112) 04-13 09:10:33.890: E/AndroidRuntime(17201): at android.media.effect.FilterEffect.beginGLEffect(FilterEffect.java:67) 04-13 09:10:33.890: E/AndroidRuntime(17201): at android.media.effect.SingleFilterEffect.apply(SingleFilterEffect.java: 71) 04-13 09:10:33.890: E/AndroidRuntime(17201): at com.experimental.camera2gl.GLES20TriangleRenderer.onDrawFrame(GLES20Triangl eRenderer.java: 208) 04-13 09:10:33.890: E/AndroidRuntime(17201): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java: 1462) 04-13 09:10:33.890: E/AndroidRuntime(17201): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216) and also sometimes the following error with no crash: 04-13 09:51:52.780: E/MCA(27518): GL Error: Operation 'Popping Vertex Attributes' caused GL error (0x506) Thanks --Hossein On Apr 13, 5:17 pm, hmohtasham shmohtas...@gmail.com wrote: Greetings! I'm experimenting with various effects provided in the android.media.* package and I have been able to get some output; however, it seems that the processed texture (the output of the effect) is stretched to the right in a way that part of the right side of the input is not seen (cropped). I draw two quads one textured with input image and the other with the output, within the same OnDrawFrame(). I apply the effect at the end of the OnDrawFrame() after glDrawArrays(). Almost everything (viewport, transformation, etc.) is shared between the the two quad; still the above occurs. I appreciate any feedback, hint, and even general advice on the proper use of effects in the presence of GLSurface. Thanks --Hossein -- You received this message because you are subscribed to the Google 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: DeviceOrientation API can't get right data from Orientation Sensor
anyone help? On 4月13日, 下午4时02分, dj wy...@163.com wrote: hi, allDeviceOrientationAPIhas been impremented in Android 4.0. But i can't use javascript to get right data form Orientation Senor. Accelerometer Sensor and MagneticField Sensor are registered in DeviceOrientationService.java when i addEventListenerdeviceorientationevent, so I think the data which javascript get is not orientation sensor data. Anyone who can tell me why? javascript code: window.addEventListener('deviceorientation', function(event){//process orientation sensor data}, false); thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Push notification for Android 1.6++
Hi all, i know that there is C2DM to support push notification for android, but it only supports 2.2++ based on this http://code.google.com/android/c2dm/ CMIIW I want to push notification supports 1.6++, is there any recommendation? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Sub folders under 'layout'
The number of XML's in my layout folder is growing and is becoming difficult to manage. So I want to create sub folders, under layout, to better manage this. Is there any way the resource compiler can handle this? So instead of *R.layout.layout_a* I want to refer it as * R.layout.folder_1.folder_x.layout_a*. -- You received this message because you are subscribed to the Google 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] Sub folders under 'layout'
No. It's not possible. Btw, how many layouts you have now? Just curious. *Thanks and Regards, Kumar Bibek* * http://techdroid.kbeanie.com http://www.kbeanie.com* On Mon, Apr 16, 2012 at 9:44 AM, Put_tiMe putt...@gmail.com wrote: The number of XML's in my layout folder is growing and is becoming difficult to manage. So I want to create sub folders, under layout, to better manage this. Is there any way the resource compiler can handle this? So instead of *R.layout.layout_a* I want to refer it as * R.layout.folder_1.folder_x.layout_a*. -- You received this message because you are subscribed to the Google 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
Re: [android-developers] How to stop getCount() of ArrayAdapter for custom listview from being called automatically?
On Mon, Apr 16, 2012 at 3:29 AM, TreKing treking...@gmail.com wrote: On Sun, Apr 15, 2012 at 11:27 AM, Narendra Singh Rathore nsr.curi...@gmail.com wrote: NumberFormatException: Unable to parse ' ' as number. What should I do in order to solve my problem? Check that what you're parsing is actually a number? Handle the exception? But, I actually wanted this parsing to be done after my button click not on change in EditText. Why it is automatically called if I make change to EditText, even without clicking the button? -- You received this message because you are subscribed to the Google 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 while integrating Facebook in android application
Hi, I'm trying to integrate facebook in my android application. I followed the guidelines provided in facebook developers page - http://developers.facebook.com/docs/mobile/android/build/ I was getting an exception while executing the following code: if (!facebook.isSessionValid()) { System.out.println(Facebook:: session invalid); facebook.authorize((GameActivity) ctx, new String[] { read_friendlists, user_likes, email, friends_likes, user_interests, friends_interests }, new DialogListener() { @Override public void onCancel() { // Function to handle cancel event System.out.println(Facebook:: event cancelled); } @Override public void onComplete(Bundle values) { // Function to handle complete event // Edit Preferences and update facebook acess_token System.out .println(Facebook:: setting access token and expire time in preferences); User user = User.getUser(); if (user != null) { accessToken = facebook.getAccessToken(); accessExpires = facebook.getAccessExpires(); user.setAccessToken(accessToken); user.setAccessExpires(accessExpires); user.updatePrefs(); mPrefs.flush(); getFacebookFriends(); getUserInfo(); } @Override public void onError(DialogError error) { // Function to handle error System.out.println(Facebook:: Error - + error.getLocalizedMessage()); } @Override public void onFacebookError(FacebookError fberror) { // Function to handle Facebook errors System.out.println(Facebook:: fbError - code: + fberror.getErrorCode() + message: + fberror.getLocalizedMessage()); } }); Exception is: Can't create handler inside thread that has not called Looper.prepare() ... ... ... I went through net for this and added Looper.prepare(), Looper.loop() on either side of the above code like this Looper.prepare(); FACEBOOK_AUTHORIZATION_CODE; Looper.loop(); Sometimes it gives the following exception but sometimes it runs fine but the application freezes (I tried quit() method but it leads to some other error) Exception that comes sometimes is: I/ExceptionHandler( 2504): java.lang.NullPointerException I/ExceptionHandler( 2504): at android.webkit.WebView.onWindowFocusChanged(WebView.java:4177) I/ExceptionHandler( 2504): at android.view.View.dispatchWindowFocusChanged(View.java:3788) I/ExceptionHandler( 2504): at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:658) I/ExceptionHandler( 2504): at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:662) I/ExceptionHandler( 2504): at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:662) I/ExceptionHandler( 2504): at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:662) I/ExceptionHandler( 2504): at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:662) I/ExceptionHandler( 2504): at android.view.ViewRoot.handleMessage(ViewRoot.java:1921) I/ExceptionHandler( 2504): at android.os.Handler.dispatchMessage(Handler.java:99) I/ExceptionHandler( 2504): at android.os.Looper.loop(Looper.java:123) I/ExceptionHandler( 2504): at com.kiwi.monstercastle.facebook.MCAndroidFBIntegration.loginToFacebook(MCAndroidFBIntegration.java:151) Can someone please help on this? Thanks, Kamal -- You received this message because you are subscribed to the Google 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: Getting a captcha-image without redownloading.
On Apr 12, 10:54 am, Justin Anderson magouyaw...@gmail.com wrote: or maybe even find a way to OCR it Good luck with that one... Captcha's are designed to not be readable by OCR. That would defeat the purpose. I was able to OCR this particular captcha with a simple android OCR app, but I know what you mean. In case someone has a similar problem, I was able to do something similar to what I was actually trying to do, by using a canvas, capturing that area and obtaning an URL that kind of contains the very image data embedded (something weird to me, related with base64). I lost the links, but just google those concepts. -- You received this message because you are subscribed to the Google 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] Listen to packet data receipt when Android in sleep mode
As stated in the answer to this (http://stackoverflow.com/questions/ 5120185/android-sleep-standby-mode) question, the CDMA and GSM radios are kept on, even after the CPU is put to sleep on an Android device. My questions are... When a call is received, what is it that wakes the CPU / phone up ? Is there a similar mechanism to wake my application up when data is received via an active TCP connection to a server, even after the phone has gone to sleep mode ? -- You received this message because you are subscribed to the Google 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