In a Flutter integration test, I would like to communicate with the application in the middle of a test, in order to trigger some arbitrary code to simulate a scenario. Is there a way to achieve this?
Related
I am new to flutter.
I want to build a map application that shows collectable items on a map. When the users are near the item they can collect them. I have to make call to server to indicate that user collect the item.
I understand the application will function when it is in the foreground. But if the application is in the background can it perform these functions? For example: update users location, get items based on the location, collect items etc.
Does flutter can perform these functions normally if it is in the background or we have to create say some service type of application to do this?
I appreciate any advice regarding this.
Yes, you can do it, but you will need to create this methods with kotlin / java and use the platform channels to invoke it.
Yes you can workmanger is for running something on the background in your flutter app and it supports dart directly Workmanager. Alternatively native code will work for you swift or objective-c for ios and kotlin or java for android depending on which default native languages you tell flutter to create project with but that becomes very complex especially over ios side if you have no prior experience. Try your best with workmanager see if that can work.
Put a look to firebase schedule functions and cron as well see if they can do the job as well for you
Firebase Schedule Functions
Cron Flutter
I am trying to understand how I can create a background process in a Flutter Application. Basically, My understanding is that once a user has started the application, the Isolate can be created. This will allow my code to run on the background.
In the background, I want to get a list of Bluetooth enabled devices and their RSSI values within a certain radius, every 30 seconds or so.
I am aware that there are some Bluetooth libraries available for Flutter, but Time is really limited and It would be best to seek advice from experienced flutter developers.
Specifically, I would like to know the following -
Is using Isolates the best way to go about doing this? From my research, I understand that the user has to start the Isolate through some UI Activity?
Could the Isolate(Background Service) repeat every periodically to perform certain tasks?
I need to be able to write the data received from the Bluetooth scan to a database. I understand that the Isolate will not be the best place for this? Based on this blog post by Ben Konyi, it is not good practice to do such tasks within an Isolate.
I am deciding whether to use Flutter for cross platform app. I have investigated in ways to implement other functionalities.
But I need one other feature to implement which needs listening to incoming notification from other app in background. (something like notification listener in Android)
While I was searching came across the issue here which may effect what I intend to implement.
Is there any way to achieve what I want in Flutter?
I am willing to write plugins in native languages if its possible.
You can benefit from platform channels to write a plugin to utilise native code for each platforms. This medium post explains how to execute dart in the background and have example code for Android (Kotlin) and iOS (Objective-C).
However, according to this SO post you are not able to create an similar service like a NotificationListener for iOS.
I want to create an app with Flutter for which it is necessary to receive (and send) mails. Clients share information with eachother in a decentral way using i.e. Googlemail without using an own server.
During my research I found several ways to send mails but no way to receive them since this seems to be not implemented yet in any package.
Flutter offers the option to use platform-specific code with platform channels (flutter plattform-channels) which might be a solution.
However I haven't tested this yet because I write the app for both iOS and Android which means that I'd have to do this for each java and Swift/Objective C.
Maybe someone here knows a better solution.
I need to run some automated UI checks on our native iPhone app. I'd like to be able to do the following:
I'd like to automate a few actions and take screen shots.
I don't want the tool to identify the buttons by image or text, as my app changes images and text all the time. I'd like to identify controls by ID.
I'd like to run these tests on a real iPhone device.
Lastly, when I complete one test, I need to access to settings to modify a few changes, then relaunch app to test. (no need to resume the app)
Is there a good way to achieve these kinds of automated UI tests?
You can use the instrument that apple provides - UIAutomation
It provides all expected automation facilities. Screenshots can also be taken. Check for documentation here apple doc
Here is a nice tutorial to start with http://cocoamanifest.net/articles/2011/05/uiautomation-an-introduction.html