[android-developers] Android's UrlConnection doesn't support HTTP 1.1 persistent connections...why?

2012-02-08 Thread Biosopher
As of HTTP 1.1, socket connections should be persisted for re-use across calls. This greatly reduces the overhead of network connections especially for mobile devices Android's UrlConnection doesn't appear to honor this HTTP 1.1 specification. E.g. I performed a TCP dump of traffic from my app

[android-developers] Re: Android's UrlConnection doesn't support HTTP 1.1 persistent connections...why?

2012-02-08 Thread Biosopher
Sorry I mis-typed the problem class. UrlConnection does properly supports HTTP 1.1 and persistent connections. However DefaultHttpClient does not. I have validated this by viewing the packets using WireShark on my Android device. -- You received this message because you are subscribed to the

[android-developers] Re: Accessing Facebook photos from the Contacts provider

2011-01-12 Thread Biosopher
After scouring the web and confirming it myself, Facebook's photos are stored in a manner that prevents access by other apps. This inability to access Facebook sync'd photos is a side effect of how Facebook syncs contacts. Facebook creates an account on the device using Android's AccountManager

[android-developers] Re: Accessing Facebook photos from the Contacts provider

2011-01-11 Thread Biosopher
That's right, appel. I'm trying to access the FB contacts through the ContactsContract. Seems like the Facebook photos are stored with special permissions. I can get an FB photo's row _id from the Photos db but cannot retrieve the photo for some reason. -- You received this message because

[android-developers] Accessing Facebook photos from the Contacts provider

2011-01-10 Thread Biosopher
From what I've read so far, it's not possible to access any of the photos that Facebook syncs to the Contacts provider. Does anyone know a way around this other than (1) asking the user to login with their Facebook credentials, (2) downloading the photos again using the FB social graph, and (3)

[android-developers] Re: How does Beautiful Widget do it?

2011-01-10 Thread Biosopher
That was it Mort. 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

[android-developers] How does Beautiful Widget do it?

2010-12-14 Thread Biosopher
Does anyone know how Beautiful Widget shows clouds floating over the top of all the desktop icons as well as over the top of any running application on device unlock? It seems odd that they would be able to grab the render buffer of a running application and display info above it. Any info would

[android-developers] Re: How does Beautiful Widget do it?

2010-12-14 Thread Biosopher
Thanks for the hint, Pent. Sadly not enough to go on there. The app permissions are: Storage Your Location Network Communicaitons System Tools Mabye something in System Tools? Please offer any more advice of you have it? Anyone? -- You received this message because you are subscribed to

[android-developers] Allowing one .apk to install another?

2010-11-23 Thread Biosopher
We are providing an Android Service to multiple customers for packaging into their .apks and need to ensure that only a single instance of our Service is running at a time. The ideal situation would be this: When one of our customers's apps is installed on a device, it looks for instances of our

[android-developers] WebView.setEmbeddedTitleBar (public API or not?)

2010-06-11 Thread Biosopher
BrowserActivity uses WebView.setEmbeddedTitleBar to create the cool search bar feature at the top of it's web pages. This embedded title bar doesn't zoom when the users zoom the web page or scroll left/ right. My question is whether WebView.setEmbeddedTitleBar is a public API? The source shows

[android-developers] How do we attach an image/files to a forum posting?

2010-06-04 Thread Biosopher
I've seen a few people attached images files to their posts. Could somebody explain how I can do this? I don't see any options for doing this when I post a message. Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this

[android-developers] Re: How do we attach an image/files to a forum posting?

2010-06-04 Thread Biosopher
Figured it out. Send emails to the Google Group (e.g. android- develop...@googlegroups.com assuming your a member of the group) along with image/file attachments. Here's what I achieved: http://groups.google.com/group/android-developers/browse_thread/thread/2eb18f338d007b2b# -- You received

[android-developers] How to have one ContentProvider call another ContentProvider (ContentProvider chaining?)

2010-05-17 Thread Biosopher
I have a ContentProvider class that I want to securely expose to 3rd party apps using Android's read/write permissions in the provider tag of the manifest. I prefer to have two content providers though: my main provider and an externally accessible provider would access the main provider for

[android-developers] ContentProvider: multiple read/write permissions

2010-05-17 Thread Biosopher
I need to ship my content provider with multiple read/write permissions. Can I simply enter the permissions as a comma separated list as below? provider android:name=.HelloProvider android:authorities=com.android.HelloPlugin android:writePermission=xxx, yyy, zzz android:readPermission=xxx, yyy,

[android-developers] DDMS not showing all active processes for my Nexus One

2010-05-15 Thread Biosopher
This problem came up recently but everything seemed to work fine before. I am using the application flag: android:debuggable=true For some reason though, DDMS is not showing my application's active processes on my Nexus One. Anyone with recommendations? I've already rebooted both my laptop,

[android-developers] Why add child Activities to TabActivity instead of simply using Views

2010-03-17 Thread Biosopher
I've been programming in Android for two years now and just joined an Android project where they are using a TabActivity to host multiple Activities. It's unclear why this is better than rewriting the TabActivity to simply use Views instead. TabActivity extends ActivityGroup which means

[android-developers] Re: Digicert signed https certificate throwing SSLException (Not trusted server certificate)

2010-02-08 Thread Biosopher
FYI...in our case, the certificate was not installed properly on the server. You can test your certificate here: http://www.digicert.com/help. Make sure to scroll to the bottom as some error only show up a few pages down. -- You received this message because you are subscribed to the Google

[android-developers] Re: Multi-threaded http requests cause exception

2010-01-28 Thread Biosopher
Hi Frank, Thanks for pointing me back to AsyncTask. I had seen AsyncTask but hadn't updated my code to it. Instead I had relied on Threads and Handlers as they had worked without a problem before. I'm still unsure why the Thread and Handler setup wasn't working, but now that I've updated to

[android-developers] AsyncTask and simultaneous network downloads

2010-01-28 Thread Biosopher
I am performing several https posts and http downloads from two different servers using AsyncTasks. The connections are fairly quick but I'm surprised to see that they are running synchronously instead of in parallel. To be more explicit, here is pseudo-code for what's happening when I initiate

[android-developers] Re: AsyncTask and simultaneous network downloads

2010-01-28 Thread Biosopher
Thanks Streets. That appears to be the issue, however it's odd that I'm hitting AsyncTask's thread pool limit so quickly with just 3 tasks running. Looking at AsyncTask's code, I see these values: private static final int CORE_POOL_SIZE = 1; private static final int MAXIMUM_POOL_SIZE = 10;

[android-developers] Re: AsyncTask and simultaneous network downloads

2010-01-28 Thread Biosopher
Hi Jason. Thanks for requesting the clarification. My code is actually calling AsycnTask.execute(). I should have made that clearer in my pseudo-code. The description above shows all threaded portions of the app. I stripped down to a basic test implementation to isolate the multithreading for

[android-developers] Re: AsyncTask and simultaneous network downloads

2010-01-28 Thread Biosopher
Here's the code: public class ProcessFiles extends AsyncTaskVoid, String,Void { protected Void doInBackground(Void unused) { File sdcard = new File(/sdcard); for (int i = 0; i sdcard.list().length; i++) { File file = new

[android-developers] Re: AsyncTask and simultaneous network downloads

2010-01-28 Thread Biosopher
HttpClient doesn't serializing the requests from what I can tell. Before switching to AsyncTask, I was using Threads and the http requests were running in parallel. It's only since I switched to AsyncTask that everything started running in parallel. -- You received this message because you are

[android-developers] Re: AsyncTask and simultaneous network downloads

2010-01-28 Thread Biosopher
Got an update here. The AsyncTask code above appears to run in parallel on a device. Maybe there's something non-parallel in the Emulator's version of AsyncTask? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send

[android-developers] Multi-threaded http requests cause exception

2010-01-27 Thread Biosopher
I have an app making an https post on one thread while performing a file download on another thread. For some odd reason, I am getting a ClientProtocolException saying that The server failed to respond with a valid HTTP response. The error goes away if everything is run on a separate thread.

[android-developers] Re: Multi-threaded http requests cause exception

2010-01-27 Thread Biosopher
I've tracked the problem down to a rather odd place: Handler. The first post networking call is kicked off on a separate thread when the user clicks a button. When this call returns its result, a Handler is spawned to update the UI and also download the image data for display in a newly created

[android-developers] Re: Digicert signed https certificate throwing SSLException (Not trusted server certificate)

2010-01-26 Thread Biosopher
Solved my problem. Turns out I didn't have my intermediate certificates installed properly. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this

[android-developers] Https: CertPathValidatorException (TrustAnchor for CertPath not found)

2010-01-25 Thread Biosopher
The Error: Unexpected network error while connecting to web service: Not trusted server certificate javax.net.ssl.SSLException: Not trusted server certificate at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake (OpenSSLSocketImpl.java:363) . Caused by:

[android-developers] Service callback to Activity

2010-01-13 Thread Biosopher
Our application will expose a Service that can be called by Activities in other people's applications. In many cases, the parent applications calling Activity may be paused before our Service completes. I am looking for the best way for a Service to communicate back to the calling Activity that

[android-developers] AudioRecord works with short but static with byte

2010-01-08 Thread Biosopher
Any idea why reading bytes from AudioRecord would cause an error while reading shorts would not? The sound comes through great with short but I get only static with bytes. Working code with short[]: int minBufferSize = AudioRecord.getMinBufferSize(this.getSampleRate(),

[android-developers] Re: AudioRecord works with short but static with byte

2010-01-08 Thread Biosopher
Interesting point, Jason. However I'm reading a byte at a time so each short is read (just one byte at a time). There shouldn't be anything leftover to be missed. More important though, I'm reading the byte[] using a method provided by Android's AudioRecord. read(byte[] audioData, int

[android-developers] Re: AudioRecord works with short but static with byte

2010-01-08 Thread Biosopher
I agree Jason. It seems requesting the 16 bit format results in a short array being returned: AudioFormat.ENCODING_PCM_16BIT. For byte[], I would need to use this format: int audioEncodingFormat = AudioFormat.ENCODING_PCM_8BIT; Curiously it seems that AudioFormat.ENCODING_PCM_8BIT doesn't seem

[android-developers] Re: Performance issue: Dalvik VM is 20x slower than most modern Java VMs

2010-01-07 Thread Biosopher
The Dalvik JIT appears to result in a 1.7x improvement when run on an armv7. Here's the post from the Android team: http://groups.google.com/group/android-platform/browse_thread/thread/331d5f5636f5f532/dee6e0a81ae72264?#dee6e0a81ae72264 The Android team's independent benchmark results are here

[android-developers] Re: Performance issue: Dalvik VM is 20x slower than most modern Java VMs

2010-01-07 Thread Biosopher
Hi dm1973, Actually these tests are not useless. Of course good modern compilers should optimize away the code above. The reality is that the Android compiler is not a good compiler so it does not optimize the above code. This allows the simple example above to show the performance limitations

[android-developers] Re: Performance issue: Dalvik VM is 20x slower than most modern Java VMs

2010-01-07 Thread Biosopher
Just following up to my initial post, I have implemented the above look in native code using Android's SDK. The native code performs in a few milliseconds as hoped. This goes to confirm that for compute intensive tasks, Dalvik can be hundreds of times slower than native. -- You received this

[android-developers] Performance issue: Dalvik VM is 20x slower than most modern Java VMs

2010-01-06 Thread Biosopher
I'm writing a processing intensive digital sound processing app (requires numerous (50,000) Fast Fourier Transforms - FFT). This challenge led me to perform basic performance tests of Android running on an HTC Hero. The results show the Dalvik VM to be 20 times slower than a modern JIT-enabled

[android-developers] Re: Performance issue: Dalvik VM is 20x slower than most modern Java VMs

2010-01-06 Thread Biosopher
Thanks Niko, I've been researching the NDK and am about to run the same performance tests there as well. I really didn't want to add the additional complexity of the NDK but seems that might be the only solution. I found a blog documenting the same performance issues so it appears my own

[android-developers] Classes missing from .apk file

2009-12-26 Thread Biosopher
My Eclipse has been working with Android for a couple years, but all of a sudden I got this strange bug: I needed to update an old Android 1.0 project to 1.5 so I created a new project in Eclipse and copied my old files into this new project. Everything compiled fine but when I launched the

[android-developers] Re: Classes missing from .apk file

2009-12-26 Thread Biosopher
Note: I did a fresh clean and rebuild but that hasn't helped either... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to

[android-developers] Re: Classes missing from .apk file

2009-12-26 Thread Biosopher
OK...maybe my question was posed improperly. It seems the .apk doesn't contain individual class files. Instead the .class files are first compressed into classes.dex which is then packaged into the .apk. My .apk does have a classes.dex so supposedly my classes are in the .apk. That still

[android-developers] Why must WebView display local files via a ContentProvider?

2008-11-05 Thread Biosopher
In case you hadn't heard, WebView won't display local files directly via loadUrl(file://YOUR_PATH/file.html). All the solutions create a ContentProvider to access the local files and send them to a WebView using ContentProvider.openFile(). This approach seems less secure than simply sending my

[android-developers] Re: ArrayAdapter

2008-10-30 Thread Biosopher
I used notifyDataSetChanged() and it works fine for me. Here's my complete code with the notifyDataSetChanged() at the bottom in the selection listener: package com.pocketjourney.location.map; import java.util.List; import android.content.Context; import android.view.LayoutInflater; import

[android-developers] Re: What's the Cost ??

2008-10-23 Thread Biosopher
The lock may be built into the phone's ROM...so a rebuild of Android's source code won't work. As the G1 runs on T-Mobile's 3G which uses a different 3G bandwidth than ATT's, you'll be stuck with the EDGE network if you use your ATT SIM in your T-Mobile G1.

[android-developers] Re: java.lang.VerifyError

2008-09-23 Thread Biosopher
Tracked down this bug in my own code. Turns out that my .jar file was incomplete (missing a .class file). Now that the .class is added back, all works fine. - Anthony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[android-developers] Re: anyone has problem with verifyError?

2008-09-23 Thread Biosopher
Tracked down the same VerifyError in my own code. Turns out that my .jar file was incomplete (missing a .class file). Now that the .class is added back, all works fine. You might get this error if your .jar is not properly added to the project as well. - Anthony

[android-developers] Re: problem with verifier

2008-09-23 Thread Biosopher
Tracked down the same VerifyError in my own code. Turns out that my .jar file was incomplete (missing a .class file). Now that the .class is added back, all works fine. You might get this error if your .jar is not properly added to the project as well. - Anthony

[android-developers] Re: java.lang.VerifyError with 0.9

2008-09-23 Thread Biosopher
Tracked down the same VerifyError in my own code. Turns out that my .jar file was incomplete (missing a .class file). Now that the .class is added back, all works fine. - Anthony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[android-developers] Re: anyone has problem with verifyError?

2008-09-19 Thread Biosopher
I'm getting this same VerifyError: WARN/dalvikvm(2026): VFY: unable to resolve static method 804: Lcom/ pocketjourney/view/util/HtmlUtils;.shortenHtml (Ljava/lang/ String;I)Ljava/lang/String; WARN/dalvikvm(2026): VFY: rejecting opcode 0x71 at 0x0022 WARN/dalvikvm(2026): VFY: rejected

[android-developers] Re: java.lang.VerifyError

2008-09-19 Thread Biosopher
Same problem here. Is there a PERMISSION variable that must be set in the manifest.xml file or something? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email

[android-developers] Re: About highlightbar in the List

2008-06-20 Thread Biosopher
I'm still confused as to why touching the screen does not show a highlight. Is there a usability reason for this or is it a technical limitation? From my POV, a highlight on touch would seem the most natural approach. - Biosopher --~--~-~--~~~---~--~~ You

[android-developers] Re: 3 new Android tutorials on how to build a service enabled Android app

2008-06-06 Thread Biosopher
My guess is your online multi-player game is checking a remote server to see what actions other users are taking. All those server calls responses should be performed in a Service. Is that what you were asking about? Biosopher --~--~-~--~~~---~--~~ You received

[android-developers] Re: LifeCycleDemo - android.app.Activity

2008-06-05 Thread Biosopher
Thanks for the video, Damien. I just posted about the video on my own blog so you should be getting more traffic sent your way: http://blog.pocketjourney.com Cheers, Biosopher --~--~-~--~~~---~--~~ You received this message because you are subscribed

[android-developers] Re: SDK Update?

2008-05-11 Thread Biosopher
We need regular updates...especially because this isn't a shipped product so Google should be providing updates more rapidly. Google's stated approach to dev rapid prototyping so they should be putting out 2 new SDKs for each Apple SDK. That said, I'm glad they didn't put out one during the

[android-developers] Re: Android Developer Registry

2008-04-30 Thread Biosopher
So in the meantime, all interested developers should post their background/stats info here as described in the initial posting. Biosopher --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group

[android-developers] New tutorial: Image Text-Only Buttons

2008-04-30 Thread Biosopher
here: blog.pocketjourney.com Cheers, Biosopher --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from

[android-developers] Re: Android Developer Registry

2008-04-29 Thread Biosopher
I’ll go first to kickoff the registry. Here are my stats: Level: Senior Developer Android Skills: Maps, UI component design (user interface), GPS, MediaPlayer, server-side (JSP/Struts/Ajax) Project: www.pocketjourney.com Contribution to above: Founder, CTO, and lead developer Availability: I

[android-developers] Re: Android Developer Registry

2008-04-29 Thread Biosopher
Thanks Shane. I tried to find a similar registry at SlideMe.org but couldn't see anything like I've suggested above. Biosopher --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post

[android-developers] Re: iPhone SDK lacks mapping function

2008-04-23 Thread Biosopher
I'm still digging into the iPhone SDK versus Android diffs. As you can imagine though, the iPhone's media support is substantially better than what Android has. Makes sense though. The iPhone is a mobile media play while Android is more of a location-based media play. If you're a pure media

[android-developers] iPhone SDK lacks mapping function

2008-04-22 Thread Biosopher
of the apps submitted to the Android Challenge. If you want, you can read more about this discovery here: blog.pocketjourney.com. Cheers, Biosopher --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group

[android-developers] Re: Add more features on my application

2008-04-17 Thread Biosopher
Good luck Moussa, Great name...hope to have it on my phone sometime. Anthony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: Add more features on my application

2008-04-16 Thread Biosopher
My app requires interaction with the server so I can at minimum tell you that the judges haven't launched my application yet as there have been no hits to my sever yet. And I don't believe my app (pocket journey) is so awful that it won't get at least an initial run- through. Moussa, I saw in

[android-developers] Re: Good Luck to everyone !

2008-04-15 Thread Biosopher
Ditto to all that. It's been a strange wild trip that I never expected when I first heard about Android... Kudos to the Google Crew for creating such an engaging dev experience. Also a massive high-five to everyone that setup the external sites as well. I spent many an hour surfing this forum

[android-developers] Open for Tutorial Requests

2008-04-09 Thread Biosopher
Pocket Journey would never have made it without all the tutorials and discussions people have posted. I've created a few tutorials myself, but wanted to make an offer to help some of you as the deadline nears. I just posted an announcement video screenshots of Pocket Journey: