[android-developers] How to optimize image polling on the network for a gridview inside a view pager

2014-02-18 Thread Tom Yu
I am creating a security app that displays pages of security footage as a gridview of images. I am polling the network for updates to the footage and if so, I'll update the backing object and call 'adapter.notifyDataSetChanged()'. You can imaging that the data set changes quite frequently. As

[android-developers] how often to look for bluetooth data

2014-02-18 Thread Tobiah
I'm reading data from a bluetooth barcode scanner. I found an example and things work well. The example though, starts a thread that pretty much just goes: while(1){ if(check_for_data()){ handle_data(); } } So wouldn't this tank the CPU? Should I just put a

Re: [android-developers] how often to look for bluetooth data

2014-02-18 Thread Trevor Page
I would expect that your check_for_data() is actually performing an InputStream.read() or .read(buffer) or .read(buffer, byteOffset, byteCount), all of which are calls that block until data is available. While in a call that blocks, the thread won't load the CPU. Trev On Wed, Feb 19, 2014 at

Re: [android-developers] how often to look for bluetooth data

2014-02-18 Thread Tobiah
On 2/18/2014 5:03 PM, Trevor Page wrote: I would expect that your check_for_data() is actually performing an InputStream.read() or .read(buffer) or .read(buffer, byteOffset, byteCount), all of which are calls that block until data is available. While in a call that blocks, the thread won't load

[android-developers] How does Manifest recognize the particular activity as a main or first activity in android?

2014-02-18 Thread Meena Rengarajan
Hi all, I am having muliple activities named as first, second, third and fourth activity. I have to launch third activity (ie Instruction activity) than first activity (ie. Login activity). Here, how does manifest recognize the activity as a main activity and all the multiple activities may

[android-developers] Re: How to optimize image polling on the network for a gridview inside a view pager

2014-02-18 Thread VenomVendor™
Use * Android-Universal-Image-Loader https://github.com/nostra13/Android-Universal-Image-Loader forget the rest.*I am using it for my several projects including heavy images that has to be loaded from drawables, this handles downloading, caching, memory loading into UI in runtime. On

[android-developers] How does Manifest recognize the particular activity as a main or first activity in android?

2014-02-18 Thread Danny D
The Activity that is launched is determined by the incoming Intent and the various IntentFilters you have configured in your manifest. The intent filter that you have set there in the manifest channels the launch intents to your 'Main' Activity. Try moving the entire intent filter block from