titusIII Posted June 25, 2013 Share Posted June 25, 2013 Bonsoir, Je suis en train de faire une application pour android, comme tous programme je commence par faire les drivers. Mon problème est le suivant : j'envoie des sms depuis mon pc via le wifi, udp, blablabla! Tout fonctionne super SAUF QUE quand mes messages sont envoyés depuis mon appli, ils n'apparaissent pas dans mes texto (appli de base du tel). C'est problématique puisque mon appli doit être utilisée comme accessoire et non permanente! J'ai entendu parler d'un "dossier" sms/send avec un système d'intent... J'ai pas réussi à suivre la chose! Si quelqu'un pouvais m'aider, j'en serai reconnaissant! Merci! Titus. Link to comment Share on other sites More sharing options...
titusIII Posted June 25, 2013 Author Share Posted June 25, 2013 PS : https://github.com/commonsguy/cw-advandroid/blob/master/SMS/Sender/src/com/commonsware/android/sms/sender/Sender.java J'ai trouvé ça! Je vais essayer d'éplucher le code demain Link to comment Share on other sites More sharing options...
titusIII Posted June 26, 2013 Author Share Posted June 26, 2013 J'ai également trouvé ceci http://stackoverflow.com/questions/3873142/android-send-sms-which-is-visible-in-sms-thread-no-gui Mais rien à faire, mon appli crash quand je touche à "content://sms/sent" Aidez moooiii ? Link to comment Share on other sites More sharing options...
chpil Posted June 26, 2013 Share Posted June 26, 2013 Si ton appli crashe, tu dois avoir des traces dans les logs qui t'expliquent pourquoi ça crashe... Link to comment Share on other sites More sharing options...
titusIII Posted June 26, 2013 Author Share Posted June 26, 2013 06-26 13:06:12.187: E/AndroidRuntime(27636): FATAL EXCEPTION: main 06-26 13:06:12.187: E/AndroidRuntime(27636): java.lang.IllegalStateException: Could not execute method of the activity 06-26 13:06:12.187: E/AndroidRuntime(27636): at android.view.View$1.onclick(View.java:3598) 06-26 13:06:12.187: E/AndroidRuntime(27636): at android.view.View.performClick(View.java:4091) 06-26 13:06:12.187: E/AndroidRuntime(27636): at android.view.View$PerformClick.run(View.java:17036) 06-26 13:06:12.187: E/AndroidRuntime(27636): at android.os.Handler.handleCallback(Handler.java:615) 06-26 13:06:12.187: E/AndroidRuntime(27636): at android.os.Handler.dispatchMessage(Handler.java:92) 06-26 13:06:12.187: E/AndroidRuntime(27636): at android.os.Looper.loop(Looper.java:137) 06-26 13:06:12.187: E/AndroidRuntime(27636): at android.app.ActivityThread.main(ActivityThread.java:5031) 06-26 13:06:12.187: E/AndroidRuntime(27636): at java.lang.reflect.Method.invokeNative(Native Method) 06-26 13:06:12.187: E/AndroidRuntime(27636): at java.lang.reflect.Method.invoke(Method.java:511) 06-26 13:06:12.187: E/AndroidRuntime(27636): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792) 06-26 13:06:12.187: E/AndroidRuntime(27636): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555) 06-26 13:06:12.187: E/AndroidRuntime(27636): at dalvik.system.NativeStart.main(Native Method) 06-26 13:06:12.187: E/AndroidRuntime(27636): Caused by: java.lang.reflect.InvocationTargetException 06-26 13:06:12.187: E/AndroidRuntime(27636): at java.lang.reflect.Method.invokeNative(Native Method) 06-26 13:06:12.187: E/AndroidRuntime(27636): at java.lang.reflect.Method.invoke(Method.java:511) 06-26 13:06:12.187: E/AndroidRuntime(27636): at android.view.View$1.onclick(View.java:3593) 06-26 13:06:12.187: E/AndroidRuntime(27636): ... 11 more 06-26 13:06:12.187: E/AndroidRuntime(27636): Caused by: java.lang.SecurityException: Permission Denial: reading com.android.providers.telephony.MmsSmsProvider uri content://mms-sms/threadID?recipient=0618639031 from pid=27636, uid=10156 requires android.permission.READ_SMS, or grantUriPermission() 06-26 13:06:12.187: E/AndroidRuntime(27636): at android.os.Parcel.readException(Parcel.java:1425) 06-26 13:06:12.187: E/AndroidRuntime(27636): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:188) 06-26 13:06:12.187: E/AndroidRuntime(27636): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140) 06-26 13:06:12.187: E/AndroidRuntime(27636): at android.content.ContentProviderProxy.insert(ContentProviderNative.java:428) 06-26 13:06:12.187: E/AndroidRuntime(27636): at android.content.ContentResolver.insert(ContentResolver.java:864) 06-26 13:06:12.187: E/AndroidRuntime(27636): at com.commonsware.android.sms.sender.Sender.sendSMS(Sender.java:92) 06-26 13:06:12.187: E/AndroidRuntime(27636): at com.commonsware.android.sms.sender.Sender.sendTheMessage(Sender.java:79) 06-26 13:06:12.187: E/AndroidRuntime(27636): ... 14 more Voila mes logs.... Et voila ce que j'ai oublié : "requires android.permission.READ_SMS" Merci beaucoup... Comme quoi je suis grand, et je peux me débrouiller tout seul.. Je penserai aux log la prochaine fois, merci! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.