Closed arianneorpilla closed 3 years ago
Hello @lrorpilla,
Thanks for posting an issue. The plugin sends a stream of data to the app when the app is in memory and when it is not, the app is opened. You just need to return false
from the isAppRunning
method in the MainActivity
as directed in the docs and you will achieve what you want.
Set showConfirmationToast
to false in FlutterProcessText.initialize()
(docs) and you will not get confirmation toast message.
Example:
public class MainActivity extends FlutterActivity {
private static boolean isAppRunning;
public static boolean getIsAppRunning() {
return isAppRunning;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
isAppRunning = isAppRunning(this);
}
public static boolean isAppRunning(Context context) {
return false;
}
}
FlutterProcessText.initialize(
showConfirmationToast: false,
showRefreshToast: false,
showErrorToast: true,
);
Hope this works!
This is almost what I need. I can't get the
action_process_text
package to work because I use my own method channels in myMainActivity
, so if I use that I would getMissingPluginException
and so on. This works, but it shows a toast instead of opening the app. Is there a way I can have the app open to a screen instead of showing a toast with this plugin?