Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
460 additions
and
48 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
24 changes: 24 additions & 0 deletions
24
app/src/main/java/io/codebeavers/sipcaller/call/CallReceiver.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,24 @@ | ||
package io.codebeavers.sipcaller.call | ||
|
||
import android.content.BroadcastReceiver | ||
import android.content.Context | ||
import android.content.Intent | ||
|
||
import io.codebeavers.sipcaller.events.CallEvent | ||
|
||
import org.greenrobot.eventbus.EventBus | ||
|
||
/** | ||
* Created by Evgeny Eliseyev on 23/02/2018. | ||
* Sends event about an incoming call to the running activity. | ||
*/ | ||
|
||
class CallReceiver: BroadcastReceiver() { | ||
override fun onReceive(context: Context?, intent: Intent?) { | ||
if (intent == null) { | ||
return | ||
} | ||
|
||
EventBus.getDefault().post(CallEvent(intent)) | ||
} | ||
} |
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
9 changes: 9 additions & 0 deletions
9
app/src/main/java/io/codebeavers/sipcaller/events/CallEvent.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,9 @@ | ||
package io.codebeavers.sipcaller.events | ||
|
||
import android.content.Intent | ||
|
||
/** | ||
* Created by Evgeny Eliseyev on 23/02/2018. | ||
*/ | ||
|
||
data class CallEvent(val intent: Intent) |
Oops, something went wrong.