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?

Android :: Advice Needed on Application Approach


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

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

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 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 :: Where To Globally Keep / Cache Data Needed For All Application Lifecycle?

Nov 17, 2010

I'm fairly new in Android/Java programming, so some of the basic stuff is still quite confusing. So, lets say my application gets all data (articles) it requires from external XML files, it parses them to data models (Article class) and those articles will be used (displaying in lists or single article) all over the application for all it's lifecycle.

Where should I keep them? Can I create singleton class with an array containing all the articles I've parsed? Or should I save them to database and then query it on demand? (that sounds like too much work, I don't need to cache them for now) What's the best practice here?

View 2 Replies View Related

Android :: Multiple Back Button Clicks Needed To Exit Application

Jul 30, 2010

In my current application design, I have an activity class application.java (which starts on launching the application), and it does not have a layout(UI screen). I call another class called servicebind.java from the onCreate method of my 1st class. here I bind to the local server (bindServer()). i call back the application class through an intent. Once I am back to my application class, I call my activity class called welcome.java which has a layout/UI. When I run this application, I am able to see the welcome screen. But the problem is, when I click on the back button, I get a black screen with just the title on top. I have to hit back button 3 times to exit the application.

The reason I see from the logs is that, the 1st 2 activity classes (application.java and services.java) does not get destroyed unless I hit the back button. So the 1st time I hit back button, the welcome activity gets destroyed. the next back button destroys the servicebind class and final back destroys the application class. Is the reason because these classes dont have a UI to display in the onCreate method. I do not want to change my design where I bind the service in the servicebind class and call the welcome activity in the application class.

View 4 Replies View Related

Android :: Beta Testers Needed For Free Application Internet Radio / Ripper?

Sep 10, 2009

Broov Internet Radio/ripper : Free Android application. We need beta testing to be done for our Internet radio/ripper application in Android platform supporting 1500+ radio stations based on genre, region and popularity of channels and also with PLS and M3U file support. Please contact vnareshprasad@broov.com to test and use the Internet radio application free .. and send feedback to improve it. and ugrade it for you people..

View 6 Replies View Related

HTC Incredible :: Root Application Needed That Unlocks Phone With Joystick

Jun 13, 2010

We need some one to create an app that will bring the phone out of standby using the joystick.It doesnt need to unlock it it just needs to turn on the screen so we can unlock.Any one know who i can email so that we can get a developer working on this project.This one is one thing i REALLY need on the incredible.Hitting the power button over and over sucks.

View 18 Replies View Related

Android :: Version Of Android Needed To Create A Working AR Application?

Sep 24, 2010

Which version of Android is needed to create a working augmented reality application ?

View 1 Replies View Related

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

View 5 Replies View Related

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

View 9 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 :: 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 :: 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

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

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







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