Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
Companion App Android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Andy B-S
Companion App Android
Commits
4b2776d9
Commit
4b2776d9
authored
Aug 23, 2019
by
Anon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'two-apps' into 'master'
Fix BLE callback issues See merge request
!25
parents
68bdd85e
2995ccdf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
app/src/main/java/de/ccc/events/badge/card10/common/ConnectionService.kt
...va/de/ccc/events/badge/card10/common/ConnectionService.kt
+5
-0
app/src/main/java/de/ccc/events/badge/card10/main/MainFragment.kt
...main/java/de/ccc/events/badge/card10/main/MainFragment.kt
+5
-0
No files found.
app/src/main/java/de/ccc/events/badge/card10/common/ConnectionService.kt
View file @
4b2776d9
...
...
@@ -63,6 +63,11 @@ object ConnectionService {
}
fun
connect
(
context
:
Context
)
{
if
(
isConnected
())
{
gattListeners
.
values
.
map
{
it
.
onConnectionReady
()
}
return
}
// Use first BLE devices that is bonded
val
bondedDevices
=
BluetoothAdapter
.
getDefaultAdapter
().
bondedDevices
.
filter
{
it
.
address
.
startsWith
(
...
...
app/src/main/java/de/ccc/events/badge/card10/main/MainFragment.kt
View file @
4b2776d9
...
...
@@ -80,6 +80,11 @@ class MainFragment : Fragment(), GattListener {
private
fun
showConnectedView
()
{
// The callback can happen when our UI is not visible
if
(
container_connected
==
null
)
{
return
}
activity
?.
runOnUiThread
{
container_connected
.
visibility
=
View
.
VISIBLE
container_disconnected
.
visibility
=
View
.
GONE
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment