Android :: Best Practice For Changing Min SDK Version?
Aug 2, 2010
I have a sizable install base already on some apps with Android 1.5 set as the minimum version. I want to update the apps to take advantage of some of the newer features offered in Android 2.0 and greater. What is the best way forward so I don't break things for my current 1.5 and 1.6 users?
If I simply update the application with a new min SDK version, will 1.5 and 1.6 users be prompted to uninstall? Or will they just not see the update? What about future development that I want to apply for everyone, say a bugfix. Will I have painted myself into a corner? Another solution would be to fork and create a new app for 2.0 users, but that is undesirable for several reasons.
View 3 Replies
Oct 29, 2010
if i have the Droid X Bootstrapper installed & i'm rooted, wouldn't it work if i were to push the file back into my phone thru adb shell w/o any problems?
View 3 Replies
View Related
Jun 23, 2010
I have had my Desire no for almost 2 months, and like most I have tried installing and uninstalling many apps, to see what I like.Due to doing a factory reset on my phone yesterday I have layered back all the apps I was using and have noticed that I have used considerably less memory than before, making me very suspicious of the uninstall method used within the market place.Does it leave behind pieces of the app, and if so what's the cleanest method of uninstalling apps.
View 7 Replies
View Related
Dec 4, 2009
I've been scouring the web looking for information on setting up a peer-to-peer connection between Android handsets and so far have drawn a blank. The only thing I can definitively seem to work out is that it was made a whole lot more difficult when XMPP was removed from 1.0. Apart from that, I find a couple of threads on an OpenIntents board about porting an XMPP implementation to Android that were last posted nearly 2 years ago. Has anybody solved this problem effectively? What's the best way of doing it (from a games point of view)?
View 7 Replies
View Related
Sep 17, 2009
I'm writing an application where real-time knowledge of the GPS state is critical to convey to the user. I request GPS updates at 1000 ms intervals -- when I haven't received another update 1500 ms past the most recent update, I want to display a yellow icon, and 5000 ms after the most recent update I want to display a red icon. Currently, I'm doing it like this: private CountDownTimer gpstimeout; public void onLocationChanged(Location location) { if (gpstimeout != null) gpstimeout.cancel(); gpstimeout = new CountDownTimer(5000, 1500) { public void onTick(long m) { setYellow(); } public void onFinish() { setRed(); } }; gpstimeout.start(); }
View 3 Replies
View Related
Mar 22, 2010
What is considered "best practice" when executing queries on a SQLite db within an Android app? Is it safe to run inserts, deletes and select queries from an AsyncTask's doInBackground ? Or should I use the UI Thread? I suppose that db queries can be "heavy" and should not use the UI thread as it can lock up the app - resulting in an ANR. If I have several AsyncTasks, should they share a connection or should they open a connection each?
View 3 Replies
View Related
Sep 29, 2010
I'm new to developing Android applications, and have only a little experience with Java in school. I was redirected to StackOverflow from the Google groups page when I was looking for the Android Beginners group. I have a question about what is best practice to pull content from a web source and parse it. Firstly, I would eventually like to have my application threaded (by use of Handler?), however, my issue now is that the class I have created (Server) to connect and fetch content often fails to retrieve the content, which causes my JSON parser class (JSONParser) to fail, and my View to display nothing. After navigating to the previous Activity, and attempting to call the connect(), fetch(), and parse() methods on the same remote URI, it will work. Why does this (sometimes retrieve the remote data) happen sometimes, but not always? What is the best practice, including the use of ProgressDialog and the internal Handler class, to make my application seemless to the user. Is this the best place to ask this question?
View 1 Replies
View Related
Sep 22, 2009
I am creating a database driven app for managing people. I am showing a list of people with each name in a TextView. When a TextView is clicked, I launch a new intent to show the detail for the person. My question: What's the best practices for passing the id of the person to the new intent? The TextView is displaying the name of the person, so how do I know the id of the person? Once I know the id, I know how to pass it to the new intent, but I don't know what the best way to associate the id of the person to the TextView. Is there a best practice for this?
View 2 Replies
View Related
Aug 16, 2010
In general, I'm very impressed with Android's default text to speech engine (i.e., com.svox.pico). As expected, it mispronounces some words (as do I) and it therefore occasionally needs some pronunciation guidance. So I'm wondering about best practices for phonetically spelling out those words that the pico TTS engine mispronounces. For example, the correct pronunciation of the bird Chachalaca is CHAH-chah-LAH-kah. Here is what the TTS engine produces: mTts.speak("Chachalaca", TextToSpeech.QUEUE_ADD, null); // output: chuh-KAL-uh-KUH mTts.speak("CHAH-chah-LAH-kah", TextToSpeech.QUEUE_ADD, null); // output: CHAH-chah-EL-AY-AYCH-dash-kuh mTts.speak("CHAHchahLAHkah", TextToSpeech.QUEUE_ADD, null); // output: CHA-chah-LAH-ka mTts.speak("CHAH chah LOCKah", TextToSpeech.QUEUE_ADD, null); // output: CHAH-chah-LAH-kah Here are my questions. Is there a standard phonetic spelling recognized by the Android TTS engine? If not, are there some general rules for making custom pronunciation spellings that will make the spellings more likely to be correct in future TTS engines/versions? It appears that the Android TTS engine ignores text case. What is the best way to specify emphasis?
View 2 Replies
View Related
Apr 8, 2010
I am still learning bu find Android the cool platform for allot of useful applications. I have written a Service for doing GPS tracking and it consists of a Service and a Control activity to manage, monitor and configure the service. I am looking for the preferred way for the Control Activity to define settings for the Service, things like IP address and Update interval. I envision something like a Registry on windows where these settings can be shares and updated.
View 9 Replies
View Related
Jun 16, 2009
I am quite new to Android and Java. Before I was working with C++ where the events where dispatched with messages. Now I would like to create the same user experience for Android platform and I would appreciate any of your suggestions or comments on what is the best way to bind events to user controls.
Here is an example from C++:
ON_MESSAGE(WM_RECORD_START, &CMainFrame::OnRecordStart)//Method OnRecordStarts() executes on WM_RECORD_START_MESSAGE...................
View 2 Replies
View Related
Oct 6, 2010
Some of my app's preferences could use some more explanation than the scarce space available for the summary. Sadly, there doesn't seem to be support from the system, like an optional help button that shows a longer text. How do you solve this problem? The first thing that comes to mind is an additional custom "preference" like "more information to above entry" that opens an AlertDialog with the help text, but that's not really nice for both user (two entries for the same preference) and the developer (manual work to do in Preference Activity). A bit nicer for the user, but way more work for the developer would be custom dialogs for each preference with more text and/or a help button. Is there a better solution or even an officially recommended best practice?
View 7 Replies
View Related
Apr 19, 2009
What is the best way to release two versions of an application? E.g. a free version with limited features, and a paid version with the full feature set. #ifdef would be the ideal way to do this, but Java doesn't support it. Could I do something like: try {import com.foo.myapplication.ExtraFeatures; } catch (Exception e) { // ignore it, this must be the free version}? I could manage with this kind of construct, although #ifdef really would be ideal.
View 10 Replies
View Related
Jul 29, 2009
I didn't use much Java before Android so my knowledge concerning the gc is marginal. Now I'm developing a highly physics-based game and therefore I need to do many calculations each time step and many (25) time steps per second. At the moment I'm almost only using local objects (float) in my methods, so I guess they are allocated every time the method is called (which might be, for example, 25*100 = 2500 times a second , for 100 objects with calculations on them). This causes massive activity of the garbage collector like freeing ~10000 objects every 1-2 seconds (taking ~200ms on a real device). Now I really want to optimize that because even there's no noticeable delay due to the GC (and the frame rate is constant), this seems just not well. But I read on many documentations concerning Java optimization, that there is not much to optimize in modern versions of (desktop) Java, because the GC is fast enough. Does this apply to Android, too? Does the compiler optimize anything like frequently, steady allocated objects (like floats)? What would be best practice: keep all local objects and allocate and free them all the time or use class-global objects, even if they are only used inside one particular method (which is bad programming style but conserves GC?
View 5 Replies
View Related
Jan 13, 2010
If I want to render just a huge map, what is the best practice when using OpenGL ES with a mobile device (Android or iPhone based)? What is the best structure to contain all the vertices, normales and texture coordinates? I guess using a interleaved structure may give you some performance benefits caused by memory caching. Ok? Should I use drawArrays or drawElements to push my data to OpenGL ES? Well, I did no testing at all but I might think, that drawElements might be faster if the GFX does not use shared memory since you do not have to push that much data. Since this is really close to metall, what do you think? (the iPhone is ARM based while the Android platform is Qualcomm based (also an ARM?)
View 2 Replies
View Related
May 23, 2010
I'm embarking on a GUI Activity composed of a viewflipper, which I would like to contain 10 linearlayout layouts. Is it advisable to put all of my layouts into the same XML resource/layout file? If not, is there a more organized approach to coding a viewflipper with many layouts? Will having everything in the same file come at a significant performance cost?
View 2 Replies
View Related
Mar 9, 2010
I'm having troubles with users that report that if they leave the application opened and after a few hours when they return to it the app crashes. I'm pretty sure it is because I'm not storing/restoring the status correctly when my process is killed by the system, but I would like to be able to test it in a repeatable way. Which is the best way to simulate the same behavior that happens when Android kills my process on low memory conditions?
View 4 Replies
View Related
Apr 11, 2009
I am trying to display a high score table in my application and wanted to know the Best Practice for displaying static headers or footers. The data for the High Score tableis a REST web service returing up to 100 JSON records. I have looked at some of the previous posts http://groups.google.com/group/android-developers/browse_thread/threa. that talk about addHeaderView() & addFooterView() but they all seem to indicate that the footer or header will scroll off the screen. My 1st question is has someone been able to implement this in a clean way to allow a basic static header or footer. My second question is is their another way I could accomplish my goal of displaying my high score table besides a List View. I will be displaying 6 columns of data which will need to scroll vertically.
View 2 Replies
View Related
Jul 18, 2010
When i have a broadcastReceiver say android.intent.action.MEDIA_BUTTON and i want to update the current activity's UI without creating a new activity, is there any good practice on this one?
What i know (might not be correct)
1) I can put the BroadcastReceiver in the same class as the activity and call the updateUI function after certain activity
2) Create a ContentObserver?
3) Communicate to a service created by the activity, use aidl. (I dont know how to get the current service if its registered from an activity)
4) Create a custom filter on the broadcastReceiver located on the same class as the activity, and use context.sendBroadcast(msg of custom filter) and in the custom filter call updateUI (same as one but more generic?)
The final flow is it would come from a BroadcastReceiver and ends up updating the UI without renewing the activity (unless the activity is dead?)
Kindly provide links/source code on your how you tackle this kind of problem.
View 1 Replies
View Related
Mar 3, 2010
Does anyone know how I might go about accessing an Activity in an application from a BroadcastReceiver (in the same application)?
(I have some state information in the Activity I'd like to update)
I'm not sure if there is a best practice for it.
View 2 Replies
View Related
Aug 18, 2010
Now that SENSOR_ORIENTATION is deprecated, what's the best practice for obtaining compass reading? The old way was so simple.
View 1 Replies
View Related
Sep 13, 2010
I have a design question I was hoping someone could answer or offer guidance. I am designing a game that will initially have 100 levels but the user will have the ability to purchase additional levels. For instance when the game is released the free version will have 100 levels and then the user can buy and additional 100 levels while in the game. Does the Android SDK have any built-in methods to deliver additional content? Does and third party provider offer any such service to deliver content? If this is something that you must custom create yourself, what is the best practice for creating?
View 10 Replies
View Related
Nov 3, 2010
I am considering adding a means by which my app can perform functions over Google Voice, and the functionality would make little sense if I required the user to type in a password.I'd like a reasonable plan for storing the password locally and sending it (through google-voice-java) when demanded by Google Voice.Clearly, I'd like to properly represent the risks of the chosen scheme honestly to the user. I'd like the storage to be based atop writing it into a SharedPreferences created with flags.What form of obfuscation is suitable, and with what available salting ingredients and such should I customize it?
View 4 Replies
View Related
Jun 20, 2010
I am new to developing for android. I have a question regarding some best practices. My app is like a dashboard from which multiple different "sub-activities" can be started and done. I am wondering what is the best way to structure the app. One way is to have different layouts and load and unload them appropriately. The other is to start new activities using intents. At least this is what I have gathered from what I have read.
View 3 Replies
View Related
Aug 23, 2010
I fight with me for some days about asking this question.
Its pretty plain and simple:
If you have an application with a GUI totally working on 2D drawing, what should be the best practice to handle what to draw and where to touch?!
Some example for better understanding:
I have a game with a map. On this map I can build houses and stuff.
I also have a information bar which can be extended. On the extended bar I draw some information about the game and also enables to change different values. If a touch occurs, I have to check, if the information bar is extended or not to determine if I want to change something on the map or something on the bar.
Thats done by the State Pattern, but I have some doubt if thats the right one because I think it can be a bit complex because of possible "sub-states".
So basically the question: Is the State Pattern (from GoF) the best practice to handle a pure graphical GUI?
View 1 Replies
View Related
Sep 20, 2010
The title more or less says it all.
Google Checkout, as you may be acutely aware, only supports ~9 countries. Some apps use PayPal to receive payment, then send out an "activation code" to the user. How can this be done to ensure that a single user receives a single activation code? Once the app verifies the code, how could the app more or less "verify itself" that it's been paid for? Storing such data in a preference file or a database on the Android device can surely be easily extracted and exploited.
How are other developers handling app sales in other countries--or do they just not care?
View 5 Replies
View Related
Sep 29, 2010
I have multiple ListActivity(s) with a custom ArrayAdapter. I have to load an XML file from the Web, and the user moves to a new activity by selecting a list item.
What is best practice for:
Displaying a loading indication to the user.
Threading the networking stuff so that the user can cancel the loading of the data if need be / move to the previous activity.
Example/source code would be greatly appreciated - I've used http://www.helloandroid.com/tutorials/newsdroid-rss-reader as an introduction, however it doesn't display a loading indication.
View 1 Replies
View Related
Jun 7, 2010
I have to use context in many places of my code such as database operations, preference operations, etc. I don't want to pass in context for every method. Is it a good practice to create a reference to application context at the main Activity and use it anywhere such as database operations? So, I don't need some many context in method parameters, and the code can avoid position memory leak due to use of Activity Context.
View 1 Replies
View Related
Apr 25, 2010
I'm running into an IllegalStateException updating an underlying List to an Adapter (might be an ArrayAdapter or an extension of BaseAdapter, I don't remember). I do not have or remember the text of the exception at the moment, but it says something to the effect of the List's content changing without the Adapter having been notified of the change.This List /may/ be updated from another thread other than the UI thread (main). After I update this list (adding an item), I call notifyDataSetChanged. The issue seems to be that the Adapter, or ListView attached to the Adapter attempts to update itself before this method is invoked. When this happens, the IllegalStateException is thrown.If I set the ListView's visibility to GONE before the update, then VISIBLE again, no error occurs. But this isn't always practical.I read somewhere that you cannot modify the underlying this from another thread--this would seem to limit an MVC pattern, as with this particular List, I want to add items from different threads. I assumed that as long as I called notifyDataSetChanged() I'd be safe--that the Adapter didn't revisit the underlying List until this method was invoked but this doesn't seem to be the case.
I suppose what I'm asking is, can it be safe to update the underlying List from threads other than the UI? Additionally, if I want to modify the data within an Adapter, do I modify the underlying List or the Adapter itself (via its add(), etc. methods). Modifying the data through the Adapter seems wrong.I came across a thread on another site from someone who seems to be having a similar problem to mine: http://osdir.com/ml/Android-Developers/2010-04/msg01199.html (this is from where I grabbed the Visibility.GONE and .VISIBLE idea).To give you a better idea of my particular problem, I'll describe a bit of how my List, Adapter, etc. are set up.I've an object named Queue that contains a LinkedList. Queue extends Observable, and when things are added to its internal list through its methods, I call setChanged() and notifyListeners(). This Queue object can have items added or removed from any number of threads.I have a single "queue view" Activity that contains an Adapter. This Activity, in its onCreate() method, registers an Observer listener to my Queue object. In the Observer's update() method I call notifyDataSetChanged() on the Adapter.I added a lot of log output and determined that when this IllegalStateExcption occurs that my Observer callback was never invoked. So it's as if the Adapter noticed the List's change before the Observer had a chance to notify its Observers, and call my method to notify the Adapter that the contents had changed.
So I suppose what I'm asking is, is this a good way to rig-up an Adapter? Is this a problem because I'm updating the Adapter's contents from a thread other than the UI thread? If this is the case, I may have a solution in mind (give the Queue object a Handler to the UI thread when it's created, and make all List modifications using that Handler, but this seems improper).I realize that this is a very open-ended post, but I'm a bit lost on this and would appreciate any comments on what I've written.
View 1 Replies
View Related
Jan 19, 2009
Is it possible to use linux version flash player plug-in on x86 for android x86 version?
View 3 Replies
View Related