It looks like you are trying to play a ringtone that doesn't exist. By default the emulator doesn't come with any ringtones, so you'll have to pump over some files through DDMS...If you have already done that, make sure those files aren't corrupt.
On Sep 1, 1:15 am, mrvsabari <[email protected]> wrote: > Hi, > > I am new to Android Development. I used a Android 1.5 and Eclipse > 3.4.2 and i created a call notification application.if i made a call > from the Eclipse DDMS at that timeit throws an error message in the > Logcat. > > 09-01 12:36:54.517: ERROR/MediaPlayerService(542): Couldn't open fd > for content://settings/system/ringtone > 09-01 12:36:54.517: ERROR/MediaPlayer(617): Unable to to create media > player > 09-01 12:36:54.528: ERROR/RingtoneManager(617): Failed to > openringtonecontent://settings/system/ringtone > > Also, i am not getting the fullringtone. It Starts with the Beep > sound and it stops the ringing sound. > In my code i can able to identify the call the Phone Idle state. But i > cant able to identify the CALL_STATE_OFFHOOK and CALL_STATE_RINGING. > > is there any problem in my code or problem in creating an Emulator. > > I hearwith pasted my Code : > > CallStateListener.java > -------------------------------- > package com.TestCallNotification; > > import android.telephony.PhoneStateListener; import > android.telephony.TelephonyManager; import android.util.Log; > > //import com.lumitrend.netlogger.Logger; > > public class CallStateListener extends PhoneStateListener { > public void onCallStateChanged(int state, String incomingNumber) > { > Log.v("DEBUG", "addddddddddddddddddding this here"); > super.onCallStateChanged(state, incomingNumber); > Log.v("DEBUG", TelephonyManager.CALL_STATE_OFFHOOK + " > weeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee are def in > here: " + state); > > switch(state) > { > case TelephonyManager.CALL_STATE_IDLE: > Log.v("DEBUG", > "phhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhone is idle"); > break; > case TelephonyManager.CALL_STATE_OFFHOOK: > Log.v("DEBUG", > "phoooooooooooooooooooooooooooooooooooooon is off > hook"); > break; > case TelephonyManager.CALL_STATE_RINGING: > Log.v("DEBUG", > "phoooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnnneeeeeeeeeeeeeeeeee > is ringing"); > break; > default: Log.v("DEBUG", "The > staaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaate > is " + state); > > } > } > > } > > --------------------------- > StartServicesAtStartUp.java > ------------------------------- > package com.TestCallNotification; > import android.content.BroadcastReceiver; > import android.content.Context; > import android.content.Intent; > import android.telephony.PhoneStateListener; > import android.telephony.TelephonyManager; > import android.util.Log; > > public class StartServicesAtStartUp extends BroadcastReceiver { > public void onReceive(Context context, Intent intent) > { > Log.d("DEBUG", > "########################################################################"); > Intent phoneStateListener = new Intent(context, > CallStateListener.class); > phoneStateListener.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); > context.startService(phoneStateListener); > Log.d("DEBUG", context.getPackageName()); > Log.d("DEBUG", context.toString()); > TelephonyManager tManager = (TelephonyManager) > context.getSystemService(Context.TELEPHONY_SERVICE); > CallStateListener callStateListener = new CallStateListener(); > tManager.listen(callStateListener, > PhoneStateListener.LISTEN_CALL_STATE); > } > > } > > ----------------------- > AndroidManifest.xml > ---------------------- > > <?xml version="1.0" encoding="utf-8"?> > <manifest xmlns:android="http://schemas.android.com/apk/res/android" > package="com.TestCallNotification" > android:versionCode="1" > android:versionName="1.0"> > > <application android:icon="@drawable/icon" android:label="@string/ > app_name"> > <receiver android:name=".StartServicesAtStartUp"> > <intent-filter> > <action android:name="android.intent.action.BOOT_COMPLETED" / > > </intent-filter> > </receiver> > </application> > <uses-permission > android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> > > </manifest> > > ------------------------------------ > Log cat File from the starup to End > ------------------------------------ > > 09-01 12:35:19.933: ERROR/vold(538): Error opening switch name path '/ > sys/class/switch/test2' (No such file or directory) > 09-01 12:35:19.933: ERROR/vold(538): Error bootstrapping switch '/sys/ > class/switch/test2' (m) > 09-01 12:35:19.933: ERROR/vold(538): Error opening switch name path '/ > sys/class/switch/test' (No such file or directory) > 09-01 12:35:19.933: ERROR/vold(538): Error bootstrapping switch '/sys/ > class/switch/test' (m) > 09-01 12:35:20.154: ERROR/flash_image(544): can't find recovery > partition > 09-01 12:35:41.526: ERROR/MemoryHeapBase(568): error opening /dev/ > pmem: No such file or directory > 09-01 12:35:41.574: ERROR/SurfaceFlinger(568): Couldn't open /sys/ > power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake > 09-01 12:35:41.684: ERROR/GLLogger(568): couldn't load <libhgl.so> > library (Cannot find library) > 09-01 12:35:41.874: ERROR/GLLogger(568): couldn't load <libhgl.so> > library (Cannot find library) > 09-01 12:35:50.194: ERROR/BatteryService(568): Could not open '/sys/ > class/power_supply/usb/online' > 09-01 12:35:50.284: ERROR/BatteryService(568): Could not open '/sys/ > class/power_supply/battery/batt_vol' > 09-01 12:35:50.303: ERROR/BatteryService(568): Could not open '/sys/ > class/power_supply/battery/batt_temp' > 09-01 12:35:51.583: ERROR/EventHub(568): could not get driver version > for /dev/input/mouse0, Not a typewriter > 09-01 12:35:51.684: ERROR/EventHub(568): could not get driver version > for /dev/input/mice, Not a typewriter > 09-01 12:35:52.344: ERROR/System(568): Failure starting core service > 09-01 12:35:52.344: ERROR/System(568): java.lang.SecurityException > 09-01 12:35:52.344: ERROR/System(568): at > android.os.BinderProxy.transact(Native Method) > 09-01 12:35:52.344: ERROR/System(568): at > android.os.ServiceManagerProxy.addService(ServiceManagerNative.java: > 146) > 09-01 12:35:52.344: ERROR/System(568): at > android.os.ServiceManager.addService(ServiceManager.java:72) > 09-01 12:35:52.344: ERROR/System(568): at > com.android.server.ServerThread.run(SystemServer.java:163) > 09-01 12:35:52.418: ERROR/AndroidRuntime(568): Crash logging skipped, > no checkin service > 09-01 12:35:57.125: ERROR/LockPatternKeyguardView(568): Failed to bind > to GLS while checking for account > 09-01 12:36:06.923: ERROR/ApplicationContext(568): Couldn't create > directory for SharedPreferences file shared_prefs/wallpaper-hints.xml > 09-01 12:36:22.684: ERROR/MediaPlayerService(542): Couldn't open fd > for content://settings/system/notification_sound > 09-01 12:36:22.724: ERROR/MediaPlayer(568): Unable to to create media > player > 09-01 12:36:09.908: ERROR/ActivityThread(617): Failed to find provider > info for android.server.checkin > 09-01 12:36:15.848: ERROR/ActivityThread(617): Failed to find provider > info for android.server.checkin > 09-01 12:36:17.657: ERROR/ActivityThread(617): Failed to find provider > info for android.server.checkin > 09-01 12:36:54.517: ERROR/MediaPlayerService(542): Couldn't open fd > for content://settings/system/ringtone > 09-01 12:36:54.517: ERROR/MediaPlayer(617): Unable to to create media > player > 09-01 12:36:54.528: ERROR/RingtoneManager(617): Failed to > openringtonecontent://settings/system/ringtone > > ------------------------------------- > Thanks in advance. > > Regards, > Sabarish V --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

