Android :: Bluetooth Concurrent Connections

Sep 14, 2010

For the buzzer round, I was thinking of writing 2 app for android (we have a few handsets), one for the quiz master and the other for the contestants.The contestants will be connected to the quiz master through bluetooth.After reading the question, the quiz-master clicks a button in his/her app, the button in the contestant apps will be enabled for X seconds. As soon as a contestant clicks his/her button, the quiz master's app will flash the name of that contestant.Is it even possible to have multiple connections and accept concurrent (or multiplexed) messages from them in bluetooth (something similar to select() in unix/c)?If possible, where should I look for any examples? What kind of problems will I face trying to develop this (I know reliability is an issue here) and how to avoid them?

Android :: Bluetooth concurrent connections


General :: How To Increase Concurrent HTTP Connections

Mar 3, 2013

My company is importing some Android-based TV boxes from China, and we're experiencing a strange bug with some apps we are developing to run on them. I'm trying to find a specific solution that I can tell them to implement in a firmware upgrade, but I am not sure where to look.

In some apps (especially Adobe AIR-based ones), there seems to be a limit to concurrent HTTP requests to a web server. On an earlier ICS 4.0.4 firmware for these devices, this did not cause any problems. But they recently released a JB 4.1.1 firmware, and this problem occurs.

Let's say an app requests 20 items by HTTP from a web server (XML files, PNG or JPG images). What will happen is about 2/3 of these will be sent back, and the rest just remains blank, as if in a perpetual waiting status.

Looking at the web server's logs, there is no requests at all for these missing items.

And, it's totally random. If you re-launch the app, the missing items will be different ones.

So, I am guessing the app can only request so many things at the same time. Any system property that could be adjusted to solve this?

BTW I am unable to replicate this bug on any other device. The TV boxes in question are based on Rockchip 3066 SoC's

View 5 Replies View Related

General :: Backup Bluetooth Connections?

Oct 9, 2012

Is there any way to save my Bluetooth pairs. I change rooms a lot so it would be useful if I could back it up .

View 1 Replies View Related

Motorola Droid :: Two Bluetooth Connections Simultaneously Possible?

Mar 27, 2010

Can the Droid be connected to two bluetooth sources at once?
For example:
I am always connected to a parrot handsfree bluetooth car kit when in my car. But I also want to be able to stream music via bluetooth to a separate bluetooth dongle attached to my stereo receiver.

View 3 Replies View Related

HTC EVO 4G :: Bluetooth A2DP Errors / Dropping Connections

Jun 14, 2010

Anyone having issues of their bluetooth a2dp headphones dropping connections sporadically?I heard somewhere that WIFI might be the issue.

View 14 Replies View Related

General :: Application That Manage Bluetooth Connections?

Mar 18, 2014

any application that manages your bluetooth connections?

Here's what I'm talking about, I have bluetooth headphones, several speakers and my car that all are connected to my phone and I'm having several small issues.

- As soon as I turn on bluetooth it tries to automatically tries to connect to these certain speakers, I don't want that and don't know how to stop it.

- If I'm in my car, my phone connected to my car for calls and I'm listening to music through the headphone jack but it will automatically connect to a set of bluetooth speakers in my home when get home and pull into the driveway. So music will play through those speakers instead of my headphone jack. I obviously don't want that either.

-Titanium Backup never restores my bluetooth connection either so if there is an application that can save those too that would be useful.

View 1 Replies View Related

Android :: Java.util.concurrent.ConcurrentLinkedQueue

Apr 14, 2010

I want to use ConcurrentLinkedQueue in an android application, have written the code, but now I'm getting an error when the project builds:

Conversion to Dalvik format failed with error 2

I'm using Eclipse with the lastest version of the ADT plugin.

View 1 Replies View Related

Android :: SQLite & Concurrent Access Best Practices

May 8, 2010

I have an application with several tables, each being updated by AsyncTask fired by different Activities and used by UI with SimpleCursorAdapter. Though i am not developping a game, I would like to avoid to interrupt the user as mush as possible. Has SQLite is not multiaccess proof, what is the best way of handling such situation?

- I consider adding lock from each DB open and to each close sequence but this seems quite subject to bugs - The solution i am using now is that each DB access (read/write) is done in UI thread (when AsyncTask completes, DB write is done typically in onPostExecute), but that means user is blocked for several seconds during the DB write.

Is there any better solution for that? Should i use a ContentProvider? when i read "Content providers store and retrieve data and make it accessible to all applications", this does not seems to be what i need. Any idea?

View 4 Replies View Related

Android :: Concurrent Modification Exceptio­n In SQLite

Oct 19, 2010

I'm doing some stress testing of my SQLite database using the testing monkey and I got the following exception, which appears to be from inside SQLite. My app has many threads accessing the database but all of them do so in locking mode so I don't think this exception is my fault. Any opinions on whether I should worry about this exception or if it's just an artifact of the extremely fast monkey keyboard access? Code...

View 9 Replies View Related

Android :: AsyncTask : Java.util.concurrent.RejectedExecutionException

Apr 7, 2010

I'm trying to launch a lot of remote connection retrieve picture on a server. To do this, I use AsyncTask.

This pics are displayed in a listview using adapter.

If I implement this in my adapter, images are retrieved but the display is bad (problem with index or something like that).

If I try to retrieve image when I build my object list (contained in my listview), I get the exception 04-07 13:35:57.744: ERROR/AndroidRuntime(4132):

CODE:.................

What is this exception ? Why I can launch multiple asynctask in my listview (giving to me a bad result) and not in a simple object without having this issue ?

View 6 Replies View Related

Android :: Multiple Concurrent Versions Of Same App / Filtered By Sdk Version?

Jul 30, 2010

I have an app on Android Market right now with a minSdkVersion corresponding to Android 1.6. I'd like to make an update that is only visible to users of Android 2.2 and higher (there is a good reason for this, which I will explain below). So I have two questions:
- First, if I publish an update with a higher minSdkVersion than the one it replaces, will existing users still be able to see and download the old version if their device is not >= that minSdkVersion? - Secondly, if so, would it be possible to publish updates to that older version branch? Or would it become a fossil relic, but at least always there for downlevel users? Now for the background. My apps use a large amount of resource files-- about 15MB for the Lite version, and about 55 for the Full version. Prior to Android 2.2, it was not possible to install an app on the SD card, so my solution to this was to have the app contain the bare essentials, and simply download the other resources from my web servers at first-run. However, this means that I must maintain external infrastructure, and it's also a bad experience for users who must download the app, then start another download sequence (I already have had several complaints about this in my user comments). What I would like to do is to keep the app as it is for users with Android OS < 2.2. I'd like to publish an update that is only visible to users with Android OS >= 2.2 which packages everything into the app and allows it to be stored on the SD card. And I'd like to be able to perform maintenance on both versions as needed. Why can't I just do the update as described above to a single branch of the app? Because it would mean that users with Android OS < 2.2 would have to download a massive application to their internal memory, which could be a deal-breaker for devices with only 128MB or 256MB, which is shared with the OS. Since I already have paying customers, I don't think I can ethically create an update that would potentially consume most of a user's internal memory, when the version they purchased was only a couple MB.

View 9 Replies View Related

Android :: CurrentTimeMillis Doesn't Match On Two Concurrent Emulators

Mar 10, 2010

I am testing my multiplayer game by running several instances of the emulator (which is, sadly, extremely slow and dis-satisfying). I depend on a little trick using currentTimeMillis() to keep a synchronized clock between the players (but NOT the absolute value of currentTimeMillis() since no two phones are probably set exactly the same)Anyway, I *do* naively assume that two emulators, running on the same PC would return near identical values for calls to currentTimeMillis(), and what I find is that they start off the same, but pull rapidly apart.Which makes me think the underlying implementation of currentTimeMillis() in the emulator is not at all based on the host PC's calendar, and rquires the emulator to get enough Windows compute cycles to be anything close to accurate. (and one emulator is always running at a lower priority to the other, depending on which one is on top)

If this is just an artifact of the emulator, then I can deal with it, but if it implies I have a fundamental misunderstanding of currentTimeMillis(), then that would be something i need to deal with. Part two of the question is: any way I can speed up the emulator? When I run two, are they sharing one of my cores? Can I split them onto separate cores?

View 10 Replies View Related

Android :: Overlay Concurrent Modification Exceptio­n Continued

Aug 27, 2009

This post is in addition to: http://groups.google.com/group/android-developers/browse_thread/threa. I have exactly the same problem and Doug pinpointed what's probably the issue in my case exactly: So here's the deal: I have a Vector containing traffic messages (received from a server via UDP in an own thread). Each time a message is received, I create a new overlay object and populate it with the traffic messages: Code...

View 4 Replies View Related

Getting ANR In Concurrent DB Access

Mar 14, 2014

I have used content resolver in my project and override the applyBatch() for writting data into the database :

@Override
public ContentProviderResult[] applyBatch(ArrayList<ContentProviderOperation> operations)
throws OperationApplicationException {
final Context context = getContext();
final SQLiteDatabase db = getDatabase(context);
db.beginTransaction();

[Code]...

If there is any writing operation to the database, applyBatch() method get called and in same time if I will make query from database(using CursorLoader), ANR comes and the following exception will also comes :

W/SQLiteConnectionPool(18025): The connection pool for database '+data+data+com.abc.xyz+databases+XYZ' has been unable to grant a connection to thread 8073 (pool-17-thread-3) with flags 0x2 for 64.105 seconds.

W/SQLiteConnectionPool(18025): Connections: 0 active, 1 idle, 0 available.

The above issue will not come if I remove the methode db.beginTrasaction() and db.endTrasaction() from applyBatch(). But in that case reading/writing time becomes large. I have used methods db.beginTrasaction() and db.endTrasaction() which reduces database access time to ten times.

Is there any approach, so that SQLite DataBse response quickly and there is no ANR ?

View 1 Replies View Related

Android :: What Are Possible Means Of Connections?

Feb 3, 2010

What kind of connections can we open on Android? Which of the following is possible?
- USB - Serial port - Infrared
I know that Bluetooth is possible, but are the other ones too? And if yes, which classes I have to use?

View 3 Replies View Related

Android :: Maximum Number Of Connections

Jul 29, 2009

I've written an application which involves a lot of simultaneous connections to different servers. I've noticed some big stability issues with this as sometimes the program crashes totally (not just ANR, but a segfault type thing). What's the recommended number of maximum simultaneous connections for speed and stability?

View 11 Replies View Related

Android :: Possible To Have 3G / Wifi Connections At Same Time?

Mar 5, 2010

I was wondering does anyone know if its possible to open a wifi and a 3g connection at the same time on Android? Is there any way to control access to both Wifi and 3g/GPRS data connections and use them at the same time?

View 5 Replies View Related

Android :: HttpsURLConnection And Intermittent Connections

Jan 31, 2010

I'm hoping someone could help me out with intermittent connections I'm getting using code with HttpsURLConnection.

The code I'm using is below:

CODE:...............

The connection works the first time everytime when I use it to pull a json file. However, when I use the connection again to send a command, it always fails the first time. It then typically works if I send the
command quickly ( within 5 seconds), but fails if I wait a while. I don't think its a SSL issue because it connects the first time correctly, but I could be wrong here. I also tried many different
variations such as adding:

CODE:.............

However, I had no luck. Any help would be greatly appreciated.

View 2 Replies View Related

Android :: Should Use Services For Network Connections?

Jun 1, 2010

should we use android services for network connection? if yes please provide me a sample.

View 2 Replies View Related

Android :: Network Connections / Access Points

Jul 16, 2010

I have some code that uses a network connection. I create a connection by calling openConnection() on a URL object. Is there any documentation that explains how this process works? Which access point is being used? When that access point becomes invalid, will it automatically switch to another accespoint? etc. I would like to use only WiFi access points and otherwise fail even tho 3G or GPRS could be available, is that possible?

View 7 Replies View Related

Android :: App Design For Multiple Data Connections

Oct 18, 2010

I am working on developing an application that requires me to establish multiple client-server based connections. Connection can be of two types where the Android device can be a server or a client. I can have up to 6 - 8 connections. Once the connections are set-up they need to be running in the background and are not typically affected by UI actions.Since each connection can be blocking, I am wondering what is a good away to design this app. Should I have two services for handling the server and client connections? Each service could have a "connection manager" that can spawn new threads when necessary. Or does creating two services even help? I presume spawning new processed would not be good as they will be expensive. Is this correct? I would appreciate any suggestions. Also, if this use case is not typical please let me know if you need more information to make any recommendation.

View 2 Replies View Related

Android :: How To Use Http Connections Like TCP Socket In Java

Mar 9, 2010

may be asking a bit much here but I have faith in the community so it's worth trying. I'm making a game and I'm trying to pick the connection type to use for communicating between a Java mobile client and a Java server backend.Socket programing in Java is easy - there's a lovely tutorial on the subject and two way communication is trivial.Trouble is that on a mobile client (Android) it's not guaranteed that the cellular network will let you make TCP connections. That makes me think using an HTTP connection is the way to go. HTTP connections are request based but I need a way to push notifications from the server to the client. It seems the solution to this problem is to use 'long polling' I have read a bit about it but have yet to see a simple example for what I'm trying to achieve.Again I might be asking a lot but this seems like a fairly common problem, is there a library or framework I can import / use to wrap a Http connection and provide a two way long standing connection (That reconnects automatically etc). I read a bit about cometD but it doesn't seem to have a Java library that I can just pick up.The communication I need is not heavy, not constant two way streams of data just occasional updates either way to keep the game going.

View 4 Replies View Related

Android :: Package Do I Use To Make HTTP Connections?

Dec 24, 2009

I am trying to make HTTP get & post connections.
Which package is recommended for that?
Is it java.net or org.apache.http?
Does java.net comes included in the sdk?
Any reference/code to connection makin would be appreciable as well.

View 1 Replies View Related

Android :: Make Asynchronous URL Connections On Droid?

Sep 9, 2010

I am using the following class to connect to my web service. I would like to make this asynchronous. How can I do this? code...

View 1 Replies View Related

Android :: What Happen To Existing Connections When Switch Between 3G / Wifi?

Aug 18, 2010

Assume that, I have a TCP connection that doing heavy data transmitting on my 3G network; and I walked home, Android switch to my home Wifi automatically. Now what happen to the existing connection? is it simply disconnect? or it will keep going, only the new connections will use wifi?

View 2 Replies View Related

Android :: Parallel WiFi / Mobile Network Connections

Sep 27, 2010

Are we able to establish both WiFi and 3G connections at the same time on Android 2.1? We are implementing a "make-before-break", so that WiFi can be switched to 3G before tearing the WiFi connection down. Please guide if you have come across this.

View 2 Replies View Related

Android :: Impact On Existing Connections When Switch Between 3g / Wifi?

Aug 18, 2010

Assume that, I have a TCP connection that doing heavy data transmitting on my 3G network; and I walked home, Android switch to my home Wifi automatically. Now what happen to the existing connection? is it simply disconnect? or it will keep going, only new connections will use wifi? In addition, what if I walk away from home, wifi lost signal and switch to 3g? It should be safe to guess the connection is dropped. For my application, do I need to handle the reconnection or there is a auto fall back solution.

View 2 Replies View Related

Android :: Setting For Poxy Based Network Connections

Jul 16, 2009

Can anybody give me the Exact methodology for Connecting through Android Browsers and also Exact way for making the Map application work in my "Proxy Networked Machine"

None of the methodology in the below are working for me....

1. placing the http_proxy in settings.db 2. -http-proxy in console

View 2 Replies View Related

Android :: HTTP Connections - Application To Search And Download

Sep 16, 2009

I am trying to make a application where you can search for something and download it. For example I want it to be connected to my website and you can type one of my ROM names and it will show a list view of all my ROMs or themes then I can select one and download it.

View 9 Replies View Related

Android :: Server Socket Accept() Not Accepting Connections

Oct 27, 2010

I am trying to setup at ServerSocket on my Android phone, and send a char or int or anything from my computer. The code on the phone creates a ServerSocket and then blocks whilst waiting for a connection(plus some more bits if the socket is created. But I'm not getting this point, so left that out!)Basically, the phone is getting to accept, and the computer is not connecting. The xx.xx.xx.xx is the public IP of the phone I obtain programatically (and it matches up with checking on whatismyip.com).I have set the INTERNET permission on the phone. I have also been able to do this in reverse (ServerSocket on pc, client on phone).

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved