Android :: StartForeground Backwards Compatibility

Nov 15, 2009

I'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?

Android :: startForeground Backwards compatibility


Android : Aapt Backwards Compatibility

Dec 14, 2009

Are 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 Related

Android : How To Maintain Backwards-compatibility?

Apr 17, 2010

According 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 Replies View Related

Android :: StartForeground() Broken On Incredible

May 24, 2010

It seems that on the Incredible the startForeground() call is non- functional, causing my process to be put into the background scheduler class even though it has an active ongoing notification. I'm calling it the same as on other 2.x devices (through reflection as suggested by Diane for backward-compatibility), and this works fine on the Droid, with the same OS level (2.1-update1). I can see in the debugger that it gets all the way to ActivityManagerNative.setServiceForeground() with the notification param being non-null, so it's got to be in the ActivityManager or below.

The really telling thing is that the stock music player acts the same way. When I'm playing a song and go to the home screen the com.htc.music process goes into the bg class, even though its notification is still active. This is a real problem for us, as it denies us the CPU we need to play back music in some cases without stuttering. Any ideas on whether this is getting fixed, and how I might work around it?

View 7 Replies View Related

Android :: StartForeground() - No Notification Required

Oct 9, 2010

Hi, I have a "Remote Service", which I am starting at Bootup of the emulator. I want my service to keep running as a foreground service. For this, I am calling startForeground() from my service's onStartCommand(). I don't want any notifcation from the service. But startForeground() needs a notification object as its second parameter. How can I set my service as a foreground service without using any notification.

View 2 Replies View Related

Android :: Using New StartForeground Vs Old SetForground For Services

Nov 26, 2009

I have a couple of services in my application which need to be marked as foreground to prevent them from being killed unnecessarily. Currently I am building my application with the 2.0 SDK but I have android:minSdkVersion="3" android:targetSdkVersion="5" in my manifest file so that I can support 1.5, 1.6 or 2.0 devices. I am currently using only the 1.5 APIs so that my application will run correctly on the 1.5 devices.

2.0 introduced a nicer startForground method that combines setting the foreground flag and starting a notification which can be used to control the service. The 2.0 documentation says that startForground replaces setForeground, and that due to the fact that many applications were mistakenly using setForeground without a notification that could be used to control and close down the service, that the older setForeground method had been changed so it no longer does anything on 2.0. I tried using the newer 2.0 interface but it caused an exception for phones running 1.5 or 1.6. So I am still using the older setForeground interface and calling notify separately. But it appears that since I am building with the 2.0 SDK the older interface isn't really preventing my services from being killed.

View 4 Replies View Related

Android :: Service.startForeground() Messes With Scheduling?

Apr 8, 2010

I updated my app to use the "new" startForeground() method of Service. Now beta testers are complaining about the foreground app going slow. Is that a coincidence or does startForeground() mess with the thread's prio or does anything else but what is written below? Just as an additional information the background activity does some syncing, reports the progress to the notification using remote views and as it is not latency dependent I use (and did that before already) this: Process.setThreadPriority(Process.THREAD_PRIORITY_LOWEST);

Should I use another Priority? And if it makes any difference, how does that play with Android 1.5 devices?

View 13 Replies View Related

Android :: Implement StartForeground Method In Andorid

Sep 10, 2010

I want to implement startForeground method in Service class for prevent service self kill. Can anybody sent me code for implementing this method?

View 1 Replies View Related

Android :: Saving Service Killing Without StartForeground

Nov 20, 2009

I am running a background Android Service as VoIP Framework which provides different VoIP services to different Android applications, (VoIP call, Video Call, etc). The service establishes a network connection with the Server(Service Provider) and does some initial handshake before it can start providing service to the Android applications, that's why though of starting the service on BOOT_COMPLETED event.

The problem is when the service gets started on BOOT_COMPLETED event, before even it finishes the initial network connection with server and handshaking, it gets killed by the system. I have tried using setForeground which improves the behavior a bit but still gets killed mid-way. I am working with old version 1.5 r3 of SDK and hence, cannot use "startForeground". Is there a way out or another alternative available with SDK 1.5 r3?

View 12 Replies View Related

Android :: Create Separate Applications - Backwards Compatible?

Dec 1, 2009

Is 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 Related

Android :: Better Way To Implement Backwards Notification From Installd To Installer?

May 21, 2010

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

View 2 Replies View Related

Android :: Stay Backwards And Forwards Compatible - TargetSDKVersion Hdpi MinSDKVersion?

Apr 16, 2010

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?

View 3 Replies View Related

General :: App Data Backwards Compatible?

Feb 5, 2012

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?

View 3 Replies View Related

Android :: Screen Compatibility Not Quite Right

Nov 21, 2009

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

View 9 Replies View Related

Android :: Application Compatibility Between SDK 1.5 And 1.6

Oct 12, 2009

What is the recommended approach to have currently shipping 1.5-SDK compliant apps to start offering 1.6 features (such as TTL) in the Market? Can we just publish 2 versions of the same package name each compiled with a different SDK level (will the Market automatically push out only the right version of the app) or do we have to use different package name and assume that the user will find a way to understand the version of the OS he has. A public statement to the developper community would be more than welcomed here!

View 5 Replies View Related

Android :: DevPhone1 SDK Compatibility

Apr 21, 2010

I've found again my DevPhone1 (aka G1) on a shelf and though that this time I should really give it a try and create an app for it. But I've really lost touch with the Android world and now I don't know where to start really. There have been many SDK releases lately for many new and better devices. Which one of these can I use with G1? What is the most recent one which can be used on that hardware (although with reduced performance) but which will enable development for rather modern Android releases as well. The firmware update received today, while recharging the phone, is 1.6. Can I go higher with some R&D build?

View 3 Replies View Related

Android :: Os Compatibility On Mobiles

Jan 24, 2010

i want to develop an application on android,webos,wince. how to develop application that should run on all paltform with developing each paltform

View 2 Replies View Related

Android :: Application Compatibility Between Different Versions

Jan 26, 2010

I can run my application on 1.5, 1.6 and 2.0 emulator and on a 1.5 device without any problems. But some of my users are reporting force close and strange menu entries (see the attachment) using 1.6 and higher version devices.
This screen should look like this:
http://www.taypo.com/blog/WindowsLiveWriter/TurkceKlavye0.7_6F1/settings_0.7_2.png

And the code that generates this screen is:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="@string/general_settings">
<CheckBoxPreference android:title="@string/haptic_feedback" android:defaultValue="true"android:summary="@string/haptic_feedback_summary" android:key="vibrate"/>
<CheckBoxPreference android:title="@string/sound_feedback" android:defaultValue="false" android:summary="@string/sound_feedback_summary" android:key="sound" />
<CheckBoxPreference android:title="@string/auto_caps" android:defaultValue="true"
android:summary="@string/auto_caps_summary" android:key="auto_caps" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/layout_settings">
<ListPreference android:title="@string/keyboard_layout" android:defaultValue="TRQ" android:key="kbd_layout" android:entries="@array/layout_names" android:entryValues="@array/layout_values" />
</PreferenceCategory>
</PreferenceScreen>

View 1 Replies View Related

Android :: App2sd Backward Compatibility

Sep 4, 2010

I recently enabled the app2sd functionality in my app.When i test the apk on my NexusOne (2.2) the app goes to the SD card, perfect! But when i publish the app on the market and install the same apk from the market on the same Nexus, the app2sd function is missing, I can't install it to my SD card.

View 5 Replies View Related

Android :: 1.5_r3 Backward Compatibility

Aug 2, 2009

If I build against the 1.5_r3 SDK are there any compatibility issues with running it on devices that are at previous levels of 1.5? I would certainly hope not, but I've learned not to make such assumptions.

View 11 Replies View Related

Android :: How To Develop For Forward Compatibility?

Dec 10, 2009

I have an app that uses People provider. This is deprecated in version 2.0. I have built my application against API1.6 and set <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="4" /> Everything was fine until I wanted to run the app on Android 2.0. Not only is People deprecated it actually doesn't even work! So, I have changed the API I'm compiling against API2.0 and do the OS version check in my code and use People provider or ContactsContract accordingly. I still keep <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="4" /> so I can target 1.6 devices. Now when I want to debug in Eclipse it insists on running it on 2.0 emulator. How can I tell Eclipse that I really want to debug on 1.6 emulator? I have installed my APK on 1.6 emulator via the browser. It installed fine, but when I want to use People provider it crashes. I need to be able to debug it.

View 3 Replies View Related

Android :: No Technology Compatibility Kit On Platform?

Mar 9, 2009

Is there any TCK (Technology Compatibility Kit) on Android such like Sun TCK? How can I assure my android platform after changing it as own style. Can some one help me clarify this point?

View 2 Replies View Related

Android :: Any Way To Emulate Particular Device Compatibility?

Jun 22, 2010

I program and test using the Droid Incredible. The other day my friend downloaded my alpha version, which works flawlessly on the Incredible, but crashed on his Moto Droid. I just updated my app to use 2.1 api's instead of 1.6; maybe this will make a difference? I upped my min version requirements to 7. My question is how can you make sure your app works on all phones and not just the phone your are building and testing on? Is there a way to emulate a particular device?

View 3 Replies View Related

Android :: Compatibility With Nonexistant Classes

Apr 19, 2010

I have read the Backward Compatibility Article, and I don't full understand how (or if I can) make a program backwards compatible if I want to use a class introduced in later versions. For example, I want to use WallpaperManager for apis 5+, but make the app as a whole compatible with api 3+. Is this possible?

View 14 Replies View Related

Android :: Froyo Still Breaks Compatibility

Jun 30, 2010

You can no longer send the ACTION_ATTACH_DATA intent with an image URI to a custom content provider without crashing the Gallery app. This bug was reported more than a month ago. It is a stupid bug that is super easy to fix, and as soon as Froyo was open sourced a patch was submitted. Still Froyo was officially released and the bug remains leaving developers who use this with an app that is no longer compatible and no easy way to work around it for 2.2. There are other bugs that also have not been acknowledged. This 'open' thing is great but it is not of much use this way.

View 2 Replies View Related

Android :: Development Platform Compatibility

Mar 15, 2009

I am getting a new OS, which OS is Android SDK/IDE development environment compatible with XP64, Vista64 or Windows7? Or Do I need to keep a XP32 partition around?

View 5 Replies View Related

Android :: Screen Size Compatibility

Dec 17, 2009

I want to make my app compatible to different screen sizes. I am right now developing on the Droid and need to know how can I import the screen image on eclipse emulator? I don't have a droid phone but want to make sure my app layout doesn't change on the Droid.

View 2 Replies View Related

Android : Website Mobile Compatibility

Sep 14, 2010

How to make website that should compatibility with desktop browser as well as mobile browser?

View 2 Replies View Related

Android : Checking 3rd Party App Compatibility Using CTS

Feb 8, 2010

I wanted to get the info on the following query, could you guys please help me in getting the answer?I have set of platform api those will be tested by CTS to check compatibility, and I am making use of some 3rd party api in one of the platforms api. Suppose if I am changing or modifying the 3rd party api (to suit some of my requirement), is CTS is capable of telling whether compatibility is broken in the 3rd party app?

View 2 Replies View Related

Android : Requires Class Compatibility Set To 5.0

Apr 21, 2010

I had to reload XP and Eclipse + android of course. I am using the 2.0.1 SDK version/ API 6.Everything was fine before, Now the project doesn't load- I get:

[2010-04-21 09:59:24 - LatLonQ] Android requires .class compatibility set to 5.0. Please fix project properties.

View 2 Replies View Related







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