- Home /
Receive, get, read SMS from Andoid device
Hi, i would like to ask if is there (unity, scripts) a way how to get(read) SMS texts on android device without leaving my application ? I found way to send SMS with OpenUrl function but I want to read SMS body and save it in my controls like textAreas, textFields and so on. I also found plugins on asset store (Android Native, Android System for Unity) they are mentioning SMS but no specifics (sending ?, reading ? and how ?). Is there anyone with these plugins who can say it will figure out my needs ?
Answer by MrMatthias · Sep 18, 2018 at 06:57 AM
Here is an exmple of how to receive new sms: http://codetheory.in/android-sms/
Instead of logging the sms you send it to Unity with UnityPlayer.UnitySendMessage("SomeGameObjectName", "MethodName", "sms")
With Unity 2018.2 you can simply add a java file to your project and set the android platform in the inspector