-
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show the Car Info app without Notifications app
- Loading branch information
Showing
11 changed files
with
362 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
app/src/main/java/me/hufman/androidautoidrive/carapp/carinfo/CarInfoAppService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package me.hufman.androidautoidrive.carapp.carinfo | ||
|
||
import android.util.Log | ||
import io.bimmergestalt.idriveconnectkit.android.CarAppAssetResources | ||
import me.hufman.androidautoidrive.AppSettingsViewer | ||
import me.hufman.androidautoidrive.MainService | ||
import me.hufman.androidautoidrive.carapp.CarAppService | ||
import me.hufman.androidautoidrive.carapp.ReadoutCommandsReceiver | ||
|
||
class CarInfoAppService: CarAppService() { | ||
|
||
var carApp: CarInfoApp? = null | ||
var readoutController: ReadoutCommandsReceiver? = null | ||
|
||
override fun shouldStartApp(): Boolean = true | ||
|
||
override fun onCarStart() { | ||
Log.i(MainService.TAG, "Starting car info app") | ||
|
||
val handler = handler!! | ||
val carApp = CarInfoApp(iDriveConnectionStatus, securityAccess, | ||
CarAppAssetResources(applicationContext, "news"), | ||
CarAppAssetResources(applicationContext, "carinfo_unsigned"), | ||
handler, applicationContext.resources, AppSettingsViewer() | ||
) | ||
this.carApp = carApp | ||
readoutController = ReadoutCommandsReceiver(carApp.readoutCommands) | ||
readoutController?.register(this, handler) | ||
} | ||
|
||
override fun onCarStop() { | ||
carApp?.disconnect() | ||
carApp = null | ||
readoutController?.unregister(this) | ||
} | ||
} |
Oops, something went wrong.