简体   繁体   English

我可以从反应本机或主要活动中永久禁用 android 和 ios 中的 toast 消息服务吗?

[英]Can i permanently disable toast message service in android & ios from react native or main activity?

We have a React Native app that using third party libraries, and they generate some toasts.我们有一个使用第三方库的 React Native 应用程序,它们会生成一些 toast。 Now, finding a way to disable my app toast messaging service.现在,找到一种方法来禁用我的应用程序 toast 消息服务。 Then, we could be handled toast messaging custom way.然后,我们可以通过自定义方式处理 toast 消息传递。

Is it possible to disable React Native toast messaging permanently ?是否可以永久禁用React Native toast 消息传递?

Or,或者,

Is it possible to disable toast messaging permanently from Android Studio ?是否可以从Android Studio永久禁用 toast 消息传递?

In Android, without having the reference of Toast, it is not possible.在Android中,没有Toast的引用,是不可能的。

You can cancel individual Toasts by calling cancel() on the Toast object.您可以通过在 Toast object 上调用 cancel() 来取消单个 Toast。 AFAIK, there is no way for you to cancel all outstanding Toasts, though. AFAIK,不过,您无法取消所有未完成的 Toast。

Ref1参考1

Even the React native does not have any respective methods to cancel the toast.即使是 React native 也没有任何相应的方法来取消 toast。

Ref 2 参考 2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 React Native - 在 Android 上永久禁用软键盘 - React Native - Disable soft keyboard permanently on Android 如何在特定活动中显示服务中的吐司 - How can I show the toast from the service in the specific activity React Native Native Java / Android模块-不显示吐司消息 - React Native Native Java/Android Module - not showing toast message 主要活动完成后如何显示服务中的Toast? - How to display Toast from a Service after main Activity finishes? 对本机应用程序永久响应本机android隐藏或禁用键盘 - react native android hide or disable keyboard permanently for kiosk app Android - 用另一个 Class 为主要活动做吐司 - Android - Make Toast from another Class for Main Activity 如何从另一个意图中取消我在先前活动中定义的祝酒消息? - How can I cancel a toast message that I defined in a previous activity from another intent? 如何从主要活动之外敬酒 - How do I make a toast from outside of the main activity 如何使用 ReactRootView 在 Android Activity 上公开 React 方法,以便它可以从 React Native Javascript 调用? - How do I Expose a React Method on an Android Activity with a ReactRootView so it can be Called From React Native Javascript? 如何在带有多个片段的活动上显示吐司消息? - How can I show toast message on Activity with multi Fragments?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM