Android :: Which UI Approach Is Better?

Oct 11, 2010

I'm navigating through a 3-level hierarchy of names to get to a document view page. I've set up tabs for the 3 levels. The tabs are left, middle, and right where the right tab is the lowest level of the hierarchy. Each tab has a list of 10 to 20 Radio Buttons with the names. This all works great and is very efficient and intuitive. One note is that there may be 1000 documents available (from an online source) but the average user will only be viewing a handful regularly. So I store the choices for each of the 3 tabs. This way a user can quickly navigate to his favorite without having to negotiate the entire hierarchy each time. My question comes when the user is on the right tab. At this point they have navigated through to the document they want and I'm wondering what is the best way to initiate the document view page. Remember that most of the navigation happens on the right tab in the small set of documents the user regularly visits, with only occasional visits to the other tabs. So making the right tab efficient is good. My current approach is to add a LongClickListener to the buttons of the right tab. Then a press-and-hold kicks off the document view. This certainly minimizes the number of objects on the screen and the number of separate clicks required to get to the document but I question whether new users will know that a long press is expected. I guess I could put up some Toast if the user doesn't do anything for 5 seconds but that still seems clunky. Another approach is to add a Button at the top of the right tab Radio Buttons. This has the merit of being dead obvious but it's a less efficient use of screen space and also an extra click for an experienced user.

Android :: Which UI approach is better?


Android :: Which Approach Is Better?

Dec 23, 2009

In my application I have three buttons that are to be part of each and every activity. These button are independent of each other and on click do mutually exclusive things(say launch different activity). So, in my layout XML for every screen I have a <Linear Layout><Button/><Button/><Button/></Linear Layout> element.

View 2 Replies View Related

Android :: Best Approach To Implementing Polling

Jul 12, 2010

I am required to work on an application which is be deployed on devices running Android 1.5. The application is supposed to maintain a connection with a server and regularly poll it for new data. The server will notify the client of new data following which the client will connect to the server and download the data.I know that ideally a push based approach will be more conducive here given that we are to run this on a mobile platform. Also, from Android2.2 there is going to be support for C2DM(Cloud to Cloud device Messaging) but as already mentioned this application is for devices running Android1.5.Implementation: I was thinking of using AlarmManager which would Broadcast Intents periodically(poll interval), The Broadcast receiver will then try to connect to the remote server and make data changed check. If the server has an update, the thread will connect to the remote server and download the data from the server.

Problem and Issues: 1. Is this the right way to approach the problem? 2. Is AlarmManager reliable? Would it remember Alarms after a device boot? (I think it does) 3. How do I ensure that battery usage is kept at minimum.(I have heard something about using "keep-alive" to sustain the session for longer time..what is this legend?) 4. What are other things that I need to consider? I am sure I must be missing lots of things here.

View 8 Replies View Related

Android :: How To Approach Tabs In Application?

Nov 24, 2010

I am looking to create an Android application that uses Tabs.

Requirements
- When a user selects a tab and gets back to the same tab, there shouldn't be a loading period (preferably).
- Each tab will contain a listview.
- In one of the tabs, I will have to use subtabs. And that's it.

One great example I really liked (although I didn't try the app) is
http://www.usatoday.com/android/.

View 2 Replies View Related

Android :: Database Access Design Approach

Aug 30, 2010

I have a general Android design question around data access. I have a number of activities in my application that need to access a SQLite database. In order to wrap up all data access logic in one place I have created a DatbaseHandler class that takes care of all data access logic. This class takes care of building up where clauses, calling the database and interrogating the resulting cursor to retrieve the query results and return them to the caller. The purpose of this class is to wrap all data access code in one place so that it can be easily managed and maintained as opposed to having data access logic scattered across all activities. Each activity that needs access to the database creates an instance of this DatabaseHandler class and passes it a reference of android.content.Context. The DatabaseHandler class then uses this Context object to call an underlying content provider as follows context_i.getContentResolver().query(...).

My data access logic (cursor handling logic to be specific) is not in the activity and so I cannot manage the cursors life cycle, therefore there is likely to be memory leaks.

My questions are as follows -

How can I (if its even possible) manage the cursors life cycle from outside an Activity? Should each activity even be creating an instance of this data handler class and passing an instance of Context to it? Perhaps my design approach is wrong and I should expose these data access functions as static methods that take an instance of the calling activity as a parameter. That way I could perform managed queries and let the activity take care of managing the cursors life cycle?

View 1 Replies View Related

Android :: OpenGL Key Frame Animation - The Best Approach

Dec 29, 2009

I'm trying to animate object. I use keyframe animation: I have two vertex buffers (two frames) with vertices of my object - first buffer is for object start state and second for end state. To transform the object I simply use linear interpolation. To make it more clear, please take a look at the code snippet:

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

As you can see I actually use one more buffer. vertexBuffer_motion is the one I use to draw my object in intermediate state.

Time for my question. What is the best approach for such keyframe animation on android? Can I somehow avoid (quite time consuming) operations of calculating and copying new state of all vertices to vertexBuffer_motion?

I know I could use VBO but still, I would have to prepare this vertexBuffer_motion and use glBufferData to set data to this VBO (or not?). provide me with some code example showing the best approach for keyframe animation on android?

View 1 Replies View Related

Android :: How To Approach Socket Programming Between C# -> Java

May 8, 2010

I've recently knocked up a server/client app for Windows & Android that allows one to send a file from Windows to an android phone over a socket connection. It works great for a single file but trying to send multiple files over in a single stream is causing me problems. I've also realised that aside from the binary data, I will need to send messages over the socket to indicate error states and other application messages. I have little experience with network programming and and wondering what is the best way forward.Basically the C# server side of the app just goes into a listening state and uses Socket.SendFile to transmit the file. On Android I use the standard Java Socket.getInputStream() to receive the file. That works great for a single file transfer, but how should I handle multiple files and error/messaging information? Do I need to use a different socket for each file? Should I be using a higher level framework to handle this or can I send everything over the single socket? Any other suggestions for frameworks or learning materials?

View 1 Replies View Related

Android :: Best Approach To Build Same Application For Different Public?

Jul 29, 2010

I'm working on an app that is meant to be used by fans of a sport team. In the future, I expect to use the same app but for any different team. So, what changes would be the colors, team logo, app name and the like. So, is there any technique that allows me to build binaries for different teams without having duplicated resources?

View 4 Replies View Related

Android :: Best Approach To Port Application To Windows?

Aug 18, 2010

I used Eclipse with the Android SDK to develop the original application. I ask since this was my first Java (and Eclipse, and Android, and XML) project. I assume that most of the Java should run on the PC without too much trouble. I may want to restructure the code to isolate the Android specific functions. Should I stay with Eclipse or move to something like NetBeans?

View 3 Replies View Related

Android :: Approach To Handle WiFi Disconnects

Nov 23, 2010

In my Android application, it is noticed that when the device goes to sleep/standby WiFi is disconnected. When the device wakes up, it gets reconnected. Before making a httpClient.execute(..) call to remote server we check if the device is connected to n/w. When the data transfer is being done and if the device goes to sleep then Android runtime will switch to another medium for connectivity(3G,GPRS etc.)

Is the switch from WiFi to alternate cellular service say 3G, seamless? How do I wait for WiFi to become available again? Should I use Thread.sleep(delay) when the WiFi wakes up? I have seen broadcast actions when the WiFi state changes. In general, what is the ideal approach to handling WiFi disconnects in a mobile app?

View 1 Replies View Related

Android :: How Do You Approach Various Devices Your Application Runs On?

Jul 23, 2010

For my first application, the only testing I've really done to this point is on my Droid X. I want to think through the various hardware differences and come up with a testing plan that is representative of the Android landscape. My initial thought is to create a list of emulators that have unique qualities such as screen size and SDK levels. I've noticed very quickly how the UI of my application will need some adjustment when viewed on devices that don't carry a 4.3" screen. How have you approached this hurdle in your own development? Chris Stewart cstewart...@gmail.com http://www.androidsdkforum.com *Want to advertise your Android application for free? Email me for details!*

View 9 Replies View Related

Android :: Advice Needed On Application Approach

Nov 2, 2009

I'm a total newbie to Android (and to Java in general... mostly a PERL/ PHP guy here...), so forgive me if I use the wrong terminology to refer to things... I have been asked by my company to implement an application for Android that allows a user to enter a note at the end of every call. E.g., either they or the other party hangs up, immediately a notes area pops up with a "save" button and if they enter a note, the note is saved with a reference to the call log entry. As I understand it, onCallStateChange() will give a pretty good indicator of a hangup if the state has become Telephony Manager.CALL_STATE_IDLE. I've figured out how to do the UI part, how to save it in a database, etc... My question, however, is about how I implement this "listening" aspect of it. Should I have a service running all the time that has an instance of android.telephony.PhoneStateListener? If so, do I use the onBind or onStart method, and how do I make sure it doesn't go away when memory runs low? Or can I somehow attach the listener to this event, and then terminate? Or is a Broadcast Receiver the way to go?

View 16 Replies View Related

Android :: How To Approach The Layout Of A Sortable List

May 7, 2010

I plan to implement an alternative sortable list of images but I do not know how to approach the function of the layout. The plan is to make it look like the playstation 3 media bar. One example of use for this sortable list could be a result set from search for cars. On the x-axis there is model year and on the y-axis there are images of cars that year. BUT I only want the car highlighted that is in the cross of the x and y-axis, all other area grayed out in some way. You are able to navigate through this list in all directions. Make sense?

I would like to know where to start to accomplish this. My first approach was to implement a gridview but I only manage to make it scrollable in one direction.

View 1 Replies View Related

Android :: Best Approach For Requesting Data (internet Connection)

Sep 28, 2010

I have an app in which there are several requests to a server in internet (http), for example to retrieve images in threads outside the main UI process. The thing is that I have a Thread that manage the request with a while(!end) loop and in the end a Thread.sleep(500) that checks if there are new unhandled requests. As I read here [1] I know that this is not a good practice. And users have complain about ANR (app not responding) in several cases.

Knowing that obviously I want to refactor all the way my app manage the requests and I want to do that the best way. So, the question is; what is the best approach for doing this? A service? a broadcast receiver and send intents when I need a request to be handled?

View 6 Replies View Related

Android :: Approach To Program A Mobile Website For Any Device

May 6, 2010

My wish is to know how I can program a mobile website, that fit to all mobile phones.

Are there any special approaches to recognize a device and render the code according to it?

Which tools and coding languages are required?

My first thought was to hold the website in XML, which would be parsed depending on the device.

You have to consider old phones, even devices with only wap support.

For example: The mobile website has to recognize Nokia N75 and render/send the code that looks optimal for this device. Same thing with an iPhone or a Motorola Razr.

View 6 Replies View Related

Android :: Design Approach - Web Service And Broadcast Receivers

Sep 23, 2010

I am developing an app for android mobiles that communicates with a json/rest web service. I need to make certain kinds of calls periodically to the server to check for some information. Within that context I might need also to query the GPS for the current position. I'm quite undecided to use a Local Service, since I don't know very well how to deal with them, in fact I need to retrieve those data periodically and refresh a MapView accordingly. I heard that I can use PendingIntents,in the service, associate this data as a payload and send them to a broadcast receiver which unpack the data and refresh the UI, I heard also that this is a bad design approach because of what broadcast receiver are intended to be used for.

View 1 Replies View Related

Android :: Best Approach For Making One Variable Available In Another Activity / Class?

Jun 22, 2009

I have tried to understand for the past 2 days what is the best approach to making the value from a variable sitting in activity A (in my case, the int position used in OnListItemClick / OnItemSelectedListener) available in another activity B (which of course sits in another class). There may be the option to write the result of the OnListItemClick int position into a small SQLite DB - but that seems to be total overkill.

Anybody could pls share the best approach with me?

View 6 Replies View Related

Android : What Is Solution - Which Is Best Approach To Display Live Images

Jun 15, 2010

I am using following code to display bitmap on screen and having next and previous buttons to change images. and getting out of memory error. New Code

HttpGet httpRequest = null; Code...

So after googling i got new code as answer the old code was not giving me out of memory error on those images but decoder->decode return false, so i choosed new code.

Any one guide me what is the solution and which is the best approach to display live images?

View 1 Replies View Related

Android :: What Is Best Approach To Develop Multi-platform Mobile Application?

Jun 4, 2010

We need to make an application that runs on iPhone, Android and BB. What is the best approach to write the least ammount of code? I know about some frameworks but I am not sure the best approach.

View 5 Replies View Related

Android :: Correct Approach To Display Search Results On Screen

Dec 16, 2009

I want to display search result on the screen, I have implemented in such a way that. From the search form user fill the 'search field' and 'search location' I set values into bean and that bean is static so that I can access it from every where. Then I start search result screen intent using:
Intent mainIntent = new Intent(SearchVenueResults.this, SearchResults.class);
startActivity(mainIntent);

On the 'SearchResults' activity 'oncreate' method I load data on the behalf of static bean which values filled from search form and then display data.
@Override
public void onCreate(Bundle savedInstanceState) { loadDataAndSetupUI();
super.onCreate(savedInstanceState);
}
My question is is it the correct approach to use it or in Android there is another preferable approach?

View 1 Replies View Related

Android :: Retain Application / Activity State Correct Approach?

Dec 22, 2009

I just read from internet to maintain the state of my application by overriding the onKeyDown function as given below. And set the launch mode of my activity as singleInstance. And it is working perfectly. Just want to know if it is correct approach. And how it is different from onSaveInstanceState.

View 3 Replies View Related

Android :: How Should I Approach Making Server-side Software For An Application?

Nov 3, 2010

In the past I have used Python for backend stuff along with Django for frontend stuff, but I don't know how well those two work with Android. Can anyone recommend a good way to go about making server-side software that works well with Android? Please take into account that I also want a web application as a frontend, so the backend should work with both the web app and the Android app.

View 1 Replies View Related

Android :: What Is Best Approach To Manage Small SQLite Database Private To Application?

Feb 27, 2010

What is the best approach to managing a small SQLite database private to the application? Open (getWritableDatabase)in OnStart and close in OnStop in each Activity?Open in OnCreate and keep open til the user quits the app (where would you put close?) Open, do work and close as soon as possible each time it is needed?

View 5 Replies View Related

Android :: Best Approach To Transfer Large Video Files Into Byte Array?

Apr 8, 2010

Please could anyone suggest an approach for transferring a >2MB video from a ContentResolver into a Bytestream, without running out of memory?
See question: http://stackoverflow.com/questions/2599305/android-outofmemoryerror-w...

Here's the current code, which throws an OutOfMemoryError on the byteBuffer.write(buffer, 0, len) line when transferring large videos:

// get bytestream to upload videoByteArray = getBytesFromFile(cR, fileUriString);
public static byte[] getBytesFromFile(ContentResolver cR, String fileUriString) throws IOException { Uri tempuri = Uri.parse(fileUriString);
InputStream is = cR.openInputStream(tempuri);
byte[] b3 = readBytes(is); is.close(); return b3;
}

View 18 Replies View Related

Android :: Approach To Cache Large Amount Of Textual And Audio Data / In Android Application

Jul 13, 2010

We are supposed to cache textual and audio data in our application until device is booted or maximum of two days, whichever happens earlier. To get a perspective on data to be cached, note that we are to store about 200 text headers containing around 10 fields, each of length 30 bytes and about 20 sound files each about a minute long.We are getting the textual data by parsing XMLs and then we keep them in ArrayLists. The sound files are directly written inside the app storage using File I/O (and not on SDcard or Apps Cache directory).This application is to be run on devices running Android 1.5 or later.I understand, and please correct me if I am wrong, that we can cache the files either on SDcard or inside the application or inside applications Cache directory.

View 2 Replies View Related

Android :: Best Approach To Send Data From Server To Android Device

Jan 16, 2010

I am developing an Android app that needs to communicate bi-directionally with a server. By that, I mean either the server or the device can send a message at any time, with an arbitrary amount of time in between messages. Sending data from the device to the server is a common and I think well understood task, but I'm not as sure what the best approach is to go in the opposite direction from the server to the device.

I think having the device periodically poll the server may be a bad idea due to latency and the drain on the battery, but I'd be willing to consider this option. My plan at the moment is to send text messages from the server via an email-to-SMS bridge, and to have my app run a service to receive and handle these messages.

The question I have is if there are any best practices for this scenario, and if using text messages has some downsides that I have failed to consider. For the sake of this question, I want to assume that users have an unlimited text data plan, so paying per text won't be an issue.

View 2 Replies View Related

Android :: Best Approach To Write A FaceBook Application For Android

Jan 23, 2010

BackGround: There are Facebook APIs(and SDKs) available to develop applications for other Mobile devices like iPhone, BlackBerry etc, but it seems there are no official ones for Android(?).

People have ported Java APIs to work on Android and have written FaceBook Client applications(FaceBook dev: Wiki Page). Apparently, there is also a light weight FaceBook SDK in alpha release for Android(a la FBRocket). But it is not avised to be used in Production.

Since these FaceBook functionalities have been exposed as REST based service, most of work would invove sending requests in desired format over Http. So, writing a FaceBook client app for Android certainly is doable.There are similar applications already in market e.g.: Bloo.

Questions: When asked to write a FaceBook client application what approach should one undertake? Should we choose the SDK or invoke the services over Http?

If there is already a Web application that integrates with FaceBook, can we just browse to that Application from inside a WebView and be done with this?

View 1 Replies View Related

Android :: Best Approach To Show Big Amount Of "grid" Data In Droid?

Mar 15, 2010

I am building an application for Android (1.5) that, after quering a webservice, shows to the user a big amount of data that should be displayed in a "grid" or "table" style.

I must show a result of about 7 columns and 50 rows (for example a customer list with names, addresses, telephone number, sales amount last year and so).

Obviously, the 7 columns will not fix in the screen and I would like the user would be able to scroll up/down and LEFT/RIGHT (important because of the number of columns) to explore the grid results.

cell selection level is NOT necessary, as much I would need row selection level.

What is the best approach to get this interface element? Listview / GridView / TableLayout?

View 5 Replies View Related

Android :: Android How To Send Data From Server To Android With No Request From Android?

Oct 19, 2010

today i meet the problem.i need technic can control the android machine from server.then i want send data from server to android with no request from android.

View 2 Replies View Related

Android :: Android 1.6 - Android - View - WindowManager$BadTokenException - Unable To Add Window - Token Null Is Not For An Application

Apr 14, 2010

I'm trying to open a dialog window, but every time I try to open it it throws this exception:

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

I'm creating it by calling showDialog with the display's id. The onCreateDialog handler logs fine and I can step through it without an issue, but I've attached it since it seems like I'm missing something:

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

Is there something missing from this? Some questions have talked about having this problem when creating a dialog from onCreate, which happen because the activity isn't created yet, but this is coming from a call from a menu object, and the appContext variable seems like it is correctly populated in the debugger.

View 3 Replies View Related







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