How to open and show phone's message inbox programmatically..?

前端 未结 4 805
一生所求
一生所求 2021-01-26 23:19

When we click on messages we are showed with the inbox.

I want to show the same window when i clicked on my application\'s button.

So, I want to start message in

4条回答
  •  臣服心动
    2021-01-27 00:05

    I extended srinivasa's solution above to get the package name of the default SMS app currently being used on the device:

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            application_name = Telephony.Sms.getDefaultSmsPackage(this);
        }
    

    I found this worked well across Samsung and Nokia devices which both use a different app for SMS out of the box.

提交回复
热议问题