This commit centralizes all Android Intent constants into a new `MeshtasticIntent` object within the `core/api` module.
This refactoring makes the constants accessible to external applications and removes the duplicated definitions from the main application. The app and the service example have been updated to use these new centralized constants.
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit introduces several enhancements to the service broadcasts and data handling:
- **Disconnect Broadcast**: Adds and triggers a new `ACTION_MESH_DISCONNECTED` broadcast when the mesh connection state changes to `Disconnected`. This provides a more specific intent for apps to listen for disconnection events.
- **Expanded App Port Handling**:
- Adds explicit broadcast actions for various app port numbers (e.g., `ATAK_PLUGIN`, `PRIVATE_APP`, `DETECTION_SENSOR_APP`).
- Ensures that packets for `ATAK`, `PRIVATE_APP`, and `DETECTION_SENSOR_APP` are now correctly broadcast to external applications.
- Implements a default behavior to broadcast any unrecognized port numbers, allowing for future extensibility and support for third-party apps.
- **Backward Compatibility**: When broadcasting received data, a secondary broadcast with the numeric port number is also sent to maintain compatibility with older applications that may rely on it.
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
- moved MeshService start-related code to `MeshServiceStarter`
- moved `LocationCallback` to `MeshServiceLocationCallback`
- coroutine scope is now handled in `MeshService` positio ncallback.
- refactored `onLocationResult()` to be easier to read
- created `MeshServiceNotifications` for creating and updating of notifications
- moved `SavedSettings` to `MeshServiceSettingsData`