aniruddha-adhikary / mrt-buddy

Check the Balance of your Dhaka MRT Pass or Rapid Pass
https://mrtbuddy.com/
GNU General Public License v3.0
284 stars 76 forks source link

feat: Provide a way to open NFC settings when device has NFC #81

Open Mahmud0808 opened 1 week ago

Mahmud0808 commented 1 week ago

Description: Implement a feature that automatically directs users to the NFC settings page when the device supports NFC.

Visual Representation:

Proposed Implementation:

private fun openNfcSettings() {
    val intent = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
        Intent(Settings.Panel.ACTION_NFC)
    } else {
        Intent(Settings.ACTION_WIRELESS_SETTINGS)
    }
    startActivity(intent)
}

Benefits:

aniruddha-adhikary commented 1 week ago

This is a great feature request, we should prioritize.

Zamiul-rashid commented 1 day ago

@aniruddha-adhikary I will start on this if its not fixed already

aniruddha-adhikary commented 1 day ago

@Zamiul-rashid please go ahead