Re: [android-developers] Parsing HTML
On 01/28/2010 02:31 PM, Allison Inouye wrote: > I am trying to parse an HTML document that is missing an end tag on > one of the elements (input tag). Anyone know how to get the parser to > ignore that it doesn't have an end tag and just read an attribute > value? > > DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); > DocumentBuilder builder = dbf.newDocumentBuilder(); > Document dom = builder.parse(url.openStream()); //ERROR HERE > > Error: > 01-28 21:34:38.384: WARN/System.err(12108): > org.xml.sax.SAXParseException: expected: /input read: div > (position:END_TAG @21:10 in java.io.inputstreamrea...@432749f8) > I was able to parse badly written HTML (is there another kind?) as XML by using JTidy (not on Android so YMMV): import org.w3c.tidy.*; Tidy tidy = new Tidy(); tidy.setXmlOut(true); tidy.setShowWarnings(false); tidy.setQuiet(true); tidy.parseDOM(connection.getInputStream(), null); -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Phoen application integration
Hi, I am currently designing a VoIP application for the Android platform. One requirement is the integration with the Phone application but unfortunately the only hook available seems to be the ACTION_NEW_OUTGOING_CALL intent. What would be a good way to have a better integration? I am open to any suggestion, from rewriting the Phone application from scratch to contributing modifications to the Android platform, as long as it permit to distribute my application through the Android Market. 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: just another android rtp stack question
maxsap wrote: > Anyone? > > On Dec 1, 3:34 pm, maxsap wrote: >> Hello all, I am new in android developer and I would like to make a >> sip based application for this platform. In the signaling part I have >> found about jain-sip (used it) and sipdroid( any good tutorial? ) the >> problem starts when I want to stream data from a phone to a server. So >> the question is: Is there any stack for RTP? does the new SDK support >> this? I have found this:http://www.hsc.com/tabid/87/ItemId/20/Default.aspx >> have anyone used this stack? also I found this video on >> youtube :http://www.youtube.com/watch?v=g1NHEsXFEnswhich demonstrates >> the use of rtp to stream video/audio is this fake does any one know >> how? also I have read somewhere on the net that sipdroid has support >> for rtp is this correct? Sipdroid implements its own RTP stack which would confirm that there is no RTP stack in the Android platform. You can reuse their code if you do not mind having your code been distributed under a GPL license. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] String isEmpty()
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/01/2011 12:40 PM, Doug Gordon wrote: > Why in the world would my app crash with a "No such method" Java error on a > statement like "if (!myString.isEmpty()" for a perfectly valid String object? > If > I simply change it to "if (myString.length() > 0)" it works just fine, so it's > not like I'm not pointing to a valid String object or anything. > > Interestingly, this only appears to happen when running it on my actual > Android > 2.2 phone. It works OK on a V2.3.3 emulator. It is built with the V2.3.3 SDK. > What gives? The method String.isEmpty() exists only since Java 1.6/Android API 9. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk6wTEwACgkQ9RoMZyVa61fD+gCdGHVsK5es6a7SmL/eIvM1PbEJ Y78An2ltBoh3UywysReYeUxDFgty8Ite =h2dt -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Using RIL for VoIP?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 You may be interested in a proposal for something similar: http://groups.google.com/group/android-platform/browse_thread/thread/f519754846888193?hl=en# I also pushed a patchset with the new API and an hacked implementation of this API, so people can try it: https://review.source.android.com/#change,16552 On 09/02/2010 10:48 AM, rams wrote: > Hi All, > > Please help in answering this question. > > Thank you, > Ram > > On Sep 2, 5:59 am, rams wrote: >> Hi JBQ & All, >> >> I want to extend the com.android.internal.telephony for VoIP >> functionality >> as follows: >> >> Dialer (with alphanumerals, spl characters) ---intent/sip: ---> >> PhoneApp > Telephony Manager > VoIP.java (VoIPJ) -> >> >> VoIP.c(VoIP Daemon) ---> our custom libraries for SIP >> >> Could you please tell me whether it is possible to do this in a >> cleaner way. >> >> Why we want to do like this is: >> >> I think Google Android will flow the same architecture later on. We >> can reduce porting effort. >> >> Also there is something misleading in this: >> >> Currently, GSM and CDMA are supported by Telephony Manager. They are >> the media and VoIP >> is a technology which works over the DATA (GPRS, EDGE, Wifi, WiMax or >> Ethernet). >> Is it correct to integrate the VoIP changes into the Telephony >> Manager? >> >> I have seen opensource Android VoIP applications completely skip >> Telephony Manager (Framework Layer) >> and develop their applications as follows: >> >> Application ---> Service > Socket > Native C lib >> >> Application > Native C ---> Kernel (FW or Telephony Manager layer >> is skipped) >> >> Which is the best way to do this? >> >> Could you please suggest? >> >> Thank you, >> Ram > -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkx/7voACgkQ9RoMZyVa61cBBQCgkjx4JYjbMz+J5M6fRRVcg0EB xKUAn29bHv7/koRBMU4BmlhzV6RMFRMj =srBa -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] about android Reversepengineering !!!!
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/05/2010 09:38 PM, xc s wrote: > My English is just so-so . I dont 'want to other people > reversepengineering. my android app. how should I do? Easy. Do not give it to other people. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkyEc1EACgkQ9RoMZyVa61ejAgCfYyKV53AbDb9PIjjmbg40dxzI cUsAnjW/NX13tBVg6FgLf9X32CCxvJ9S =9Kka -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Android SDK is so slow that is ridiculous.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/29/2011 10:55 AM, Leigh McRae wrote: > It's easy to say that until you have actually written an OpenGL game for > Android. Running at seconds per frame instead of frames per second > means you can ONLY test on real hardware. On real hardware my game > (Tank Recon 3D) takes over 5 minutes to load in the debugger (30 seconds > on BlackBerry). Even working with these limitations you also have to > develop for the different OS versions and screen sizes. > > Now I understand what you're saying with the emulation but this blanket > answer is getting kind of old. Stop giving the 'You can't get there > from here' answer and try and figure something out. The BlackBerry > emulators route the OpenGL calls to the desktop PC and allow you to > choose the level of acceleration. Maybe this is something that can be > looked into. Sure I know you're not getting a 1:1 mapping but it does > allows you to develop. How about making a new driver backed by the > desktop GPU and give some way to select it? And what about you write and contribute this driver to the code base? There was something I disliked in the phone emulator, I fixed it for myself, and then submitted it in Gerrit and the patch was accepted, all in less than two months and it is now part of Gingerbread. Complaining about missing features on an open source project is ridiculous. > > On 1/29/2011 12:53 PM, Dianne Hackborn wrote: >> On Sat, Jan 29, 2011 at 1:26 AM, Miguel Morales >> mailto:therevolti...@gmail.com>> wrote: >> >> Not to mention that testing OpenGL games is impossible. The only way >> to test on devices is users, otherwise it's just a guessing and >> hoping >> for the best. >> In any case, I don't care WHY the emulator is so slow. Hopefully >> they'll make it fast in the near future, the iPhone emulator is much >> better. >> >> >> At the end of the day, you absolutely need to test and run on a >> device, especially for doing things like OpenGL games. An emulator or >> simulator on desktop hardware is never going to give you a good idea >> of how your app performs on real hardware. >> >> This isn't an excuse for the emulator being slow (we really would like >> to improve it, this is just a fairly challenging problem), but no >> matter what is done it can never be a replacement for running on a >> real device. >> >> -- >> Dianne Hackborn >> Android framework engineer >> hack...@android.com <mailto: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 > - -- Marc Petit-Huguenin Personal email: m...@petit-huguenin.org Professional email: petit...@acm.org Blog: http://blog.marc.petit-huguenin.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk1EcS8ACgkQ9RoMZyVa61es6wCeMZHA1Lu5GrzI4qNBIpW/vMQX 6NIAn3azdKrV6q6BAurX2sDMwJsEkfMp =tUSL -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Server Response
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/09/2011 03:24 PM, Atif Musaddaq wrote: > Hi, Guys > > I am sending some data to the PHP server and based on this data server > is sending "true" or "false" back to me. > > e.g > > echo "true"; > OR > echo "false"; > > Now on the android side i write this code in Post method > > try { > post.setEntity(new UrlEncodedFormEntity(nameValuePairs)); > HttpResponse response = client.execute(post); >HttpEntity entity = response.getEntity(); >String responseText = EntityUtils.toString(entity); > Toast.makeText( getApplicationContext(), > responseText,Toast.LENGTH_SHORT).show(); > Log.i("Output",responseText); > > // till here it is showing me either true or false >if (responseText == "true") if ("true".equals(responseText)) > { > // call activity A > }else{ > > // call activity B >} > > Now it shows me response either true or false based on the data i send. > but it is not comparing the if condition. i would like to further call > Activity A or B based on true or false. > > Can any one help me and tell me what i am doing wrong here ? why it is > not comparing the condition ? responseText is already string and > also comparing String - -- Marc Petit-Huguenin Personal email: m...@petit-huguenin.org Professional email: petit...@acm.org Blog: http://blog.marc.petit-huguenin.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk1TI+YACgkQ9RoMZyVa61ec9ACfTvys0ZQoWzbmaauhwV/SDlQF to0AnA4YiFQSmgq1rvjIJk3YRzapgicp =qFJL -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Split line of text into few lines
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 If your concern is to split the line at a word boundary, you may want to look at java.text.BreakIterator. On 07/29/2010 10:52 AM, Grzegorz Ae wrote: > Hi, > I'm wondering how can I split single line text into few lines. I need > it for game. I want to make it in canvas. It will be notification > popup, but sometimes text is too long (I draw text canvas.drawText()), > and I need to split it and draw in few lines in rows. Anyone knows a > good solution? I saw methods mPaint.measureText() or > TextUtils.split(), but it isn't so good in my case. Is there other > method? > -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkxRwiQACgkQ9RoMZyVa61cRgACfQFx9g1jqpVszX9e4pNQp5RRs f2AAoKc1J8SPgPjnmXa6WDg/s19cHZAQ =Y5Hv -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Search a non-functioning Nexus One car dock
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I search a non-functioning Nexus One car dock, i.e. a Nexus One car dock (the one formerly sold by Google on their online shop) that have the plastic intact but with the electronic dead or something else that make it unusable. I could buy one on EBay but it is ridiculous to buy one just to destroy it. I live in the Bay Area, and I am willing to drive to pick it up. Thanks. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkxbX5kACgkQ9RoMZyVa61cLAACgnVKkdmWDJxuZjiYPSXxR1RMn U0EAnR4RrQexoKWGYCkc1KJGLC8G69Bb =cN49 -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Scanner USB and android tablet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/12/2011 08:59 AM, Lewis wrote: > I highly doubt such a thing exists as Android does not currently > support USB host mode One solution is to use a Bluetooth scanner. > > Regards, > > Lewis > > On Jan 12, 2:15 pm, ftovalle wrote: >> hi everyone, >> does anyone know of a bar code scanner that can connect via USB or >> mini USB to a tablet of Android? >> >> thanks! >> Felipe > -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk0t6G4ACgkQ9RoMZyVa61f/KwCeP+3ePdImP5EVP1oXU13kfTvP 9tEAn1TTzFqEkwsP5uF9NDg9SFULGa5K =CSAU -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Scanner USB and android tablet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/12/2011 09:49 AM, Marcin Orlowski wrote: >> One solution is to use a Bluetooth scanner. > > > Well, there's quite nice "Barcode scanner" app on Market so it > also a solution however I'd bet it will be a bit too slow and uncomfortable > to use (not to mention focus issues most devices have) I assumed that the OP wanted to use the Android tablet in a professional environment (inventory, etc...), in which case having an hand held scanner is mandatory. A Bluetooth scanner (or a scanner with a serial port and a Bluetooth/Serial bridge, like the Iogear GBS301), is a good solution in this case, and writing the Android app should be simple. - -- Marc Petit-Huguenin Personal email: m...@petit-huguenin.org Professional email: petit...@acm.org Blog: http://blog.marc.petit-huguenin.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk0t7MQACgkQ9RoMZyVa61eXXACfScMX6ODJAVBzNPASCfTuoiH3 EXEAmQEkKGuBy43C4eJGprrqiVzLKYiH =qJl4 -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Google Nexus S - Secure storage
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/03/2011 06:17 PM, sebastian nielsen wrote: > The keys should survive a compromise which consist of both rooting and > cloning a device. > Eg, If I leave my device on a table in a train, and one year later, > finds my device again, I should be sure that my keys are not > compromised. (If a adversial *uses* my key does'nt matter). > In other words, If I have my device in my hand, I want to be sure that > nobody has a copy of my encryption key, even if the device has been > compromised prior to getting the device in my hand. I bought one of those for this reason: http://www.gd-sfs.com/the-mobile-security-card/mobile-security-card-ve-2-0/ Code is available here: http://code.google.com/p/seek-for-android/ I yet have to play with it., but that looks promising. - -- Marc Petit-Huguenin Personal email: m...@petit-huguenin.org Professional email: petit...@acm.org Blog: http://blog.marc.petit-huguenin.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk1wV88ACgkQ9RoMZyVa61f4VgCgleRcjisH/21s/CQAGMEe/ola /acAnAyeR1/4rtIUULm9jFfK29pGPA+G =Kqyy -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Google Nexus S - Secure storage
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/03/2011 07:43 PM, sebastian nielsen wrote: > Marc Petit-Huguenin: How did you get one bought (cant find any buy > option, and It would be good if you could point me to a webstore that > sells those secure MicroSD cards) and how much do they cost? Well, it's a PITA, as you cannot pay by credit card. I had mine bought by a German friend of a friend, who was traveling to the US. Anyway, here's the website: https://www.cardsolutions-shop.com/shop/gi-de/ > > Nikolay: In this case, the security is about singulary. The key should > be copy protected, but it does not need to be use-protected because I > want to be sure, that if I leave the phone on a table, go on toilet, > come back and take it back, I can be sure that nobody has access to my > key, even if they impersonated me in that little brief amount of time > that I was on toilet for example. > Having the key stored in "software" (eg software token or in standard > phone memory), the key is no longer secure, since if I leave my phone > out of sight even for a brief amount of time, its possible that > somebody just copied my key. > If I store the key in software, I would need to have 100 % of sight of > the phone all the times, else the key could be regarded as > "compromised". > > In other words, if I have the phone in my hand, I should be > *absolutely* confident in that nobody can authenticate as me. > > Another example, I lend my device to my friend for the purpose that my > friend can log in to my account for a brief time. When I then get the > device back from my friend, I want to be sure that my friend doesn't > have a copy of my private key and can log in as me, in case we stop > being friends and sabotage for me. > - -- Marc Petit-Huguenin Personal email: m...@petit-huguenin.org Professional email: petit...@acm.org Blog: http://blog.marc.petit-huguenin.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk1wbLMACgkQ9RoMZyVa61d3TgCeKdEj8lZ9STX7GsDpkGeGG5EU W80AoJCYlMqSPIa57+MbkB0WUI00A1OX =LQxo -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Google Nexus S - Secure storage
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/03/2011 07:06 PM, sebastian nielsen wrote: > Also found some on the internet, about Nexus S having a PN65N which > according to sources of the internet, is a SmartMX security chip > combined with a NFC chip. It seems that it is in fact an NXP PN544. Anyway having a secure element integrated in the Nexus S would be great news, even if it take some time to be able to use it. But knowing that the chip can support a secure element does not mean that there is one. > > Any ideas on how to use this security chip? Eg writing data > (generating/writing RSA keys or writing symmetric keys) into the chip, > extracting generated _public_ keys and also use the keys for > encryption/decryption? > > Any ideas on how to do it in Android? I was not able to find anything in the current AOSP, but I think that a lot of work would be needed to have this. First you need the integration of pcsclite, similar to what seek-for-android did. But after this someone need to write a PKCS#11 provider implementation, similar to the SunPKCS11 provider. I was not able to find one, either in Apache Harmony or BouncyCastle, so that probably something that had to be written from scratch. After this, and assuming that the Nexus S really contains a secure element, any Android app will be able to store/generate and use RSA/ECC keys in a secure way. - -- Marc Petit-Huguenin Personal email: m...@petit-huguenin.org Professional email: petit...@acm.org Blog: http://blog.marc.petit-huguenin.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk1yYcsACgkQ9RoMZyVa61fSMACfTmbS1RpO96mVm4D2QdpP5OBh HUAAn2HuxgsciCfo89O01bJSIp0IsOgb =nvN4 -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en