Giter VIP home page Giter VIP logo

gobbed's People

Contributors

davidhubbard avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

gobbed's Issues

Port gobbed to iOS

Gobbed already runs on many of the platforms Apache Cordova supports. (Note: gobbed does not use Apache Cordova.)

The same flexibility which allows Cordova to target iOS should make it easy to port the gobbed bluetooth layer to iOS.

Add support for serial devices

The chrome.serial API is queried in the code, and probably works. But it just says (unsupported) for now.

Currently the js code to communicate with an ELM327 chip is too tightly coupled into the bluetooth code.

The only cheapest test platform for this (that I know of) is a full-blown laptop (Linux, OS X, Windows) attached to a USB ELM327 device. (USB ELM327 devices present as USB serial ports and would use the chrome.serial API.)

Other possibilities of which I have no direct knowledge:

  • Inexpensive Chromebook + USB ELM327 adapter
  • Android tablet with a USB OTG port + OTG-to-USB adapter + USB ELM327 adapter
  • Raspberry PI-like device, running Android, talking to a hardware serial port

Some Android-specific settings

The app currently blindly does this:

  • Keep the screen on, and never go to sleep
  • Hide status bar (top of screen)
  • Hide nav bar (bottom of screen)
  • If nav bar is shown by user swiping up, wait 2s and hide it again

It would be nice to give the user control:

  • If the user leaves the app, the device will go to sleep, so they do have this level of control right now
  • If the user's device is not plugged in, disable the "never go to sleep"
  • Add a setting: "Stay awake" { "Always" | "When plugged in" | "Never" }
  • Add a setting: "Nav Bar Mode" { "Auto Hide" | "Glass" | "Show" }
  • Nav bar mode "Glass" just means using SYSTEM_UI_FLAG_IMMERSIVE_STICKY
  • Add a setting: "Smart Nav Bar" { "On" | "Off" } so if the user swiped up to get the nav bar, then the nav bar disappeared 2 s later, then the user swiped up within 2 s after that, this is a "user frustration" moment. If the user has 2 "user frustration" moments with the nav bar auto-disappear code within 5 minutes, then "Smart Nav Bar" switches from "On" to "Off," and the nav bar is shown and does not auto-hide any more.

Fix API 9 (Gingerbread) support

gobbed is compiled with MIN_SDK_TARGET of API 9 (Android 2.3 Gingerbread). There are still a lot of Gingerbread devices in the wild.

But WebViewFragment ended up being the cleanest way to get around Android's "feature" that it will tear down and re-create your MainActivity every time the screen is rotated...and for some other changes which I can't remember at the moment.

This bug is to fix the tricky balancing act of creating a WebView and attaching all the notifications to it but only if the device is below API 11.

Expose Bluetooth SDP API on Android to make it more in line with the Chrome Bluetooth API

Here is some code I wrote attempting to do SDP on devices that have not been paired with (result is that getUuids() returns null because the device's UUIDs are not in the Android Bluetooth cache)

        filter = new IntentFilter(BluetoothDevice.ACTION_UUID);
        gobbedWebView.parentActivity.registerReceiver(mReceiver, filter);

                // Must wait for the discovery method to finish before calling another method.
                // (Methods cannot be run in parallel.)
                // http://stackoverflow.com/questions/14812326/android-bluetooth-get-uuids-of-discovered-devices


            } else if (BluetoothDevice.ACTION_UUID.equals(action)) {
                /*if (Build.VERSION.SDK_INT >= 15 && dev.getUuids() == null) { // API 15: Icecream MR1
                    // If you have never attempted to pair or connect with the device, UUIDs will
                    // not be cached.
                    if (!dev.fetchUuidsWithSdp()) {
                        Log.w(TAG, "fetchUuidsWithSdp() returned false. Sanity check failed?");
                    }
                }*/
                Log.w(TAG, "ACTION_UUID:");
                BluetoothDevice dev = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
                Log.w(TAG, "ACTION_UUID: " + dev.getAddress());
                boolean isNewDev = mDeviceList.put(dev.getAddress(), dev) == null;
                gobbedWebView.runJsCallbacks("bluetooth", isNewDev ? "addCb" : "devCb",
                        findDevIndex(dev));

Add Tasker support

Tasker integration to allow setting up profiles based on states and events from OBD. The possibilities are limitless:

  • Trigger a notification when gas is below a certain level (could also be geo-based, if you are close by your favorite gas station, etc..).
  • If you use remote starter, you can set notification when the car is ready (coolant temp is above certain degree)
  • Use voice commands to control/get data from the app.

and so much more..

Synchronized user experience across platforms

Since this app can run on many platforms, it would be nice to have an account (or may be using Google Play Games?) to keep things in sync. This can be to view all error codes and/or bookmarked reports from any device.

ACTION_STATE_CHANGED on Android will not call onDeviceAdded

The current js code always reloads the entire device list, so an ACTION_STATE_CHANGED that fires onAdapterStateChanged will see a new device even though onDeviceAdded is not called.

See the TODO in GobbedBluetooth.onActionStateChanged().

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.