Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7508] Android: Enable HWAcceleration on apps by default

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2016-08-23T03:40:23.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sn/a
ComponentsAndroid
Labelsinsight
ReporterAllen Yeung
AssigneeIngo Muschenetz
Created2012-02-01T14:59:37.000+0000
Updated2017-03-23T22:34:04.000+0000

Description

In 3.0 HW acceleration is disabled by default, and on 4.0, it is only enabled by default when you set the targeted api level is 14 or higher (currently our target api level is 8). We need to enable the android:hardwareAccelerated property by default on api 11 and above. To do this, we probably need to enable android:hardwareAccelerated in the android manifest template. We may need to tweak the tool-api-level as well. Repro steps: Flash does not load within a Ti app on Galaxy Nexus, with Flash Player 11 installed. Works within device browser. This has been tested on an HTC EVO; working it both Ti app and device browser. Steps to Reproduce (Ti App, non-working) 1. Run:
var win = Ti.UI.createWindow();
var webview = Ti.UI.createWebView({ pluginState:Titanium.UI.Android.WEBVIEW_PLUGINS_ON, left:0, top:0, right:0, bottom:0 });

win.addEventListener('open', function(e) {
    webview.url = 'http://dev.anovice.com/flash/sampleapp/sampleapp.html'; 
});

win.add(webview);
win.open();
Steps to Reproduce (Device browser, working) 1. Open device browser 2. Use url: http://dev.anovice.com/flash/sampleapp/sampleapp.html Once this change has been made, we need to test 2.2, 2.3. 3.0, and 4.0 thorougly to make sure we didn't break anything.

Comments

  1. Shannon Hicks 2012-02-01

    I will say that my currently published app, which was using Ti SDK 1.7, does not work on 4.0 with HW acceleration turned on. I got a complaint that it launches, and soon after it goes to a black screen with a little white box in the corner and nothing else. The user reported that many other Android apps had the same behavior. Please watch out for this when addressing this ticket. The user had gone in via some development menu and forced it on for all apps on their phone (galaxy nexus) because a friend told them everything would run faster if they did.
  2. Opie Cyrus 2012-02-01

    Extensive testing will occur before this makes it into master. Given the advancement of the capabilities for Android devices it is desirable to use HW acceleration in general unless there is a reason not to. Beyond that, the option will provided for disabling this so a developer that needs to avoid this will have the option of staying away from HW acceleration (unless manually forced via device config as previously mentioned).
  3. Ivan Skugor 2012-02-02

    Here are my troubles with HA enabled: http://developer.appcelerator.com/question/130425/android-hardware-acceleration-and-tabs-width My app works (renders) faster, but some things needs to be fixed. Hardware acceleration is, IMHO, great enhancement, but only if it would work fine. I do have a request, if this could be documented somewhere because not all devs have previous Android experience. Thanks.
  4. Shannon Hicks 2013-04-09

    We should probably re-evaluate this ticket now that a year has passed.
  5. Chris Barber 2016-08-23

    According to the Android docs, hardware acceleration is enabled by default for API level 14 and newer: https://developer.android.com/guide/topics/graphics/hardware-accel.html. As of Titanium SDK 5.3.0.GA and possibly older, Titanium's Android platform supports a minimum API level of 14. This means every Titanium app has hardware acceleration enabled by default. There is no point explicitly setting this in the AndroidManifest.xml.
  6. Lee Morris 2017-03-23

    Closing ticket as Won't Fix with reference to the above comments.

JSON Source