用户授予权限后,如何以编程方式发送短信? [英] How to programmatically send a text message after the user has given permission?

查看:74
本文介绍了用户授予权限后,如何以编程方式发送短信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个需要能够在后台发送文本的应用程序.我看到了这个非常全面的答案,它回答了类似的问题,该问题解释了如何通过与用户及其他用户之间的界面发送文本消息以编程方式发送消息的局限性,但并没有真正解决另一种可能性:用户是否可以向我的应用授予权限以在后台发送消息,类似于用户必须授予应用访问权限以访问用户照片的方式?例如,首次启动该应用程序时,会出现提示,询问用户是否允许发送文本消息.如果用户授予许可,则该应用程序可以在后台发送消息.有可能吗?

I'm writing an app where I need to be able to send texts in the background. I saw this very comprehensive answer to a similar question that explains how to send text messages through an interface with the user and the various limitations of sending messages programmatically, but it didn't really address another possibility: is it possible for the user to grant permission to my app to send messages in the background similar to how the user must grant permission to an app to access the user's photos? For example, upon starting up the app for the first time, a prompt appears asking the user for permission to send text messages. If the user grants permission, then the app can send messages in the background. Is that possible?

推荐答案

这个问题的答案是你做不到.有一些可以做到这一点的越狱应用程序,但它们只需要一个越狱程序(和专用API)即可.没有App Store允许的方法.

The answer to this question is that you can't. There are some jailbreak apps that accomplish this but they require just that, a jailbreak (and private APIs). There is no App Store allowed way to do this.

这篇关于用户授予权限后,如何以编程方式发送短信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆