[android-developers] Re: Getting cell signal strength for current cell vs neighboring cells
Hi, I'm curious to know approximately how many neighboring cells you typically detect Obviously this will vary with location but are we talking 1-2 neighboring cells or are there many more? Thanks. On Jan 5, 11:38 pm, Doughy doughywil...@gmail.com wrote: I'm writing an android application that collects cellsignal strengths. I am having trouble getting the current cellsignalstrength, but I don't have any problem getting the neighboring cellsignalstrengths. To get the current cellsignalstrength, I created a PhoneStateListener and implemented the onSignalStrengthChanged callback. It works, but not very well. It seems like thesignalstrengthhardly ever changes, and resolution jumps to only a few numbers. I would accept the answer that the resolution of thesignalstrengthhardware is coarse, but when I use the TelephonyManager's getNeighboringCellInfo() method, it works much better. Thesignalstrengthreadings from neighboring cells change frequently, and they have much better resolution. So, how can I get the current cellsignalstrengthin the same way that I am getting the neighboring cell strengths? It seems odd to me that the functionality of the neighboring cells is better than the current cell. Am I missing something here? I would also like to directly call a method from the telephony manager to get current cellstrength, as opposed to a listener, if possible. If anyone knows how, please let me know. Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: SAXParser fails on some RSS feeds
I'm working on the same problem right now. I'll take a look at TagSoup. Otherwise, I was just thinking of scrubbing out the invalid tokens before sending it to the xml reader. Please let me know what you find/ decide to do. On Feb 28, 8:19 pm, Tim Bray timb...@gmail.com wrote: On Sat, Feb 28, 2009 at 5:53 PM, grennis gren...@gmail.com wrote: I'm using the SAX parser to read some RSS feeds and have found a problem In general you can't use a real XML processor, which the java SAX stuff is, to read RSS feeds. Lots and lots of them aren't XML at all. Atom 1.0 is better, but lots of feeds aren't Atom. Once somebody ports either Jython or JRuby and gets it really running, the problem is solved because you can use the excellent Feedparser library, which Just Works on any imaginable feed. In the interim, you might want to consider John Cowan's excellent TagSoup, which handles what its name suggests. Libxml2 also has a forgiving parser but I don't know if there's a Java interface to that. -T . Some feeds, for example CNN Money Top Stories, have embedded some characters in their content, I.e. the copyright symbol. Well, that's not valid XML and the SAXParser fails with an exception invalid token. The only help I have seen given is to fix the XML at the source and that's not an option obviously. So, I can think of 2 options and they both stink: (a) read the content first, scrub it, and then pass it to the parser. (B) use DOM instead of SAX. What I *want* to do is make the parser a little more forgiving and just accept or discard/ignore the bad text. I'm not have any luck with setErrorHandler. My error handler does not get called. Can anyone offer some help on this? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: what happened to Logcat inside eclipse?
Ok, I found it. Thanks. On Mar 1, 5:49 pm, Charlie Collins charlie.coll...@gmail.com wrote: Definitely still there with 1.1. Maybe you closed the view, or something is corrupt? You can open just that view (Eclipse view I mean). Window-Show View-Android- pick from there. http://code.google.com/android/intro/develop-and-debug.html#developin... On Mar 1, 6:39 pm, 3D ernestgfre...@gmail.com wrote: With SDK 1.0 I liked using Logcat inside Eclipse. I can't find it with SDK 1.1 so I'm using Logcat in terminal but its not as nice - no color-coding and more difficult to read. Is it still there in Eclipse? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: SAXParser fails on some RSS feeds
I just wanted to report that I've tried TagSoup and at first glance it seems to be doing exactly what I want - this is great! Instead of using a SAXParserFactory I'm now using the SAXFactoryImpl class in TagSoup to instantiate a new SAXParser. I will need to look it over a bit more but it just parsed through a copyright symbol without any complaints!! On Mar 1, 7:32 am, StefanK skyntc...@gmail.com wrote: In my experience, the problem is in many cases in the character encoding used in the feed. If the feed is encoded using ISO-8859-1 encoding (which is what CNN top stories appears to use), and you are trying to read it using the default UTF-8 encoding some symbols will come as invalid and break the parser. The only viable solution is to manually detect the encoding before trying to parse and then construct the input stream given to the parser with the correct encoding. This is what I end up doing for BeyondPod in both Windows Mobile and Android platforms and this solved large set of parsing issues. Welcome to the bizarre world of RSS parsing. Stefan On Mar 1, 10:03 am, grennis gren...@gmail.com wrote: OK, thanks all. I didn't realize the problem was as pervasive as it is. I'm presenting a limited set of feeds so I'm hoping the scrub approach will work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Can I download my code off my phone?
I just finished a couple hours of work updating my app and I have it running on my phone in debug mode (unsigned). I accidentally replaced my recent files with old ones and that recent work is now gone. Is there a way to extract my code from my phone? Keep in mind that it was not signed I believe so should be in debug mode. Please help. Thanks! I'll be re-doing all the work now but maybe you can respond soon enough and save me the time. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] DEFAULT_ALL crashes app
I've been using: Notification.DEFAULT_SOUND for quite some time with great success. When I replace that with: Notification.DEFAULT_ALL the program crashes when the notification is called. What's up with 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] Re: DEFAULT_ALL crashes app
Has anyone else experienced this? It crashes both on the emulator and my G1. On Feb 9, 1:13 am, 3D ernestgfre...@gmail.com wrote: I've been using: Notification.DEFAULT_SOUND for quite some time with great success. When I replace that with: Notification.DEFAULT_ALL the program crashes when the notification is called. What's up with 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] Re: DEFAULT_ALL crashes app
Ok, I found the problem and it is simple... I needed vibrate permission in the manifest! Am I really the only noob making this mistake though... Anyway, just add: uses-permission android:name=android.permission.VIBRATE / inside the manifest tag (same level as application) and you are golden. On Feb 9, 4:11 pm, Dianne Hackborn hack...@android.com wrote: At the very least you should post a stack crawl. On Mon, Feb 9, 2009 at 4:01 PM, 3D ernestgfre...@gmail.com wrote: Has anyone else experienced this? It crashes both on the emulator and my G1. On Feb 9, 1:13 am, 3D ernestgfre...@gmail.com wrote: I've been using: Notification.DEFAULT_SOUND for quite some time with great success. When I replace that with: Notification.DEFAULT_ALL the program crashes when the notification is called. What's up with that? -- 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. 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: SAXParser getting stuck on certain characters
Thank you both for your responses! I think I will try just removing these characters. On Jan 28, 9:14 am, Brad Gies rbg...@gmail.com wrote: Well. the best thing to do would be to escape those characters at the server that sends the document, but if that is not possible then you could download the document into a Stream, escape them there, or even remove them, and then pass it to the SAX parser. Later, if you display the contents, you would have to unescape the contents before you display it. Sincerely, Brad Gies - Brad Gies 27415 Greenfield Rd, # 2, Southfield, MI, USA 48076 www.bgies.com www.truckerphone.com www.EDI-Easy.com www.pricebunny.com - Moderation in everything, including abstinence _ From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Tim Bray Sent: Tuesday, January 27, 2009 3:21 PM To: android-developers@googlegroups.com Subject: [android-developers] Re: SAXParser getting stuck on certain characters On Tue, Jan 27, 2009 at 12:10 PM, 3D ernestgfre...@gmail.com wrote: I'm using a SAXParser to parse an XML document and its getting stuck on certain symbols like the 'trademark' symbol and I think even double- quotes . I really don't need these characters so it would be fine if the parser just skips over these. Instead it throws an exception and quits parsing the document. What can I do? XML is very fussy about character encoding. If your supposedly XML doc has malformed characters (for example, if some UTF-8 got dropped into what you think was ASCII, or ISO-8859 into UTF-8), well, it's not XML, sorry, and the software won't let you do that. This is controversial (many people have historically thought it's OK to ignore internationalization problems) but it's the way it is, you're stuck with it. There are other parsers like TagSoup and one in xmllib2 that will let you bypass breakage and go on working, but they're pretty big chunks of code. -Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: SAXParser getting stuck on certain characters
Help please. On Jan 25, 11:18 pm, 3D ernestgfre...@gmail.com wrote: I'm using a SAXParser to parse an XML document and its getting stuck on certain symbols like the 'trademark' symbol and I think even double- quotes . I really don't need these characters so it would be fine if the parser just skips over these. Instead it throws an exception and quits parsing the document. What can I do? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] SAXParser getting stuck on certain characters
I'm using a SAXParser to parse an XML document and its getting stuck on certain symbols like the 'trademark' symbol and I think even double- quotes . I really don't need these characters so it would be fine if the parser just skips over these. Instead it throws an exception and quits parsing the document. What can I do? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Database Leak in LogCat - SQLiteDatabase, Cursor, Lifecycle
anyone else get Database Leak found in LogCat? What does it mean? Thanks. On Jan 10, 2:43 pm, 3D ernestgfre...@gmail.com wrote: In LogCat I keep gettingDatabaseLeakfound. The 'tag' isDatabase and the 'message' isLeakfound. And its followed by many lines of red in LogCat. I'm using an SQLiteDatabase and I access it from two Activities and one Service. In the Service I explicitly close both the cursor and then thedatabasesince I can't use startManagingCursor in there. In both Activities I open thedatabasein both onCreate and onResume and close in onPause. In one Activity I also use a cursor with startManagingCursor to manage that for me. So what is going on here? My app seems to be working almost all the time but the DatabaseLeakfound is very disconcerting. Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Database Leak in LogCat - SQLiteDatabase, Cursor, Lifecycle
Ok, I believe I have fixed it by every time I need the database creating it and then closing it immediately afterward. Seems obvious I guess - don't leave an open database floating around. On Jan 14, 12:33 am, 3D ernestgfre...@gmail.com wrote: anyone else getDatabaseLeakfound in LogCat? What does it mean? Thanks. On Jan 10, 2:43 pm, 3D ernestgfre...@gmail.com wrote: In LogCat I keep gettingDatabaseLeakfound. The 'tag' isDatabase and the 'message' isLeakfound. And its followed by many lines of red in LogCat. I'm using an SQLiteDatabase and I access it from two Activities and one Service. In the Service I explicitly close both the cursor and then thedatabasesince I can't use startManagingCursor in there. In both Activities I open thedatabasein both onCreate and onResume and close in onPause. In one Activity I also use a cursor with startManagingCursor to manage that for me. So what is going on here? My app seems to be working almost all the time but the DatabaseLeakfound is very disconcerting. Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Database Leak in LogCat - SQLiteDatabase, Cursor, Lifecycle
In LogCat I keep getting Database Leak found. The 'tag' is Database and the 'message' is Leak found. And its followed by many lines of red in LogCat. I'm using an SQLiteDatabase and I access it from two Activities and one Service. In the Service I explicitly close both the cursor and then the database since I can't use startManagingCursor in there. In both Activities I open the database in both onCreate and onResume and close in onPause. In one Activity I also use a cursor with startManagingCursor to manage that for me. So what is going on here? My app seems to be working almost all the time but the Database Leak found is very disconcerting. Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Context from which to initiate Service via Alarm Manager; Application Model Questions
I've created a simple app. to help me better understand a few key components in the real app I'm making. A snippet of what I've done: - an Activity is launched (lets call it the Home Activity) - from here I schedule an alarm - the alarm sets off a Pending Intent that starts a Service. - the above steps appear to do what I want them to do. My questions: - is a scheduled alarm persistent with respect to its creating process (I believe so) ? If the Home Activity is destroyed, the alarm still goes off, correct? - the PendingIntent that the alarm calls as well as the Intent nestled within both have a Context of the Home Activity. Is this a problem? Does the system launch the Home Activity again (if it has been destroyed since scheduling the alarm) just to launch the Service? - the Service does its task (some networking which will take a couple seconds) and then possibly creates a notification before killing itself (the alarm is repeating so it will get called again later). Does the Service need to make a new Thread to do its work in? The user is not interacting with the Home Activity at this point so I don't think a new Thread is needed. I think that sums up my questions for now. Advice will be greatly 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Streaming Media to Android Success!!!!
After purchasing 2 G1 phones I was very eager to use the 3G service in my area. Long story short when found that there is currently no media player on the OS out the box, I started to look and found that there was currently no solution available until I found this: www.Ifunpix.com I usually use ORB with WinMo6 on an HTC universal but it seems that ORB and Youtube are no good together yet on the G1. So with some limitation you can use IFUNPIX to handle video and audio streaming. Advanced features of Orb such as Webcam and TV viewing are not available but it's a start:P I have been using it for 20 minute streaming Prison Break and it seems to be OK out side of an occasional buffer oh and try not to scrub your file it will crash the video player. I forgot to mention I believe the stream will be played on the video player software that is available through the Android market. If anyone has something better please inform a fellow ORB'er. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---