fix(driver-app): change RECEIVER_NOT_EXPORTED to RECEIVER_EXPORTED so MainActivity receives location updates from TrackingService
Some checks failed
Deploy RIT Freshers Hub to VPS / Deploy to Live VPS (push) Has been cancelled
Some checks failed
Deploy RIT Freshers Hub to VPS / Deploy to Live VPS (push) Has been cancelled
This commit is contained in:
@@ -96,7 +96,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
// Register receiver for service communication
|
||||
IntentFilter filter = new IntentFilter(TrackingService.ACTION_LOCATION_BROADCAST);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
registerReceiver(locationReceiver, filter, Context.RECEIVER_NOT_EXPORTED);
|
||||
registerReceiver(locationReceiver, filter, Context.RECEIVER_EXPORTED);
|
||||
} else {
|
||||
registerReceiver(locationReceiver, filter);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user