Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-18888

Android Lollipop problem cache with MediaPlayer

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      SDK: 3.4.1.GA
      Devices Affected: Nexus 4, Nexus 5 with Android 5.0 (Lollipop)
      Devices Tested: Nexus 5, Nexus 4 with Android 5.0 (Lollipop)
      Emulator Genymotion Nexus 5 Android 5.0(Lollipop)

      Description

      Problem :
      Ti.Media.VideoPlayer doesn't work when app using cache on Android 5.0 Lollipop.

      Steps to reproduce :
      1. Launch app
      2. Watch video (auto play)
      3. Kill app
      4. Launch app a second time
      5. A video doesn't work

      Resolution :
      I need to clear cache of my app to watch again my video. This problem is only on Lollipop, It was working perfectly with the previous version of Android.

      Sample Alloy :

      <Alloy>
      <Window>
      <VideoPlayer id="videoPlayer" ns="Ti.Media" top="2" url="http://s3-eu-west-1.amazonaws.com/cf-templates-k6ohn88yswx5-eu-west-1/videos/4fbc88e7e4b0b0896e877764/4fbfd5ece4b0932236fc234d.mp4"
      height="300" width="300" autoplay="true" />
      </Window>
      </Alloy>

      Trace Log :
      11-26 10:32:34.290: E/NuCachedSource2(188): source returned error -1, 8 retries left
      11-26 10:32:37.306: E/NuCachedSource2(188): source returned error -1, 7 retries left
      11-26 10:32:40.315: E/NuCachedSource2(188): source returned error -1, 6 retries left
      11-26 10:32:40.491: E/REQUEST(6264): ERROR
      11-26 10:32:40.491: E/REQUEST(6264): java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference
      11-26 10:32:40.491: E/REQUEST(6264): at com.android.okhttp.internal.http.StatusLine.<init>(StatusLine.java:24)
      11-26 10:32:40.491: E/REQUEST(6264): at com.android.okhttp.Response$Builder.statusLine(Response.java:419)
      11-26 10:32:40.491: E/REQUEST(6264): at com.android.okhttp.internal.http.JavaApiConverter.createOkResponse(JavaApiConverter.java:116)
      11-26 10:32:40.491: E/REQUEST(6264): at com.android.okhttp.internal.http.ResponseCacheAdapter.get(ResponseCacheAdapter.java:53)
      11-26 10:32:40.491: E/REQUEST(6264): at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:190)
      11-26 10:32:40.491: E/REQUEST(6264): at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)
      11-26 10:32:40.491: E/REQUEST(6264): at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106)
      11-26 10:32:40.491: E/REQUEST(6264): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:208)
      11-26 10:32:40.491: E/REQUEST(6264): at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
      11-26 10:32:40.491: E/REQUEST(6264): at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:25)
      11-26 10:32:40.491: E/REQUEST(6264): at com.google.maps.api.android.lib6.b.l.run(Unknown Source)
      11-26 10:32:40.491: E/REQUEST(6264): at java.lang.Thread.run(Thread.java:818)
      11-26 10:32:43.330: E/NuCachedSource2(188): source returned error -1, 5 retries left
      11-26 10:32:45.049: E/WifiStateMachine(596): WifiStateMachine CMD_START_SCAN source -2 txSuccessRate=116,23 rxSuccessRate=206,11 targetRoamBSSID=any RSSI=-53
      11-26 10:32:46.344: E/NuCachedSource2(188): source returned error -1, 4 retries left
      11-26 10:32:49.357: E/NuCachedSource2(188): source returned error -1, 3 retries left
      11-26 10:32:52.389: E/NuCachedSource2(188): source returned error -1, 2 retries left
      11-26 10:32:55.412: E/NuCachedSource2(188): source returned error -1, 1 retries left
      11-26 10:32:56.634: E/audio_a2dp_hw(188): adev_set_parameters: ERROR: set param called even when stream out is null
      11-26 10:32:56.639: E/native(596): do suspend true
      11-26 10:32:57.414: E/ANDR-PERF-LOCK(195): Failed to apply optimization for resource: 4 level: 0
      11-26 10:32:58.427: E/NuCachedSource2(188): source returned error -1, 0 retries left
      11-26 10:32:58.523: E/GenericSource(188): Failed to init from data source!
      11-26 10:32:58.541: E/MediaPlayer(24537): error (1, -2147483648)
      11-26 10:32:58.549: E/MediaPlayer(24537): Error (1,-2147483648)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                hangeul Jonathan
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-19903
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code