在Swift中,发送短信失败但MFMessageComposeViewController委托显示已发送(In Swift, Failed to send SMS but MFMessageComposeViewController Delegate Show sent)
我正在使用
MFMessageComposeViewController
从我的应用程序发送短信。
MFMessageComposeViewController
的didFinishWithResult
委托方法显示消息已成功发送,但实际上由于余额不足,此SMS无法发送。 所以MFMessageComposeViewController
没有显示正确的结果。我怎么知道消息应用程序无法发送短信? 有没有办法获得失败的身份?
I am using
MFMessageComposeViewController
to send SMS from my app.The
didFinishWithResult
delegate method ofMFMessageComposeViewController
shows that the message has been sent successfully but actually this SMS failed to send due to insufficient balance. SoMFMessageComposeViewController
does not show me the correct result.How do I know that the Messages app failed to send an SMS? Is there any way to get the failed status?
原文:https://stackoverflow.com/questions/41993970
最满意答案
调用
t.run();
只需在当前线程(可能是FX Application线程)上调用
run()
方法。 要开始一个新的线程,你需要打电话t.start();
假设
threadclass
(sic)是Thread
一个子类。Calling
t.run();
simply invokes the
run()
method on the current thread (which is probably the FX Application thread). To start a new thread, you need to callt.start();
assuming
threadclass
(sic) is a subclass ofThread
.
相关问答
更多-
当你使用for循环时,它会尝试尽可能快地做你正在做的事情。 新的Showtime()。execute()不是阻塞调用,所以,你基本上会产生成千上万的线程加载图像,并且很快就会耗尽内存。 所以...假设Showtime是您的AsyncTask,您希望在该任务完成时触发图像显示的下一次迭代。 删除for()循环,只需使用Task作为显示图像的调度程序,然后等待,然后显示下一个。 此外,如果没有看到你的堆栈跟踪,就不可能知道你可能做错了什么,但我理所当然地认为你正在正确加载你的位图(你很可能不会这样)。 [编辑] ...
-
通过以下方式加载图像来解决此问题: //Loading image with placeholder and error image imageLoader.get(Const.URL_IMAGE, ImageLoader.getImageListener( imageView, R.drawable.ico_loading, R.drawable.ico_error)); Fixed the issue by loading the image in below way: //L ...
-
你像这样初始化imageView iv = new ImageView(ctx); 你应该像这样iv = (ImageView) findViewById(R.id.mImageView); Finally i got my problem solved. Issue was not in DCIM folder, issue was in size. The pictures taken from cell phone camera is very high and gallery was not get ...
-
您应该检查图像是否已下载,如果已下载,则可以使用ui线程更新UI mainActivity.this.runOnUiThread(new Runnable() { public void run() { ImageView imgView = (ImageView) findViewById(R.id.imageView1); imgView.setImageBitmap(BitmapFactory.decodeFile(getFilesDir() + "/" +TEM ...
-
您没有为ImageView指定高度。 var image = Ti.UI.createImageView({ image: '/images/name.png', width:200, height: Ti.UI.SIZE }); 如果你想让它成为动态的(如果你还不知道高度)或者给它一个固定的高度,可以使它成为Ti.UI.SIZE 。 You did not specify a height for the ImageView. var image = Ti.UI.createIm ...
-
while循环只显示1个结果(While loop only showing 1 result)[2021-11-27]
把你想要的回声放入一个在foreach之外声明的单个变量,并将每个div连接起来(每个循环对应一个foreach)。 然后在循环后回显它。 $boxitems = $_POST['box']; $insertedItems = array(); $duplicateItems = array(); foreach ($boxitems as $boxes) { $escapedBoxes = mysqli_real_escape_string($conn, $boxes); $sq ... -
这与bootstrap无关,你正在用错误的剃刀语法分配唯一的id。 通常在剃刀中,当你用字符串编写c#代码时,该代码被视为字符串。 一个简单的解决方案是将c#代码封装在@(
) 。 所以,你需要像这样分配唯一的ID: ... data-target="#Modal@(itm.PostImageGalleryId)" ... 和 ... id="Modal@(itm.PostImageGalleryId)"... This has nothing to do with boots ... -
调用 t.run(); 只需在当前线程(可能是FX Application线程)上调用run()方法。 要开始一个新的线程,你需要打电话 t.start(); 假设threadclass (sic)是Thread一个子类。 Calling t.run(); simply invokes the run() method on the current thread (which is probably the FX Application thread). To start a new thread, ...
-
捕获后在ImageView中显示图像(android java)(Showing image in ImageView after capturing (android java))[2022-03-02]
我想你需要break; 在case CHOOSE_PHOTO_REQUEST:之前case CHOOSE_PHOTO_REQUEST: 。 这是一个可选项,但不幸的是,确定输出文件名完全取决于相机应用程序在设备上安装或用户选择的内容,即使它在MediaStore.EXTRA_OUTPUT指定。 因此除了data.getData()之外,您还应该看到data.getParcelableExtra(Intent.EXTRA_STREAM)和data.getData() 。 I guess you need br ... -
上面返回的ImageView存储在一个名为icon的字段中。字段用于以下代码中...... ImageView是Node的类型。 一个节点一次只能有一个父节点! 所以不要存储/缓存ImageView(-Node)。 创建新的ImageView节点。 编辑: 正如James_D的评论所指出的那样: ...你可以为每个ImageView使用相同的Image (-Object)... the ImageView returned above is stored into a field called icon.T ...