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.

Android :: App design for multiple data connections


Android : Multiple Handlers Design In An Activity Failed

May 14, 2010

This question is related to an existing question I asked. I though I'll ask a new question instead of replying back to the other question. Cannot "comment" on my previous question because of a word limit. Marc wrote - I've more than one Handlers in an Activity." Why? If you do not want a complicated handleMessage() method, then use post() (on Handler or View) to break the logic up into individual Runnable. Multiple Handlers makes me nervous. I'm new to Android. Is having multiple handlers in a single activity a bad design ?

I'm new to Android.My question is - is having multiple handlers in a single activity a bad design ? Here is the sketch of my current implementation. I've a mapActivity that creates a data thread (a UDP socket that listens for data).

My first handler is responsible for sending data from the data thread to the activity. On the map I've a bunch of "dynamic" markers that are refreshed frequently. Some of these markers are video markers i.e., if the user clicks a video marker, I add a ViewView that extends a android.opengl.GLSurfaceView to my map activity and display video on this new vide.

I use my second handler to send information about the marker that the user tapped on ItemizedOverlay onTap(int index) method.The user can close the video view by tapping on the video view. I use my third handler for this. I would appreciate if people can tell me what's wrong with this approach and suggest better ways to implement this.

View 2 Replies View Related

Android :: Supporting Multiple Screens / Most Optical Way To Design Application?

Jun 9, 2010

I have read the topic about supporting multiple screen size as well as different DPI. I am wondering which of the following way is better in supporting multiple screens:

1. Have different layout for different screen size (stretch the images)
2. Have different set of graphics for different screen (use the same layout)
3. Have different set of graphics and different set of layout for each of the screen

Which way is the easiest? And which way is the most optical way to design? Or is there another better way?

View 2 Replies View Related

Android :: Activity Bind To Service - Multiple Thread Design

May 28, 2010

A new question about android and services. Currently I'm developing a App that should send images to a server. It should also be possible to send more images parallel. I made a service that creates for every image a new image. The activity can bind to that service and gather information about the progress. I want to show the current status for every image in a notification (and when the user clicks a notification, an activity with the progress for that image should be shown). But I get several problems with that approach. There are errors with binding, the notification pending event starts the activity completely new, so I lose information about currently sending images and so on. How I could design in a appropriate way.

View 1 Replies View Related

Android : UI Design Suggestions For Display And Switching Between Multiple Layouts

Jun 26, 2010

I'm trying to create an app that offers the user 3 different kinds of layouts. The only common portion for all 3 would be the TextView (located at the top) that would display information specific to the currently displayed layout and 3 buttons to select the required layouts.

Is there some way we can create this UI in XML to keep only one constant part(the upper TextView) and dynamically display any one of the 3 layouts below it?
Would it be better to create separate XML's for each of the layouts (each including the upper TextView in them)?
OR would doing this via code be better?

Fast switching between the 3 layouts is important. TIA

[EDIT 1]
Actually they are 3 different layouts, with several "child" layouts and views within each of them. Could a ViewFlipper be used for switching between these? I was thinking that a ViewFlipper was only for switching between View elements?

I do have them in individual XML's right now but am looking for some way to load and unload them fast. Not sure how to do the hiding thing, will try reading up on that. [/EDIT 1]

View 2 Replies View Related

Android : Apps That Control Data (3G) Connections With A Schedule / Timer?

Jun 17, 2010

I am knew to android and am absolutely loving it on my Desire, so glad i never went with a certain fruit company

Anyways, i have had a search around here and on the market place and cannot find an app that suits my needs.

Basically, i run timeriffic (which is fantastic by the way) and mostly i use a wi-fi connection. However there are times when i know there is no wi-fi around eg. when i travel to work, so i have it turned off. What i would like to know is if there is any app out there that would allow me to schedule a time to turn on my 3g data connection (i have APNdroid installed and 3g disabled as default) for those periods when my wi-fi is off so i always have a data connection.

I did see the app Data on Demand and this would have been perfect but it did not work with my Desire.

Can anyone using a Desire let me know if they have tried Data on Demand and got it working and what conditions it was working. Can someone recommend an app that meets my needs? I guess if not i will need to contact the developer of timeriffic (who i have seen around here) and see if there is anyway he could intergrate with APNdroid and control 3G data connections.

View 1 Replies View Related

General :: App For Intercepting Data Connections?

Oct 30, 2011

I am looking for an app that can:

- make a log of all the other apps, including stock ones, that make attempts or actual connections to the internet, and at what time
- be able to intercept those connections
- preferably I would create a white list of apps that are allowed to connect, but others do not have permission.

Purposes include:
- saving on bandwidth in poorer countries where internet is expensive.
- making sure apps or malware doesn't try to send off my data when it shouldn't be.
- prevent annoying background sync/apps from running when I don't want them

I find it strange that we either give all the permissions the app wants, or it doesn't work. Why can't we restrict their internet access?

Does this sound feasible? Does it already exist?

I'm rooted and using an Asus Transformer.

View 3 Replies View Related

Samsung Behold 2 :: Disable All Data Connections

Dec 15, 2009

I would like to not have to buy a data plan for my phone, so is there any way to disable all data connections besides when connected to Wifi? any help is appreciated.

View 7 Replies View Related

Motorola Milestone :: Disable Data Connections

May 6, 2010

I'm a new droid user and have tried desperately to disable all data connections.I'm without a data plan so I feel very unsafe just going on the net or using the apps I downloaded, afraid that it might accidentally use data connections.I've tried disabling the 2G network, data roaming, background data (what is it anyway) and even going to the key pad, typing *#*#4636#*#* to disable the data connection and data on boot up. I'm left with disabling the APN but don't know how to. And the thing that worries me is that I am unable to go to the Android Market because I will need to enable the background data which I'm afraid that will cause $. And also, I don't know if doing all that will be effective.

View 2 Replies View Related

Samsung I7500 :: Disable 2g Phone Data Connections?

Jan 15, 2010

I have a Galaxy on O2 UK. It's via work, and on a business tariff that boasts unlimited data.After a couple of huge bills, it turns out that apparently 3g data is unlimited, but 2g data is charged at the usual eye-watering rates. Phone Bloke is checking with O2 whether they are serious.In the meatime, I'd like to disable 2g data connections.I can't find a way to do that.

View 11 Replies View Related

Android :: Application Design - Accessing Website Data

Oct 19, 2010

I am new to Android development and am interested in working out a design of an application. I am however, unfamiliar with the best way to handle what I want to do. I am interested in obtaining information from my band's Joomla website and placing it into an Android application. At the moment I'd like to get News articles posted and potentially other information that I create on the site. I was thinking of doing this by setting up RSS feeds for the website. Would it be better to somehow access the data directly by connecting to the database? I don't know PHP so I can't develop a webservice to access the content. Any ideas?

View 1 Replies View Related

Android :: How To Develop A Soft Keyboard - HTTP Connections To Synchronize Keyboard Data With A Cloud DB And Other Phones

Aug 13, 2010

I would like to play around with some ideas and develop a soft keyboard for Android to replace the default one.

Is there any general information about soft keyboard development for Android out there?

Any best practices or guidelines?

Can I do with my keyboard application pretty much anything I could do with a normal Android application?
Can I do HTTP connections to synchronize keyboard data with a cloud DB and other phones I have?
Can I open other windows/screens from a key press, e.g. to display a custom input interface different to a normal QWERTY one. If that doesn't work, can I use a pop-up dialog instead?

View 3 Replies View Related

Android :: GUI Design - Mockup Design Tool For Android Application

Nov 23, 2010

I am going to develop an Android Application but before developing it i needs to have MockUp for the Android Application,so is there any way to design MockUp/GUI Design tool for the Android Application?

I know about DroidDraw tool , but i think it is not the exact way to prepare Mockup for the android application.

I have already referred this SO Question , but overthere i just found all the tools for the I-Phone only. So please feel free to share with me if you have/found any !

View 3 Replies View Related

Android :: Multiple Data For An Intent

Sep 10, 2009

I was just wondering if it is possible to give the intent a set of data, instead of just one. A particular scenario where this could be applicable would be a music application.You select a list of songs, and pass all these data (file path) to the Music Player's application.Another scenario: You need to plot more than one address on the Google Maps. You launch the application with a set of data for the intent.

View 5 Replies View Related

Android :: Multiple PDP - Which One Used To Transfer Data?

Apr 16, 2009

The general use for multiple PDP (mPDP) is that when we use one PDP(A) to download a file, and we want to send a mms message via another PDP (B), the original PDP(A) will not be disconnected. This is the scenario on Windows Mobile. My question is ,if Android had supported mPDP, how does one application know which PDP should be used to transfer data?
Or Application (ex: Browser) doesn't care these issue, and it will try all PDP to transfer data ?

View 3 Replies View Related

Android :: Parse Data - Multiple Objects

Oct 29, 2010

i need to parse this response in android using the android json parser but the thing i cant find the answer to anywhere is: how do i parse the data if for example "itineraries" can contain one or sometimes more objects of the type itinerary? if it contains one than it is returned like this but if it contains more it is returned with [] with this example "itinerary" cannot be placed into a JsonArray becouse obviously it is not an array. (not placed in [] right?)

how do i parse this? any examples?
{
"plan":{
"date":"2010-10-20T00:00:00+02:00",
"from":{
"name":"Булевар Партизански Одреди",................

View 1 Replies View Related

Android :: Options For Sharing App Data On Multiple Phones

Aug 22, 2010

I'm looking for suggestions for ways to share Android app data between phones running the same app. For example, lets say I have an app that stores a database of book reviews. If person A has a book review that person B doesn't have, what are the options for getting that information from person A's phone to person B's phone?

Currently, I'm aware of the following options:

- Upload data from person A's phone to a server, then download data from server to Person B's phone.
- Write code to have the phones sync up using bluetooth
- Write code to send SMS messages


I'm wondering if there are any more options besides these, and if there's actually a best-practice for accomplishing this?

Ideally, I want the users to simply click a button in the app to make the sharing take place, so I don't want to go down the bluetooth route because that requires the user to do a bit of setup (or assumes they already have set things up in the form of bluetooth settings).

Since the data can be of variable length and potentially large, I believe that would rule out text messaging.

As far as the server route goes, from what I understand this seems to be an ok way of doing things, but my problem is that I have no experience with having users potentially sign in to a server and then uploading data. I don't know of the cost concerns (if any), or of potential security concerns (allowing just anyone to upload data, I'm not sure if I would have to take steps to ensure someone couldn't bypass the app and upload malicious data).

View 3 Replies View Related

Android :: Multiple Notifications -/Pending Intents With Different Data?

May 11, 2010

Let's say I have a background service that performs several tasks. As it completes task A, it posts notification A with a certain intent and some extra data that indicates viewing result of A. As it completes task B, it posts notification B with a certain intent and some extra data that indicates viewing result of B. As it completes task C, it posts notification C with a certain intent and some extra data that indicates viewing result of C. At the end, the notification area has three notifications. Each one has the same intent, except for one of the extra data fields. I would expect that each one would load my activity with different extra data. They don't. When onNewIntent is called, each has the extra data field set to C. I have rooted out any possible aliasing and checked the data as it is placed into a notification. It seems to allow only one set of data per package. Is what I am attempting not possible? Has anyone accomplished what I am attempting? For example, have you had a service download several large files, and then had notifications that would open each of those. Code...

View 4 Replies View Related

Android :: SAX Is Getting Called Multiple Times With Same Data But Offset

Oct 27, 2010

I am trying to parse an xml file using SAX with Android and the problem is that the function characters(...) is getting called multiple times with what appears to be the same data just offset by a few characters.

As you can tell from the output below the first time it gets called with " alabama" and the second time it gets called with "labama". I am not sure as to why it is doing this but if anyone could help that would be awesome.

10-27 23:04:47.033: DEBUG/LocationHandler(10299):
10-27 23:04:49.000: DEBUG/LocationHandler(10299): alabama
10-27 23:04:51.835: DEBUG/LocationHandler(10299): labama
10-27 23:04:52.129: DEBUG/LocationHandler(10299): labama
10-27 23:04:52.408: DEBUG/LocationHandler(10299): labama
10-27 23:04:52.519: DEBUG/LocationHandler(10299): ub_dir_name
10-27 23:04:52.649: DEBUG/LocationHandler(10299): ub_dir_name
10-27 23:04:52.809: DEBUG/LocationHandler(10299): ub_dir_name
10-27 23:04:52.989: DEBUG/LocationHandler(10299): ile_name.kml
10-27 23:04:53.158: DEBUG/LocationHandler(10299): ile_name.kml
10-27 23:04:53.358: DEBUG/LocationHandler(10299): le_name.kml
10-27 23:04:53.529: DEBUG/LocationHandler(10299): le_name.kml
10-27 23:04:53.698: DEBUG/LocationHandler(10299): le_name.kml
Code...

View 1 Replies View Related

Android :: How To Access Shared Data / Settings Across Multiple Application?

Apr 17, 2009

Now I have 2 activities that would simultaneously access one data/ settings. However, two kind of solution can be applied after I study from the Android Developer's Guild.One is ContentProvider, The discription in guild is as: "Content providers store and retrieve data and make it accessible to all applications. They're the only way to share data across applications; there's no common storage area that all Android packages can access."and another is SharedPreferences, "To use preferences that are shared across multiple application components (activities, receivers, services, providers), you can use the underlying Context.getSharedPreferences() method to retrieve a preferences object stored under a specific name."

View 5 Replies View Related

Android :: Optimization Proposals For ListView With Data From Multiple Tables

Aug 18, 2010

I just encountered the following situation. I have an Android app with a scenario which I guess may happen in multiple apps. It's about tagging/labeling/categorizing, call it as you want.After CommonsWare's feedback here a bit of a clarification. I'm weird about doing the second query to the DB inside the CursorAdapter, basically this would result in one query per row and I fear this will heavily impact my performance (I've still to test it on a real device with a substantial amount of data to see how much this impacts).My question therefore is on whether there are some strategies on how to avoid this given my data model or whether I have to basically "live" with that :)

View 2 Replies View Related

Android :: Send Data To Multiple Activities In Controlled Manner?

Jun 26, 2010

I am working on an android application, where there are 4 activities. Activity1 is main activity and there are different buttons on that activity which can open other activities. Other 3 activities can also open each other. There is a thread running in Activity1 which returns some counter. I need to show that counter on all activities. At an specific time, the thread doesn't know which activity is at top. What is the right way to control this scenario, such that thread output should update on all activities, no matter which one is at top?

View 1 Replies View Related

Android : Type Of List To Store Multiple Data Types

Dec 15, 2009

So my problem is that I've written a function that takes two Doubles, two Int, and a Calendar object on Android (Java). I believe the class provided to allow it to run in a separate thread, AsyncTask, accepts only one type of Object (but allows multiple) as an argument so I figured I might be able to put it in a List or a Linked List or something. Is there such a type that allows multiple data types like that (Double, Double, Int, Int, Calendar), or would I have to create my own object class? I'm a novice programmer so less complicated is probably better, but I'm interested in the best solution as well. What the function does is take a location (double latitude, double longitude), a couple options as integers, and a Calendar Object. It takes the location, options, and date then returns a Time object of the sunrise (or sunset, depending on the options) for that location. and I understand it would probably be best to create a special object class and just pass that, or override the background thread class, but I'm pretty new to object-oriented programming so the less overhead the better (for now). (Update) After a lot of work, it ended up being easier making a data-type class and just using that. The right way turned out to be easier in the end. Who'd a thought.

View 3 Replies View Related

Android :: Multiple Broadcast Messages With Less Data Or Less Broadcast Messages With More Data

Oct 5, 2009

I am developing an application which is communicating with the server. Tha application can perform log-in and get different parameters from server.

The application consists of a RESTful client (custom class for making requests), Communication Service (the service which runs in the background) and the main activity.

For now I created multiple broadcast messages and multiple broadcast receivers in the main activity so when the application performs login operation a receiver (loginBroadcastReceiver) in the main activity receives a message and when another parameter is received from the server different message is broadcasted and another receiver handles the message.

This way however the application performance is poor but I am not sure whether it is due to multiple broadcast receivers.

Does anyone know what is the best way to exchange data between service and main activity - is it better to create a single broadcast receiver and retrieve all parameters from message or is it better to initialize multiple broadcast receivers for multiple parameters?

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 :: 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?

View 2 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







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