Android :: Activity Design Advice

Mar 3, 2010

I have a service running that grabs the users attention with a notification. What i would like to happen when the user clicks on the notification is for it to launch a dialog box. The "proper" thing to do is to launch an activity in this way, so is there a way to get an activity to launch with out filling the screen? So it looks like a dialog box?

Android :: Activity design advice


Android :: Looking For A Design Tip / Advice / Doc

Aug 2, 2010

I'm kind of new to android development.I have read from many sources that findViewById() is a "costly" operation. I'm making an application that deals with 5 TextViews to provide different kinds of information (distance, duration, title, description, etc) from a database. I'm using listeners to catch touch/click events and feedbacks a handler. The main function of the handler is to received a "position" in the Cursor where the new information needs to be displayed. I mentioned earlier that findViewById() is a "costly" operation. So, I don't call this method in the handler. Doing so, it will retrieve every time the Views when user touchs/clicks some widget. Is it right to populate the Activity with private members of the Views/Layout it displays? I mean, I don't like it. I don't know why, but seems that I'm populating too much the activity. I'm aware of the android:onClick xml attribute, but in my case I also use long click listeners. So, a piece of onCreate() looks like: And all of those are private members, wihout mention the "cursor.getColumnIndex()" for each. I thought on implementing Handler.Callback and set on the Hanlder.Callback constructor implementer a View array or a View list or something, but I also need this objects later to set other listeners and setups. Is this right? I cannot think another way, as I need the reference to the object, and also the Cursor reference that the handler will move to the "position" provided and update the correspondent View. I will really appreciate either an advice or a useful link/info/doc to read in what concern in this kind of designs. What I do not like is that It looks like imperative programming filling the Activity with "global" variables.

View 6 Replies View Related

Android :: Advice On Structuring A Service / Activity / Thread

Oct 5, 2010

can someone please help me? I would like to write a program which uses a service to periodically update a text view on an activity. I do this by having ActivityA with a 2 buttons to start/stop my service. In the service I run a timer which triggers every second. From here I need to have this launch and update a text view on ActivityB which at present is just a counter value.I'm sure there are likely better ways to do this, such as using only one activity, maybe using a thread but the main design consideration is to have the service running even if my activity is destoyed (the counter value would instead go trigger some alarm or file write instead of a text view update). Sorry for rambling. I find the android developer resources offer too many solutions!

View 2 Replies View Related

Android :: Design Clarification In Android List Activity Vs Activity

Mar 25, 2010

I have a simple question. I am trying to design a simple Android app, which based on keywords searches something and shows a listing view of results. Currently it merely searches SMSes in the cellphone.Here are some of the things I am faced with: I have a simple first page with a textbox and a submit button. It's rendered by "Activity" inherited class call SMS Finder.once I have the results present with me, I want them to be binded to a list view. Showing preview text to limited characters, say 20 chars. Clicking on the same should "ideally" open the inbox (or outbox or whatever) and open the SMS, however that meant I cannot come back to my app easily. So I would rather open the whole SMS in my own app. So clicking on the app should open the SMS in a new screen with complete message, sender info etc. Few questions here, For generic Android phone apps, what are the best practices to make UI as compliant to as many phones? Like what kind of views should I use?

View 1 Replies View Related

Android :: How To Design Activity And Service Writing To Same Table?

Jun 14, 2010

I have an activity which starts a (intent)service. Both access the same DB and potentially write to the same table. What design pattern would you recommand to avoid concurrency?

View 2 Replies View Related

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 :: 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 : Design - Launch An Activity Based On Type Of A View

Nov 4, 2010

Should I create a Listener within a BaseAdapter or should I pass it in? I have 4 classes that inherit from a base class. I pass the Adapter a list objects.

The Adapter is eventually used with a ListActivity I want to create a View based on the derived class and I want them to launch an Activity based on the type of a View. Currently I create the intent and Listener in the BaseAdapter. Is what I'm doing a good pratice?

View 1 Replies View Related

Android :: Android Service Design - Start With Activity Or When Needed?

Nov 24, 2010

I'm an android noob that is looking for some advice on how to properly use a service in Android. I am building an app that will connect to a server on the Internet to get a data stream via TCP. That data then needs to get send out to another device that is connected via a bluetooth serial port. I want this to continue to function in the background while the user looks at a different activity. The app will be a NTRIP client, which pulls real time RTK correction data from the Internet and sends it to a RTK GPS receiver that I connect to via bluetooth. The data rate will be about 500 bytes/second. The user interface is a single button to connect or disconnect the data stream and some text to show status of the GPS receiver. There are also a few settings that will need to be configured by the user such as the IP/port of the server to connect to and the bluetooth device to communicate with.I think I need to have the main activity spawn a local service, and then have the service spawn a thread for the TCP stream and another thread for the bluetooth connection. Does this sound right? What is the best model for the service in this scenario?-Start(bind) the service every time the activity starts, and have the connect/disconnect button send commands to the service to start/stop the threads. If I go this route, the service will continue to run after the user disconnects and goes to another app. The service would need an inactivity timer to terminate itself.-Start and stop the service when the user presses the connect/disconnect button. The service only runs when data is moving. If I do this, the activity will need to see if the service is running when the activity starts, in order to know if it should bind to the service or tell the user that the link is disconnected.

View 2 Replies View Related

Android :: Design Of Android Activity

Jun 27, 2010

Alice has to answer three questions. After she answered the questions she gets a dialog that lists the question and answers and there's a button to save the answers to a database.

At the moment I think that the design should be three classes: Master, Question, Summary.

Master calls Question with an intent that includes the question text of question 1.
After Alice inputs her answer the Question returns the answer to master via an intent.

Repeat two times.

Then Master does processing of the questions and calls Summary via an intent.

Is this kind of design recommendable in Android? Is it possible to have such an Master activity. If so, how can I allow a running master activity to listen to intents?

View 1 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 : Advice On Accessories

Jul 30, 2010

What accessories do you experienced users have/recommend?I know there are 2 kinds of cases - hard or soft gel.Which is better (and why).What about the home docking station?Worth it?

View 2 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 :: Bind Service To Multiple Activities Advice

May 19, 2010

I'm new to Android development and am working on a small test project. I have a service, which communicates with an SQLite3 database, and two activities. A main activity which fetches database information via the service and displays it and a second activity which allows me to add data to the database via the service.

Currently, I have a singleton class which implements the ServiceConnection interface and I'm binding this to the service in the the main activity using the bindService function. Because it's a singleton, I can then use this service connection in both the main activity and second activity to work with the database and it all seems to work quite well.

However, I'm all the time aware that the service connection is bound to the main activity and I'm wondering if this is the wrong/bad way to do it? Would I be best off having two service connections, one in each activity, and binding each to the service?

View 2 Replies View Related

Android :: Buffering Background Image - Graphics Advice Sought

Mar 28, 2009

I am unsure of the jargon so please bear with me, I am seeking advice on the best way to go about drawing the graphics for an app I am developing. Imagine you are creating a game of checkers, where you can drag/drop one piece at a time to a blank space on the board. When the piece is being moved, it seems to me that you should not need to redraw all of the pieces that are not being moved. Using the LunarLander example, is there a way to store the background image and only draw the piece being moved over it? I have been trying to figure out a way to capture the canvas as an bitmap that is occasionally refreshed.

View 5 Replies View Related

Android : Advice For A Free Lance Programmer With Limited Experience?

Sep 15, 2010

I have one year of experience in programming. After getting laid off in cuts I managed to get a job in telecommunications planning. I'm good at my new job and don't want to leave it but I miss programming. I'd like to be able to code in my free time (which is about 4 hours every evening 7 days a week.)

I can code pretty well in C#, reasonably well in SQL and poorly in a unix shell.

What sort of job should I get on the side? Would anyone hire me as a free lancer? Should I focus on making apps for phones (android) instead?

View 7 Replies View Related

Android : Advice Needed For Manipulating Mediastore For All Music Files?

Aug 3, 2010

I'm rather new to android programming and right now I'm playing with the media store for a personal test project. I've run into a couple double-edge problems..

I need to query the mediastore for a list of all music files, simple enough - but i need to restrict the results to certain folders only. I accomplished this (rather easily) using the SQL-*LIKE- where clauses and all's well on this aspect.
I now need a unique (if this were actually using SQL, I could simply use the DISTINCT modifier and be done with this) list of all artists. Now this is based off the songs in a given path. Therefore I cannot filter the list returned from querying the URI:MediaStore.Audio.Artists.EXTERNAL_CONTENT_URI, and adding in where clauses based off the file path as I did in the first step.

So, what this leaves me with is using my initial query and getting a cursor back then stripping the dupes from the cursor (which is where i am now - too slow, especially with 1000+ songs) - based on a query of artists instead of songs, obviously.

Is is possible to override the actual query that fills the cursor, maybe? As in: override the query and filter how the data is initially put into the cursor (remove recursive entries) and return the proper cursor immediately? Content providers and how they were never built with a distinct function is beyond me, but whatever. Is the returned cursor from a URI query command filled in a manner that can be overridden or not? That's what I'm unclear of at the moment on this. I would like to be able to wrap the getContentResolver().query(xxx..)) command directly to remove the entries on cursor fill, if possible - i do async queries and using a single query statement (well, one for the artist query) would be great.

My other alternative thought is to just preload the data and manipulate my view's data by creating a new cursor based off the preloaded dataset (cursor) - which may be the way to go, and if so - would a cursor be the best way to store this data? Also worried about ram with larger libraries.

Maybe there's simply a way to do a DISTINCT query on the URI - I just do not know. I've seen this question (or the ilk there-of) asked many times with no good answers that were meant for a URI as opposed to a SQL back-end.

View 1 Replies View Related

HTC EVO 4G : Before Bad Battery Advice Starts

Jun 4, 2010

Do not discharge lithium-ion too deeply. Instead, charge it frequently.Lithium-ion does not have memory problems like nickel-cadmium batteries.No deep discharges are needed for conditioning.I know once the battery bashing starts there will be 1000 suggestions to deep cycle batteries. Android may benefit from a discharge cycle, but I can't find anything authoritative on this yet. Perhaps a developer can help?

View 3 Replies View Related

HTC EVO 4G :: Advice Wanted Check My Running App

Jun 25, 2010

Here's some "snap me" screenshots.Are these all normal applications to be running? p.s. I realize that shoot me was running, kinda obvious

View 1 Replies View Related

Sprint HTC Hero :: Need Advice On Uninstalling Apps

Mar 22, 2010

I'm new to Android and just got a Hero a couple weeks ago so I'm searching all the forums (and other Android sites) for useful tips. So far, I'm impressed with the Android OS, the Hero and even like HTC's Sense UI. There are some apps included with the phone that I don't want/need (ex: Sprint TV, Nascar, HTC Widgets, etc.) I'd like to uninstall them but based on what I've read in some posts some apps can't or shouldn't be uninstalled is that correct? If so, which apps? Do I need an uninstaller or does "managing applications" work just as well?I've seen many posts advising the best way to get clean-up your phone (get rid of the bundled bloat, etc.) is to "root" your phone but doesn't that process erase/over-write the HTC-customized version with the "plain vanilla" Android OS? If I root my Hero, won't I lose access to the Sense UI components that I wanted to keep?

View 4 Replies View Related

HTC Hero :: Advice On Partitioning Prior To ROM Update

Jan 6, 2010

I am currently running MoDaCo 2.5, firmware version 1.5. Been busy the past few weeks with work and what not, so I haven't been keeping up to date with the ROM updates. I checked today and found that the latest version is 3.0 and I have been reading up some threads where I read that apps2sd can be done on the phone itself now after updating to the latest ROM. Can some one give me some detailed explanations on the methods of achieving apps2sd. Would I have to partition the SD card prior to updating the ROM, or would it be advisable to do so after the update?

View 12 Replies View Related

HTC Desire : Task Killers / Memory Watching Advice

Aug 23, 2010

I notice there are a number of apps for dealing with turning off apps that are running in the background and using memory

1. Which is the best task killer app out there?

2. How much memory should you generally as a rule of thumb keep available at anytime?

View 16 Replies View Related

Sony Ericsson Xperia X10 :: Optimum Settings Advice

Nov 24, 2010

i don't incur the Debt of a Small country!! Can you offer advice on the best settings/ Option to use to kill all Data! Even if the browser is accidently pressed by your kids wanting to play Angry Birds!!

Is it simply to kill the roaming? Or the Data traffic option? Or would you call the carrier to be doubly sure?Still want to be able to use the Wi-Fi as it's free in the Lobby!! Just checked the prices with Orange for Mexico and soaked my monitor with Tea on the prices quoted!8 per Mg of data!!! Pants down prices!!

View 6 Replies View Related

Samsung I7500 :: Most Optimized 1.5 Firmware Version Advice Wanted

May 25, 2010

I installed Galaxo 1.6.3.2 the other day and GPS performance sucked (im not the only who has noticed this)I decided to go back to the roots. I want your opinion which 1.5 version is most responsive, fastest, least battery consuming qnd gps friendliest. Languages are not important (beside english ofcourse).

View 6 Replies View Related

Sony Ericsson Xperia X10 :: Require Advice / Internet Stopped Connecting

Jun 23, 2010

I got the Xperia Mini only a week ago, internet has been working fine until yesterday, its unable to connect to my home page or any apps i have on the phone! Even 3G symbol does not come up! Anyone help? I dont know if i accidental touched a wrong setting.

View 2 Replies View Related

Android :: Advice On First Application (loading Data / Populating Data)

Jun 23, 2010

to start with I've gone through the entire notepad tutorial, I'm a professional game programmer who has some extra time. (though most of my time has been in C++, I did take a year or two of Java classes in college, and remember some of it). I'm not sure the site is a good site to ask questions like this.. If someone has a Forum that might be a good place to ask these newbie questions, please feel free to point me in the direction. I've examined a few of the samples, and think I've a grasp of what I want to do. I've a three to four project plan for some Android releases to sharpen my skills, but since this is my first project and I have never really developed for a mobile phone or the android before, I'd like to make sure I have a solid plan.The first project is an example of the license plate game, however I want to do a few things to change it. Heck maybe when I'm done it'll become a bingo style game, with bluetooth connectivity, you never know. The base idea is I want to offer a list of states, with checkboxes next to them. so to do this, I'll be starting with a Linear List layout similar to the note pad example, and then have a row that is only a Checkbox. I can use text and call strike through if it's been checked off. Perhaps offer an option to not show them if they are checked.

But I want the list to be generated from a set of lists. Maybe all of America's states, maybe reasonable American states (no Hawaii, no Alaska) maybe a North American list, (add in Mexico and some Canadian provinces), a European list, who knows. I'd probably have to have a pop up window that lists all of the lists I suppose using a radiogroup of some sort. So then as far as the data, after weighing options I think best solution is to make a database with two fields, "checked" and "name".I figure I can use the menu for most of the user interaction (aside from clicking on stuff we want to check off) with maybe a few context menu items, I understand how to make all of those already so I should be good. The question I have is what is the best way to populate the lists? Should I create raw data, and have different files for all the lists? Or is there some other way to do this? I've seen this done on the searchable dictionary, but I'd like to hear what people who have actually generated the data like this before. In addition is there an easy way to look at the sql database these applications create, or do you have to run searches on them and output the data? Finally any other suggestion or advice? I definitely want to try to get something like this on the market so I can see the full life cycle and see if anyone actually likes it. (luckily there's not a plethora of them already) but I also want a few people to look over my code if they're willing when I'm done to make sure I've done this right or at least not missing any basic mistakes.

View 2 Replies View Related

Motorola Droid :: Droid And Eris Purchase, Need Tech Advice

Dec 22, 2009

I am about to get the Droid and the Eris through Verizon (get one free deal), the Eris is for my wife, separate line joint account. My question is we are coming from the iphone where our calenders and contacts and all were always synced up. Will I have a problem doing this with these two phones or would it be easier if they were both Droids or both Eris?
Thanks

View 2 Replies View Related

Android :: APN Design - Access Pointer - MMS

May 13, 2009

in Android code, It is a very strange concept to define the APN type (APN_TYPE_MMS). The reason are: 1) APN only is an access pointer, it haven't any special attribute for MMS or other things. 2) Only Application care the APN name, since different APN will provide different service from operator. for example, operation may provide Email/MMS/GPS/.... service on different APN. 3) Android only define one type APN_TYPE_MMS, this will limit other top application usage. Any one can answer me why Android design this way? If google have strong reason for such design, I hope add other user defined type like APN_TYPE_USER1 APN_TYPE_USER2 then top application can set his property to use its APN other than APN_TYPE_MMS

View 2 Replies View Related

Android :: How To Design A Floating Keyboard

Oct 13, 2010

I am a developer and recently completed the implementation of my keyboard MessagEase. It's available on the Market (with its very- different features, making it quite unlike QWERTY).

This keyboard works fine as a replacement of the standard keyboard on an Android Phone. But for a An Android Tablet, it would work best if it's implemented as a floating, movable keyboard.

(the footprint of this keyboard is mostly dependable on the size of a human's finger; it remains the same even if the tablet's display is much larger than a phone's. Therefore it'll take a relatively smaller area on a tablet.)

If I use the current SDK hooks, it will have to take a significant portion of the screen, defeating the purpose.

View 2 Replies View Related

Android :: Launcher Icon Design

Sep 1, 2010

I'm more than happy coding apps.I am, however, rubbish at icon design.I'm sure I'm not the only one for whom this is a problem and yet all android devs need to create a launcher icon.Does anyone have any good tips on knocking up simple but effective launcher icons?

View 5 Replies View Related







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