From 042e8d6ebb09c5da60b02dde439364e78522ed6a Mon Sep 17 00:00:00 2001 From: geeksville Date: Sat, 11 Apr 2020 13:20:30 -0700 Subject: [PATCH] map analytics optional --- app/build.gradle | 5 + .../java/com/geeksville/mesh/MainActivity.kt | 10 +- .../geeksville/mesh/MeshUtilApplication.kt | 5 +- .../com/geeksville/mesh/ui/MapFragment.kt | 67 +- .../geeksville/mesh/ui/SettingsFragment.kt | 8 +- app/src/main/res/layout/map_not_allowed.xml | 18 + app/src/main/res/values/strings.xml | 3 + geeksville-androidlib | 2 +- scripts/MainActivity_robo_script.json | 742 ++++++++++++++++++ 9 files changed, 826 insertions(+), 34 deletions(-) create mode 100644 app/src/main/res/layout/map_not_allowed.xml create mode 100644 scripts/MainActivity_robo_script.json diff --git a/app/build.gradle b/app/build.gradle index a30fa133..d47f1aea 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -34,6 +34,11 @@ android { // We have to list all translated languages here, because some of our libs have bogus languages that google play // doesn't like and we need to strip them (gr) resConfigs "en", "de", "fi", "fr", "ga", "it", "nl", "ru", "sv", "zh" + + // Needed to make mapbox work inside the firebase testlab - FIXME, alas, still doesn't work + ndk { + // abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" + } } buildFeatures { diff --git a/app/src/main/java/com/geeksville/mesh/MainActivity.kt b/app/src/main/java/com/geeksville/mesh/MainActivity.kt index 0df23ca3..1f5e96fc 100644 --- a/app/src/main/java/com/geeksville/mesh/MainActivity.kt +++ b/app/src/main/java/com/geeksville/mesh/MainActivity.kt @@ -23,6 +23,7 @@ import androidx.core.content.ContextCompat import androidx.fragment.app.Fragment import androidx.lifecycle.Observer import androidx.viewpager2.adapter.FragmentStateAdapter +import com.geeksville.android.GeeksvilleApplication import com.geeksville.android.Logging import com.geeksville.android.ServiceClient import com.geeksville.mesh.model.Channel @@ -262,15 +263,18 @@ class MainActivity : AppCompatActivity(), Logging, } } + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val prefs = UIViewModel.getPreferences(this) model.ownerName.value = prefs.getString("owner", "")!! + val isInTestLab = (application as GeeksvilleApplication).isInTestLab + // Ensures Bluetooth is available on the device and it is enabled. If not, // displays a dialog requesting user permission to enable Bluetooth. - if (bluetoothAdapter != null) { + if (bluetoothAdapter != null && !isInTestLab) { bluetoothAdapter!!.takeIf { !it.isEnabled }?.apply { val enableBtIntent = Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE) startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT) @@ -284,8 +288,8 @@ class MainActivity : AppCompatActivity(), Logging, .show() } - requestPermission() - + if (isInTestLab) + requestPermission() // permissions don't work there /* not yet working // Configure sign-in to request the user's ID, email address, and basic diff --git a/app/src/main/java/com/geeksville/mesh/MeshUtilApplication.kt b/app/src/main/java/com/geeksville/mesh/MeshUtilApplication.kt index a20e86be..57cb3be8 100644 --- a/app/src/main/java/com/geeksville/mesh/MeshUtilApplication.kt +++ b/app/src/main/java/com/geeksville/mesh/MeshUtilApplication.kt @@ -16,11 +16,11 @@ class MeshUtilApplication : GeeksvilleApplication() { Logging.showLogs = BuildConfig.DEBUG - // We default to off in the manifest, FIXME turn on only if user approves + // We default to off in the manifest - we turn on here if the user approves // leave off when running in the debugger if (!isEmulator && (!BuildConfig.DEBUG || !Debug.isDebuggerConnected())) { val crashlytics = FirebaseCrashlytics.getInstance() - crashlytics.setCrashlyticsCollectionEnabled(true) + crashlytics.setCrashlyticsCollectionEnabled(isAnalyticsAllowed) crashlytics.setCustomKey("debug_build", BuildConfig.DEBUG) // Attach to our exception wrapper @@ -29,7 +29,6 @@ class MeshUtilApplication : GeeksvilleApplication() { } } - // Mapbox Access token Mapbox.getInstance(this, getString(R.string.mapbox_access_token)) } } \ No newline at end of file diff --git a/app/src/main/java/com/geeksville/mesh/ui/MapFragment.kt b/app/src/main/java/com/geeksville/mesh/ui/MapFragment.kt index 0b972cb1..8054c952 100644 --- a/app/src/main/java/com/geeksville/mesh/ui/MapFragment.kt +++ b/app/src/main/java/com/geeksville/mesh/ui/MapFragment.kt @@ -7,6 +7,7 @@ import android.view.View import android.view.ViewGroup import androidx.fragment.app.activityViewModels import androidx.lifecycle.Observer +import com.geeksville.android.GeeksvilleApplication import com.geeksville.android.Logging import com.geeksville.mesh.NodeInfo import com.geeksville.mesh.R @@ -116,64 +117,80 @@ class MapFragment : ScreenFragment("Map"), Logging { override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? - ): View? = inflater.inflate(R.layout.map_view, container, false) + ): View? { + // We can't allow mapbox if user doesn't want analytics + val id = + if ((requireContext().applicationContext as GeeksvilleApplication).isAnalyticsAllowed) { + // Mapbox Access token + R.layout.map_view + } else { + R.layout.map_not_allowed + } - lateinit var mapView: MapView + return inflater.inflate(id, container, false) + } + + var mapView: MapView? = null override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - mapView = view.findViewById(R.id.mapView) - mapView.onCreate(savedInstanceState) + // We might not have a real mapview if running with analytics + if ((requireContext().applicationContext as GeeksvilleApplication).isAnalyticsAllowed) { + val v = view.findViewById(R.id.mapView) + mapView = v + v.onCreate(savedInstanceState) - mapView.getMapAsync { map -> + v.getMapAsync { map -> - // val markerIcon = BitmapFactory.decodeResource(context.resources, R.drawable.ic_twotone_person_pin_24) - val markerIcon = requireActivity().getDrawable(R.drawable.ic_twotone_person_pin_24)!! + // val markerIcon = BitmapFactory.decodeResource(context.resources, R.drawable.ic_twotone_person_pin_24) + val markerIcon = + requireActivity().getDrawable(R.drawable.ic_twotone_person_pin_24)!! - map.setStyle(Style.OUTDOORS) { style -> - style.addSource(nodePositions) - style.addImage(markerImageId, markerIcon) - style.addLayer(nodeLayer) - style.addLayer(labelLayer) + map.setStyle(Style.OUTDOORS) { style -> + style.addSource(nodePositions) + style.addImage(markerImageId, markerIcon) + style.addLayer(nodeLayer) + style.addLayer(labelLayer) + } + + model.nodeDB.nodes.observe(viewLifecycleOwner, Observer { nodes -> + onNodesChanged(map, nodes.values) + }) + + //map.uiSettings.isScrollGesturesEnabled = true + //map.uiSettings.isZoomGesturesEnabled = true } - - model.nodeDB.nodes.observe(viewLifecycleOwner, Observer { nodes -> - onNodesChanged(map, nodes.values) - }) - - //map.uiSettings.isScrollGesturesEnabled = true - //map.uiSettings.isZoomGesturesEnabled = true } } override fun onPause() { - mapView.onPause() + mapView?.onPause() super.onPause() } override fun onStart() { super.onStart() - mapView.onStart() + mapView?.onStart() } override fun onStop() { - mapView.onStop() + mapView?.onStop() super.onStop() } override fun onResume() { super.onResume() - mapView.onResume() + mapView?.onResume() } override fun onDestroy() { - mapView.onDestroy() + mapView?.onDestroy() super.onDestroy() } override fun onSaveInstanceState(outState: Bundle) { - mapView.onSaveInstanceState(outState) + mapView?.onSaveInstanceState(outState) super.onSaveInstanceState(outState) } } diff --git a/app/src/main/java/com/geeksville/mesh/ui/SettingsFragment.kt b/app/src/main/java/com/geeksville/mesh/ui/SettingsFragment.kt index 9b8b9065..8574fa84 100644 --- a/app/src/main/java/com/geeksville/mesh/ui/SettingsFragment.kt +++ b/app/src/main/java/com/geeksville/mesh/ui/SettingsFragment.kt @@ -259,9 +259,13 @@ class SettingsFragment : ScreenFragment("Settings"), Logging { requireActivity().hideKeyboard() } + // Set analytics checkbox + analyticsOkayCheckbox.isChecked = + (requireContext().applicationContext as GeeksvilleApplication).isAnalyticsAllowed analyticsOkayCheckbox.setOnCheckedChangeListener { _, isChecked -> - // FIXME, preserve this in settings - analyticsOkayCheckbox.isChecked = true // so users will complain and I'll fix the bug + debug("User changed analytics to $isChecked") + (requireContext().applicationContext as GeeksvilleApplication).isAnalyticsAllowed = + isChecked } scanModel.errorText.observe(viewLifecycleOwner, Observer { errMsg -> diff --git a/app/src/main/res/layout/map_not_allowed.xml b/app/src/main/res/layout/map_not_allowed.xml new file mode 100644 index 00000000..0ba87d5a --- /dev/null +++ b/app/src/main/res/layout/map_not_allowed.xml @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1154ff50..ab88e9f8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -32,4 +32,7 @@ Are you sure you want to change the channel? All communication with other nodes will stop until you share the new channel settings. New Channel URL received Do you want to switch to the \'%s\' channel? + You have analytics disabled. Unfortunately our map provider (mapbox) requires analytics to be allowed for their \'free\' plan. So we have turned off the map view.\n\n + If you would like to see the map, you\'ll need to turn on analytics in the Settings pane (also, for the time being you might need to force restart the application).\n\n + If you are interested in us paying for mapbox (or switching to a different map provider), please post in our forum. diff --git a/geeksville-androidlib b/geeksville-androidlib index ebc40c05..7e91d36f 160000 --- a/geeksville-androidlib +++ b/geeksville-androidlib @@ -1 +1 @@ -Subproject commit ebc40c05fd8c30aabb3070468627e5fe6ae59cd5 +Subproject commit 7e91d36f464d681c1acf2bee5e1f6c85c04a382b diff --git a/scripts/MainActivity_robo_script.json b/scripts/MainActivity_robo_script.json new file mode 100644 index 00000000..4b846489 --- /dev/null +++ b/scripts/MainActivity_robo_script.json @@ -0,0 +1,742 @@ +[ + { + "eventType": "VIEW_CLICKED", + "timestamp": 1586629911091, + "replacementText": "", + "actionCode": -1, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.tabs.TabLayout$TabView", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 3, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.tabs.TabLayout$SlidingTabIndicator", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.tabs.TabLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 1, + "resourceId": "com.geeksville.mesh:id/tab_layout", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "VIEW_CLICKED", + "timestamp": 1586629915828, + "replacementText": "", + "actionCode": -1, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.tabs.TabLayout$TabView", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 2, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.tabs.TabLayout$SlidingTabIndicator", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.tabs.TabLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 1, + "resourceId": "com.geeksville.mesh:id/tab_layout", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "VIEW_CLICKED", + "timestamp": 1586629919413, + "replacementText": "", + "actionCode": -1, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.tabs.TabLayout$TabView", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 1, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.tabs.TabLayout$SlidingTabIndicator", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.tabs.TabLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 1, + "resourceId": "com.geeksville.mesh:id/tab_layout", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "VIEW_CLICKED", + "timestamp": 1586629922790, + "replacementText": "", + "actionCode": -1, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.tabs.TabLayout$TabView", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.tabs.TabLayout$SlidingTabIndicator", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.tabs.TabLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 1, + "resourceId": "com.geeksville.mesh:id/tab_layout", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "VIEW_TEXT_CHANGED", + "timestamp": 1586629928465, + "replacementText": "hhi", + "actionCode": -1, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.textfield.TextInputEditText", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "com.geeksville.mesh:id/messageInputText", + "contentDescription": "", + "text": "" + }, + { + "className": "android.widget.FrameLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.textfield.TextInputLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 1, + "resourceId": "com.geeksville.mesh:id/textInputLayout", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "PRESSED_EDITOR_ACTION", + "timestamp": 1586629935566, + "replacementText": "hhi", + "actionCode": 6, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.textfield.TextInputEditText", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "com.geeksville.mesh:id/messageInputText", + "contentDescription": "", + "text": "hhi" + }, + { + "className": "android.widget.FrameLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.textfield.TextInputLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 1, + "resourceId": "com.geeksville.mesh:id/textInputLayout", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "VIEW_CLICKED", + "timestamp": 1586629943766, + "replacementText": "", + "actionCode": -1, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.tabs.TabLayout$TabView", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 1, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.tabs.TabLayout$SlidingTabIndicator", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.tabs.TabLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 1, + "resourceId": "com.geeksville.mesh:id/tab_layout", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "VIEW_CLICKED", + "timestamp": 1586629947847, + "replacementText": "", + "actionCode": -1, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.tabs.TabLayout$TabView", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 2, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.tabs.TabLayout$SlidingTabIndicator", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.tabs.TabLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 1, + "resourceId": "com.geeksville.mesh:id/tab_layout", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "VIEW_CLICKED", + "timestamp": 1586629951848, + "replacementText": "", + "actionCode": -1, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.tabs.TabLayout$TabView", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 3, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.tabs.TabLayout$SlidingTabIndicator", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.tabs.TabLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 1, + "resourceId": "com.geeksville.mesh:id/tab_layout", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "VIEW_CLICKED", + "timestamp": 1586629957343, + "replacementText": "", + "actionCode": -1, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.checkbox.MaterialCheckBox", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 2, + "resourceId": "com.geeksville.mesh:id/editableCheckbox", + "contentDescription": "", + "text": "" + }, + { + "className": "androidx.constraintlayout.widget.ConstraintLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "android.widget.FrameLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "VIEW_LONG_CLICKED", + "timestamp": 1586629963511, + "replacementText": "Default", + "actionCode": -1, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.textfield.TextInputEditText", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "com.geeksville.mesh:id/channelNameEdit", + "contentDescription": "", + "text": "Default" + }, + { + "className": "android.widget.FrameLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.textfield.TextInputLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "com.geeksville.mesh:id/channelNameView", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "VIEW_TEXT_CHANGED", + "timestamp": 1586629965913, + "replacementText": "Defaultx", + "actionCode": -1, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.textfield.TextInputEditText", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "com.geeksville.mesh:id/channelNameEdit", + "contentDescription": "", + "text": "Default" + }, + { + "className": "android.widget.FrameLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.textfield.TextInputLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "com.geeksville.mesh:id/channelNameView", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "VIEW_CLICKED", + "timestamp": 1586629968157, + "replacementText": "Defaultx", + "actionCode": -1, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.textfield.TextInputEditText", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "com.geeksville.mesh:id/channelNameEdit", + "contentDescription": "", + "text": "Defaultx" + }, + { + "className": "android.widget.FrameLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.textfield.TextInputLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "com.geeksville.mesh:id/channelNameView", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "VIEW_TEXT_CHANGED", + "timestamp": 1586629970340, + "replacementText": "Defaultxbb", + "actionCode": -1, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.textfield.TextInputEditText", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "com.geeksville.mesh:id/channelNameEdit", + "contentDescription": "", + "text": "Defaultx" + }, + { + "className": "android.widget.FrameLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.textfield.TextInputLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "com.geeksville.mesh:id/channelNameView", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "PRESSED_EDITOR_ACTION", + "timestamp": 1586629974781, + "replacementText": "Defaultxbb", + "actionCode": 6, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.textfield.TextInputEditText", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "com.geeksville.mesh:id/channelNameEdit", + "contentDescription": "", + "text": "Defaultxbb" + }, + { + "className": "android.widget.FrameLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.textfield.TextInputLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "com.geeksville.mesh:id/channelNameView", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "VIEW_CLICKED", + "timestamp": 1586629980271, + "replacementText": "", + "actionCode": -1, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.checkbox.MaterialCheckBox", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 2, + "resourceId": "com.geeksville.mesh:id/editableCheckbox", + "contentDescription": "", + "text": "" + }, + { + "className": "androidx.constraintlayout.widget.ConstraintLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "android.widget.FrameLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "VIEW_CLICKED", + "timestamp": 1586629985704, + "replacementText": "Cancel", + "actionCode": -1, + "delayTime": 0, + "canScrollTo": true, + "elementDescriptors": [ + { + "className": "com.google.android.material.button.MaterialButton", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "android:id/button3", + "contentDescription": "", + "text": "Cancel" + }, + { + "className": "androidx.appcompat.widget.ButtonBarLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "android.widget.ScrollView", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 3, + "resourceId": "com.geeksville.mesh:id/buttonPanel", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "VIEW_CLICKED", + "timestamp": 1586629990504, + "replacementText": "", + "actionCode": -1, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.tabs.TabLayout$TabView", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 4, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.tabs.TabLayout$SlidingTabIndicator", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.tabs.TabLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 1, + "resourceId": "com.geeksville.mesh:id/tab_layout", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "VIEW_TEXT_CHANGED", + "timestamp": 1586629997403, + "replacementText": "Bob x", + "actionCode": -1, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.textfield.TextInputEditText", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "com.geeksville.mesh:id/usernameEditText", + "contentDescription": "", + "text": "" + }, + { + "className": "android.widget.FrameLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.textfield.TextInputLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 1, + "resourceId": "com.geeksville.mesh:id/textInputLayout2", + "contentDescription": "", + "text": "" + } + ] + }, + { + "eventType": "PRESSED_EDITOR_ACTION", + "timestamp": 1586630009771, + "replacementText": "Bob x", + "actionCode": 6, + "delayTime": 0, + "canScrollTo": false, + "elementDescriptors": [ + { + "className": "com.google.android.material.textfield.TextInputEditText", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "com.geeksville.mesh:id/usernameEditText", + "contentDescription": "", + "text": "Bob x" + }, + { + "className": "android.widget.FrameLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 0, + "resourceId": "", + "contentDescription": "", + "text": "" + }, + { + "className": "com.google.android.material.textfield.TextInputLayout", + "recyclerViewChildPosition": -1, + "adapterViewChildPosition": -1, + "groupViewChildPosition": 1, + "resourceId": "com.geeksville.mesh:id/textInputLayout2", + "contentDescription": "", + "text": "" + } + ] + } +] \ No newline at end of file