This file contains hidden or 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
name: Minimal Android CI Workflow | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- 'v*' | |
jobs: |
This file contains hidden or 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
import androidx.lifecycle.ViewModel | |
class HomeViewModel: ViewModel() { | |
var isAudioServiceBound = false | |
} |
This file contains hidden or 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
package com.alokomkar.activity | |
import android.content.ComponentName | |
import android.content.Context | |
import android.content.Intent | |
import android.content.ServiceConnection | |
import android.os.Bundle | |
import android.os.IBinder | |
import android.view.LayoutInflater | |
import android.view.View |
This file contains hidden or 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
enum class ServiceAction(val value: String) { | |
START_ACTION("start"), | |
STOP_ACTION("stop") | |
} |
This file contains hidden or 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
enum class ServiceAction(val value: String) { | |
START_ACTION("start"), | |
STOP_ACTION("stop") | |
} |
This file contains hidden or 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
import android.app.Service | |
import android.content.Intent | |
import android.media.MediaPlayer | |
import android.os.Binder | |
import android.os.IBinder | |
import com.alokomkar.javacollections.R | |
class AudioLoopBoundService: Service() { | |
private val binder: AudioLoopServiceBinder by lazy { |
This file contains hidden or 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
import android.app.Notification | |
import android.app.NotificationChannel | |
import android.app.NotificationManager | |
import android.app.PendingIntent | |
import android.content.Context | |
import android.content.Intent | |
import android.os.Build | |
import androidx.annotation.RequiresApi | |
import androidx.core.app.NotificationCompat | |
import com.alokomkar.activity.HomeActivity |
This file contains hidden or 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
import android.app.Service | |
import android.content.Intent | |
import android.media.MediaPlayer | |
import android.os.Build | |
import android.os.IBinder | |
import com.alokomkar.helper.NotificationHelper | |
import com.alokomkar.javacollections.R | |
class AudioForegroundLoopService: Service() { |
This file contains hidden or 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
import android.content.Intent | |
import android.os.Bundle | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.appcompat.widget.AppCompatButton | |
import androidx.core.content.ContextCompat | |
import androidx.fragment.app.Fragment | |
import com.alokomkar.javacollections.R | |
import com.alokomkar.service.AudioForegroundLoopService |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.appcompat.widget.LinearLayoutCompat | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="vertical" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:gravity="center"> | |
<androidx.appcompat.widget.AppCompatButton | |
android:layout_width="match_parent" |
NewerOlder