songyiYu / all_sensors

Access sensors (Accelerometer, Gyroscope, Proximity) plugin in Flutter
Other
15 stars 11 forks source link

Support more sensors and more platforms #5

Open bdlukaa opened 3 years ago

bdlukaa commented 3 years ago

First of all, thank you for the awesome plugin :)

As flutter grows, we'd like this plugin to grow with it. It'd be great to have more supported sensors and platforms in the plugin.

Supported sensors in Android:

Supported sensors in iOS and macOS:

Supported sensors in web:

Other sensors are supported but by a very few amount of browsers.

Supported sensors in windows

Equivalents in each platform

Android iOS macOS Web Windows
Accelerometer ✔️ ✔️ ✔️ ✔️ ✔️
Altitude ✔️ ✔️ ✔️
Ambient Temperature ✔️
Fall detection ✔️ ✔️
Gravity ✔️ ✔️
Gyroscope ✔️ ✔️ ✔️ ✔️ ✔️
Headphone motion ✔️ ✔️
Ambient Light Level ✔️ ✔️ ✔️
Linear acceleration ✔️
Magnetic field ✔️ ✔️ ✔️ ✔️ ✔️
Orientation ✔️ ✔️ ✔️
Pedometer ✔️ ✔️ ✔️ ✔️
Ambient Pressure ✔️
Proximity ✔️ ✔️ ✔️ ✔️
Relative Humidity ✔️
Rotation Vector ✔️

To support sensors through all these platforms (and maybe others in the future), migrating the plugin to federated is necessary and recommended. While migrating, it'd be awsome null-safety being supported, since the whole framework is being migrated to it.

Android supports all the sensors in api level 14 (see this), so it'd be good to downgrade the minSdkVersion to reach more devices.

Now the recommened language for android is kotlin instead of java, so it would be also good to switch to it, since java may be not supported anymore in the future

songyiYu commented 3 years ago

Thanks for your great idea! It would be nice to develop the plugin and pr is always welcome :)

bdlukaa commented 3 years ago

Hello @songyiYu . Are you still interested in collaborating? If yes, you can dm me at discord: bdlukaa#4828