Prepare failed.: status=0x1

Appcelerator JIRA | Eduardo Gomez | 6 years ago
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    h5.Problem If you add a sound to a notification the sound is not found. h5.Repro sequence {code:title=app.js} var win= Titanium.UI.createWindow(); var btn = Ti.UI.createButton({ title: 'Add Notification' }); btn.addEventListener('click', function(e) { var activity = Ti.Android.currentActivity(); var intent = Ti.Android.createIntent({ }); var pending = Ti.Android.createPendingIntent({ 'activity' : activity, 'intent' : intent, 'type' : Ti.Android.PENDING_INTENT_FOR_ACTIVITY, 'flags' : 1073741824 }); var ts = new Date().getTime(); var notification = Ti.Android.createNotification({ contentIntent : pending, contentTitle : 'Test', contentText : 'test', when : ts, //icon: 'KS_nav_ui.png',TIMOB-4651 sound: '1.mp3', defaults: Titanium.Android.NotificationManager.DEFAULT_VIBRATE }); Ti.Android.NotificationManager.notify(1, notification); }); win.add(btn); // testing if the image exist var lbl = Titanium.UI.createLabel({ text : ' ', backgroundImage: 'KS_nav_ui.png', top : 10, left: 10 }); win.add(lbl);; {code} h5.Console Output - With customized Sound Sound file is located at resources folder, so property is being set as: sound: '1.mp3' {noformat} I/StagefrightPlayer( 34): setDataSource('/android_asset/Resources/1.mp3') E/MediaPlayer( 60): error (1, -2147483648) W/NotificationService( 60): error loading sound for file:///android_asset/Resources/1.mp3 W/NotificationService( 60): Prepare failed.: status=0x1 W/NotificationService( 60): at Method) W/NotificationService( 60): at$ {noformat} h5.Tested on Device: HTC Dream Android 2.2 OS version & Emulator: Android HGVA h5.Associated HD ticket PRO - h5.Additional info Get default vibrate by setting permissions in Tiapp.xml {noformat} <android xmlns:android=""> <manifest> <uses-permission android:name="android.permission.VIBRATE"></uses-permission> </manifest> </android> {noformat} h5.Work Around To allow the app at this time to play the default sound and vibration as well: defaults: Titanium.Android.NotificationManager.DEFAULT_ALL To play default sound: defaults: Titanium.Android.NotificationManager.DEFAULT_SOUND To get phone vibration: defaults: Titanium.Android.NotificationManager.DEFAULT_VIBRATE

    Appcelerator JIRA | 6 years ago | Eduardo Gomez Prepare failed.: status=0x1
  2. 0

    MediaPlayer: Prepare failed status 0x1 error while streaming song

    Stack Overflow | 4 years ago | Bersh Prepare failed.: status=0x1
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Android MediaPlayer - error (1, -4) when playing a song

    Stack Overflow | 4 years ago | Hanady Prepare failed.: status=0x1
  5. 0

    Code is not playing any audio

    Stack Overflow | 4 years ago | user2714061 Prepare failed.: status=0x1

  1. Indri Yunita 2 times, last 1 month ago
  2. Adrien 2 times, last 3 months ago
  3. rp 1 times, last 5 months ago
  4. bluebunnty 6 times, last 6 months ago
  5. ank_07 2 times, last 9 months ago
5 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis


    Prepare failed.: status=0x1

  2. Android Platform
    1. Method)
    1 frame
  3. Android
    1 frame