Android : How To Maintain Backwards-compatibility?
Apr 17, 2010According to the instructions found here, to make your app state which screen sizes you can support, you'll need to compile your app against Android 1.6.
View 1 RepliesAccording to the instructions found here, to make your app state which screen sizes you can support, you'll need to compile your app against Android 1.6.
View 1 RepliesI've got a question as I don't have an Android 2.0 device to test on and this particular aspect seems untestable in the emulator. I've got a service that needs to be run as a foreground service. I have a notification that stops it etc, so I have no problem using startForeground instead of setForeground. However, I'd like to have 1 version of my app that works across all platforms... Is this possible? If my app is compiled with Android 1.5 and uses setForeground, then will that command actually work on an Android 2.0 device, or does it not matter which sdk was used to compile? I've tried compiling with 2.0, and surrounding the call to startForeground with a try/catch, but that throws a VerifyError when the service is started, when run on a 1.5/6 device since startForeground doesn't exist there. Can I catch and ignore the VerifyError somehow and make it work that way?
View 5 Replies View RelatedAre the newest versions of aapt backwards compatible with the older versions? i.e. can i read 1.0 & 1.5 apks with the 2.0.1 SDK aapt? My tests show me it works, but is it failsafe?If this is not the case, what's the easiest way to determine the android version an APK was developed for and know which aapt binary to use?
View 2 Replies View RelatedIs Android backwards compatible, in other words can an application developed in Android 1.6 run in Android 2.0? I just published a 2.0 application and discovered that I can't find it in the market using my G1 (Android 1.6) phone. But apparently others are downloading it. Should I downgrade the application to 1.6 or do I need to create separate applications for each Android version?
View 8 Replies View RelatedI plan to make some tasks like DEX file optimization be processed by installd on the background asynchronously, thus installd needs to notify the Installer of the result at some uncertain point when the request has been processed. Currently, a socket connection will be established each time when Installer sends request to installd and the connection will be closed when it returns. Thus I plan to hold another persistent socket connection for the backwards notification. Then whenever a request has been processed, installd can notify Installer through the persist socket.
Is there any other way to implement this?
Here's my situation: I have an app that's been compiled using 1.5 SDK and minSdkVersion=3. Now I want to add 2 icons: one for high density screens like Droid and another one for low density screens like G1.
For this, I added the high density icon to new directory drawable-hdpi- v4/. I then compiled using 1.6 sdk and added targetSdkVersion="4" to the manifest. minSdkVersion is still 3.
This is working in limited testing, but I'm not sure if I have done everything correctly.
I have many questions:
1. By specifying v4 in drawable-hdpi-v4, the icon will not be displayed to 1.5 or below OS's. But what about users with 2.0 or higher SDK's? Will they get the non-hdpi icon, since they will have v6 or v7 ?
2. The documentation for targetSdkVersion states, "Specifying this target version allows the platform to disable compatibility settings that are not required for the target version (which may otherwise be turned on in order to maintain forward-compatibility)". Does this mean that my app will not be forward compatible as soon as I specify a targetSdkVersion? What exactly is being turned off?
3. Even if I leave out the targetSdkVersion="4", the app runs ok. So do I really need it?
4. Should I be using the latest SDK (2.1) and setting that as the targetsdkversion and compiling against that? Or some other combination of targetsdkversion and compiling sdk? I'm not using any API's that are not in 1.5..
5. Is any of this related to why some of my HTC Eris users have complained that they can no longer find my app in Market after upgrading to 2.1?
I am currently running CM 7.0.3 (2.3.3) and want to update ROM to CM 7.1.0.1 (2.3.7)
My Question is this: can I use THE SAME Titanium Backup APK from 2.3.3 to BACK UP ALL APP DATA and IMPORT APP DATA TO 2.3.7?
The requirement is totally simple: I want to have a lite and pro version of an app. There is a little bit of difference between those two apps, but they are 99% identically. Unfortunately it seems that the best choice is to really treat this as two projects that are one and the same and copy over the source code and assets from one to the other. The Android Manifest file must be different, because the Android Market - for some reason - makes the implementation's package name the ID. Working around this ID issue the straight forward approach would be to have a third project with the common code that exports its code, libraries and in a best case scenario also the ressources to the other two objects. Unfortunately this doesn't work. Only the actual Android projects generate the R.class and so the common project would need to be dependent on it..
View 6 Replies View RelatedI am new to android programming. In my application, i want to implement automatic scrolling. So, i used scroller for this purpose.It is performing scrolling but not maintaining constant speed till the end of scrolling the text. Can anyone help me out of this problem.
View 2 Replies View RelatedDuring my game loop I am constantly loading images using BitmapFactory.decodeResource(getResources(), R.drawable.objectx); Most of the time I'm calling images that have already been decoded earlier. Am I slowing down execution by decoding the resource every time? Is it better to store every image into a Map (or Dictionary) at the beginning of the program? If so, how do you get the resource IDs for all images in the drawable folder?
View 1 Replies View RelatedI would like to know if its possible to prevent my application from looking different every time I run it on a different android phone. For example, on stock 2.2, my seek bar (with default values and theme) has an orange color for the selected portion, whereas on a Samsung Galaxy S (with 2.1), it is green. Also the tab background is grey in stock 2.2, but blue in Galaxy S. On a similar note, my rating bar changes size too. I do not implement multiple screen resolutions and all my drawables are located in the "drawables" folder under "res". I donot specify a minimum sdk requirement.
View 5 Replies View RelatedMy ListActivity is bound to an ArrayAdapter where I have overriden the getView() method. If I change the visibility of a widget in that method or modify the view's background color, those changes somehow get lost once that modified list item returns after being scrolled off the screen. In fact, some other view in the list is picking up the changes. How do I get the modified view to look the same when it's redisplayed after scrolling?
View 1 Replies View RelatedI have two spinners in an activity, A and B. Each spinner uses an arrayAdapter linked to one or more string-arrays from an XML file. I need multiple because B's values are populated depending on what is selected in A.
View 1 Replies View RelatedThis usually happens when the user hits "Home", does something else, then eventually wanders back into the app - it attempts to go back to where it was before, but the application Context has mysteriously lost all its previously-saved state information (in my case, a few integers and a few Strings). I know this is a very vague question, but are there any cases (other than the user using "back" to back completely out of the application) where the application Context gets completely destroyed even though the application is not terminated? Is there a better way to maintain persistent state information?
View 1 Replies View RelatedIs there an app that I can use to maintain the balances of multiple credit cards? The app does not need to be able to directly access the credit card's balances online (straight thru online banking), but I must be able to add transactions and update it manually. I also should be able to manage multiple cards without the app adding the balances of all cards into a grand total (balance).
View 6 Replies View RelatedHow can I maintain the position of my ListView in my activity when I go to another activity (by launching another intent) and then come back (press the back button)?
View 2 Replies View RelatedWell, not sure if this was already somewhere else, but I looked and couldn't find it, so I'm gonna ask here...
What are the required APKs to maintain running the Android OS? I have root access on my Eris, and was tinkering around with a bit with removing some of the preinstalled APKs such as YouTube and stuff like that, just wondering how much I can delete and work to create my own system to a certain extent. Anyone that can let me know what I need would be nice.
I have built an app for the Motorola Droid which should automatically update a server with the phone's location. After the user performs a particular task on the main activity screen, an alarm is set to update the user's location periodically, using a service. The alarm is explicitly stopped when the user completes another task. Thing is, I have set up a location manager within the main activity's onCreate() method which is supposed to place the first acquired lat/long into two textview fields. Even though the manifest is set up for acquiring coarse and fine coords and I'm using requestLocationUpdates (String provider, long minTime, float minDistance, LocationListener listener), with minTime and minDistance set to zero, I'm not seeing the coords coming up on the screen.
With that, I'm not recording any locations on the server. When I seed the textviews with sample coords, they are being recorded fine on the server. I am not at a computer that can run the IDE, so don't currently have the code, but am desperate for some help on this. One other thing is that the main activity screen calls a photography app before the user manually clicks "send data". I'm suspicious that I may need to override the main activity's onResume() method to do this location acquisition.
While developing a sample android application I have constructed two activities
1)Activity 1
2)Activity 2
Now Activity 2 is the foreground activity whereas Activity 1 is the background one. Now user presses Home key. The application(i.e. both the activities) disappear. Now is we relaunch the application we see Activity 1 as the foreground activity. My question is:
1)Does the platform maintain any history entry when pressed home key?
2)How do we take the user to the last launch activity on relaunching the application?
I am working on my App. in between i pressed the Home button on the device. my app will go to the background tasks. After that i long press the home button it will show my app as a persistent state. i.e where and what i had done in my app. But i click my app in the directory window it restarts my app. i want to do if my app is in the background tasks it will wake up else it will start. how to achieve that?
View 1 Replies View RelatedI'm developing one of my first Android apps. I come from an ASP.NET world where it's trivial to have separate Web.config files for dev, test, and production. Does anyone have a good, automated way of doing this for Android via Eclipse?
View 1 Replies View RelatedIf you derive a class from ArrayAdapter for the purpose of customizing the views of listview items, and you vary the background color of those items by doing something like this in getView()...
View 2 Replies View RelatedI'm interested in knowing how other people maintain good battery life with their evo. I get about 5 hours a day with moderate usage. I don't do much but put the screen brightness in the middle and occasionally going into "running applications" and closing the ones I don't need or use (most of them being the trashy default stuff); Turn off syncing when not needed; turn off GPS and other seetings that are not continuously needed to be left on.
I also configured my send and receive settings for each mail account. I know there is no official way to close out an app when your done using it, I usually just press the home button when i need to exit an app. Does everyone else do the same? Or is there a better technique to officially close apps and stop them running when you are done using them? Without DLing a task killer app cause I don't want one.? Feel Free to share your ideas or techniques.
I notice that after awhile the speed of the phone slows down quite a bit when I haven't rebooted the phone. Is there any way to maintain the fast speeds without having to occasionally reboot? Not using any task killers either btw
View 7 Replies View RelatedMy Christmas gift this year... the HTC Hero. Quite happy so far. However because neither my hubby (he has a Palm Pre) and I have ever had an android before, I have a few questions that he can't seem to answer. So please excuse the simiplicity of my questions
1)) What is the best way to maintain good battery life? Is there a specific % I should never let the batter fall below?
2)) Besides from being able to pull ringtones from my MP3 files on my PC, are there any good websites that offer free ringtones for android devices?
3)) My Hero came packed with a whole bunch of apps that I will never use. Like NFL Mobile, Nascar, Amazon and YouTube apps. Is it okay to delete these from my phone entirely? Will doing so free up memory for bigger and/or better apps?
4)) Are there any types files or apps that I should not put on my phone?
I have seen this happen many times on my Phone. I have folders on my Homescreen with Shortcuts/Apps in them. Inside a given folder, I have a SPECIFIC ORDER to my Shortcuts/Apps. For whatever reason, my phone will decide to mess up that order that I created. Various things seem to trigger my phone to re-arrange the Icons in my folders. For example, unplugging my phone from my computer after disk use triggers it.
View 4 Replies View RelatedThis has probably already been discussed, but I couldn't find anything. Do we need to periodically drain the battery completely to maintain it, or is it alright to charge it every chance I get?
View 6 Replies View RelatedI have a DIR-655 and just got my Droid X. It will not maintain a connection to it. I tried all the obvious things... Forced it to G only, tried using the guest zone with different encryption.
View 32 Replies View RelatedI have created one custom view that contains the horizontalscrollview. Now when i changes the orientation its scroll state change to 0 every time. I got the previous scroll state by using onSaveInstanceState(Bundle savedInstanceState) and onRestoreInstanceState(Bundle savedInstanceState) . in onRestoreInstanceState i am using following method to get reposition the scroll, hoz_scroll.scrollTo(hoz_x_pos, hoz_scroll.getScrollY());
View 2 Replies View Related<supports-screens android:anyDensity="false" android:largeScreens="false" android:normalScreens="true" android:smallScreens="false" android:resizeable="false"></supports- screens>
first of all what is the resizeable attribute? It does not seem to be documented. This is working almost 90% for my game except when testing in WVGA screen resolution, all my images are scaled incorrectly, it is longer vertically than horizontally. I was expecting the screen compatibility to maintain aspect ratios as that of HVGA.
Also in my layout I have a scrollview and it is designed in such a way that in HVGA when it is not scrolled down, the items are hidden away, however now in WVGA those things are shown. If the aspect ratio of HVGA is maintained I won't have this issue. How can I make sure the aspect ratio is maintained? Also in my layout I am positioning some items using pixel positions. Should I convert these to dpi? How do I calculate what dpi they should be?