大家好,请问OPhone下如何设置短信提示音啊?
我使用下面的一段代码,没有设置成功:
public static void setRingForOPhone(ContentResolver cr, Uri uri) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
Class cls = Class.forName("android.provider.Settings$Profile");
Method method = cls.getMethod("setRingTone", new Class[] {ContentResolver.class, Uri.class});
method.invoke(cls, new Object[] {cr, uri});
}
我使用下面的一段代码,没有设置成功:
public static void setRingForOPhone(ContentResolver cr, Uri uri) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
Class cls = Class.forName("android.provider.Settings$Profile");
Method method = cls.getMethod("setRingTone", new Class[] {ContentResolver.class, Uri.class});
method.invoke(cls, new Object[] {cr, uri});
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货