Nectar mobile app (Android, iOS, Windows) for Beeminder
As can be seen from the table below (click to enlarge), the Nectar mobile app includes almost all the features of Beeminder’s Android and iOS apps, as well as many additional ones including voice commands, goal sharing, the ability to add Beeminder and integration goals. You can add datapoints using only your voice (see below)! In addition, Nectar supports the Universal Windows Platform, including all 550 million Windows 10 devices.
Instructions to install Nectar
Use package (recommended):
Requires Android 4.4 (KitKat) or greater.
To install the Android app, download it from an Android device, allow installation of apps from “Unknown sources” in Settings > Security and install the app by opening the
Requires iOS 8 or greater.
If you want to install the iOS app, you will need to follow the instructions to build it: https://github.com/beeminder-capstone/Nectar-Frontend#build and (do before step 11) https://cordova.apache.org/docs/en/7.x/guide/platforms/ios/. See note below under Developers.
Universal Windows Platform
Requires Windows 10.
To install the Windows app on a PC, enable “Sideload apps” or “Developer mode” in Settings > Update & security > For developers, download and extract the file from a Windows 10 PC, open the folder corresponding to your system architecture (here are instructions to determine your architecture: https://support.microsoft.com/en-us/help/13443/windows-which-operating-system), right click the
Add-AppDevPackage.ps1 file, select “Run with PowerShell” and follow the prompts to install the app.
To install the Windows app on a phone, enable “Sideload apps” or “Developer mode” in Settings > Update & security > For developers, download the folder corresponding to your system architecture from a Windows 10 Mobile device, import the security certificate by opening the
.cer file and install the app by opening the
Nectar mobile app source code: https://github.com/beeminder-capstone/Nectar-Frontend.
Here are the instructions on how to build the Nectar mobile app: https://github.com/beeminder-capstone/Nectar-Frontend#build. Note: you will also have to follow the instructions below to run the Nectar web app locally, if you want integrations to work. Be sure to update your
SECRET_KEY environment variable to the same value as the
SECRET_KEY_BASE environment variable on the Nectar web app. In addition, update your
DOMAIN_NAME environment variable to the internal IP address of the computer on your local network and port that the Nectar web app is running on (such as:
http://192.168.0.2:3000). Most home routers allow static internal IP addresses to be assigned via DHCP reservation (see your routers user guide for more info). The redirect/callback URL for Beeminder OAuth is:
I do not own a Mac, so I cannot build the production iOS package: https://ionicframework.com/docs/intro/deploying/#ios-devices. If anyone would be willing to do so and share the package on this thread so other iOS users do not have to build it themselves, please send me a PM.
To use the voice commands feature in the app: press the microphone icon and say, “Create goal” to go to the add goal page or say, “Add [number] to [goal]” to add a datapoint with value [number] to your Beeminder goal with slug [goal]. If the goal’s slug is not a word, try spelling it out.
Note: Voice commands are not yet supported on the Windows platform. If you are a developer and would like to add support for speech recognition in Windows, see these links: https://github.com/pbakondy/cordova-plugin-speechrecognition and https://docs.microsoft.com/en-us/windows/uwp/input-and-devices/speech-recognition.
Local notifications and native integrations are the only features the Nectar mobile app does not include, because Ionic does not yet support a background worker for the Android and Windows platforms. If you are a developer and would like to add support for a background worker, see these links: https://github.com/transistorsoft/cordova-plugin-background-fetch, (Android) https://github.com/transistorsoft/cordova-plugin-background-fetch/issues/60 and (Windows) https://docs.microsoft.com/en-us/windows/uwp/porting/android-ios-uwp-map#app-lifecycle. Alternatively, it would be easy for Beeminder to configure Nectar with their existing push notification system for all three platforms and users would receive alerts faster than with local notifications: https://ionicframework.com/docs/native/push/.
7 new integrations
Nectar web and mobile apps
The Nectar web app is a significantly improved version of @galtsubery’s Beemind.me/Quantifier app: https://beemindernectar.herokuapp.com. It automatically gets data from supported integrations every hour at about 50 min and adds it to Beeminder goals. The Nectar web app includes many changes including support for (the highly requested feature of) adding more than one instance of a metric and support for adding integration goals from the Nectar mobile app. The Nectar web app includes new Facebook, Instagram, Twitter, Flickr, Wikipedia and World Community Grid integrations and it supports beemind.me’s eight original integrations.
To try out these six new integrations, either visit: https://beemindernectar.herokuapp.com or follow the instructions above to install the Nectar mobile app. Note: these integrations are for testing only and should not be used in Beeminder goals where money is at stake.
Nectar web app source code: https://github.com/beeminder-capstone/Nectar-Backend.
The Nectar web and mobile apps support a total of 32 integrations providers and provides a framework in which developers can easily add new metrics by just adding one file and modifying another (see steps below under Developers). The rest of the integration providers do not yet have metrics.
Here are the instructions on how to run the Nectar web app locally: https://github.com/beeminder-capstone/Nectar-Backend#build. This can easily be run on the Raspberry Pi hardware. If you are installing on Linux, see these lines for an idea of which packages are required in addition to Ruby based on your package manager: apt, yum or pacman (Note that SQLite is not required). The format for the OAuth redirect/callback URL is
[provider] is from this line: https://github.com/beeminder-capstone/Nectar-Backend/blob/develop/config/initializers/providers.rb#L9.
Steps to add a new metric for one of the 32 integrations providers:
- If the provider uses OAuth, make sure you have a “key” and “secret” and it is in the respective environment variables listed in your
- If this is the first metric for the provider:
- If the provider uses OAuth, uncomment out the provider gem in the
- Create an empty metrics folder for the provider:
bin/rails server(on Windows run:
ruby bin\rails server). Then go to: http://localhost:3000/ and make sure it loads.
- If the provider uses OAuth, add a client function to the providers adapter file (
\app\adapters\[provider]_adapter.rb). Go to: https://rubygems.org/, enter the provider gems name, click on the first result, then click on either “Homepage” or “Documentation” on the bottom right for instructions on what is necessary to do this.
- If the provider uses OAuth, uncomment out the provider gem in the
- Create a ruby file for each metric (
\app\metrics\[provider]\[metric_name].rb). Add functions to the adapter file to get data. Use the existing metric and adapter files as reference. Consult the provider gem info (above) and the provider’s API for documentation.
Beeminder Watchapp for Pebble
The watchapp automatically gets Pebble Health data from your Pebble Smartwatch every night at 11:59PM and adds it to one of your Beeminder Goals.
Instructions to install the Beeminder watchapp
The watchapp supports the Pebble Time, Pebble Time Steel, Pebble Time Round, Pebble 2 and Pebble Time 2 (Basalt, Chalk, Diorite and Emery hardware platforms). It will not work with the Pebble Classic and Pebble Steel (Aplite hardware platform) because they do not support Pebble Health.
Use package (recommended):
To install the watchapp, download it from your mobile device and install the watchapp by opening the
.pbw file (for iOS use “Open In…” and select the Pebble app). Note: this integration is for testing only and should not be used in Beeminder goals where money is at stake.
Beeminder watchapp for Pebble source code: https://github.com/beeminder-capstone/pebble.
Here are the instructions on how to build the Beeminder watchapp:
- Go to https://cloudpebble.net/.
- Click on “Import” > “Import From GitHub”.
- Give the project a name (such as “Beeminder”) and enter the GitHub URL (https://github.com/beeminder-capstone/pebble).
- Click “Compilation” > “Run Build”.
- To run it on a physical Pebble, click on “Phone” > “Install and Run” and make sure that the “Developer Mode” is enabled in the Pebble app.
- Or, to run it on an emulator, click any of “Basalt”, “Chalk”, “Diorite” or “Emery” to start the respective emulator (see the difference here: https://developer.pebble.com/guides/tools-and-resources/hardware-information/). Note: the config page will not work with the emulator because of the Beeminder OAuth.
If you want to send the data every hour, change this line: https://github.com/beeminder-capstone/pebble/blob/master/worker_src/c/background.c#L55 to this:
if(settings.config && tick_time->tm_min == 59 && step_data_is_available())
and change lines 350-355: https://github.com/beeminder-capstone/pebble/blob/master/src/c/main.c#L350 to this:
int count = (int)health_service_sum(settings.metric, now - SECONDS_PER_HOUR, now); if(settings.healthmetric == 2 || settings.healthmetric == 3) count /= 60; if(s_js_ready) sendgoal(now, count); else savegoal(now, count);
Note that the watchapp must be opened to send data, closing your selected watchface, which is why I elected to only send data once a day.
We would love everyone’s feedback and let me know if you have any questions.
Please visit tealdulcet.com to support this and my other software development.
Post written by: @tdulcet
Nectar remade and maintained by: @tdulcet
Nectar originally (Nov 2016 - Mar 2017) made by: @rnj, @tdulcet and others
Beeminder Watchapp for Pebble made and maintained by: @tdulcet