Code Monkey home page Code Monkey logo

habitlabmobile's Introduction

HabitLab

HabitLab is a Chrome extension to help you build better habits online. HabitLab aims to help people achieve their goals online (ie, waste less time on Facebook) by trying out different interventions in their browsers and seeing what works best.

Users

Install HabitLab on the Chrome Web Store

Translators

Translate HabitLab on Transifex

Developers

You can write new interventions within HabitLab without any setup or sideloading: Write New Interventions for HabitLab

Otherwise, if you want to build and sideload the HabitLab chrome extension yourself: Developer Guide

See the Wiki for more documentation

Join the chat at https://gitter.im/habitlab/habitlab

habitlabmobile's People

Contributors

drewgregory avatar gkovacs avatar jcarroll54 avatar jgrace19 avatar kfo42 avatar svalderr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

shawnhowell

habitlabmobile's Issues

experiment to quantify effects of repeated exposure to interventions on effectiveness and attrition

objective: see how much showing users an intervention repeatedly has on their retention (hypothesis: after repeated exposure they will uninstall, aka low retention rates) and on efficacy (hypothesis: efficacy aka how long they spent will improve to a point and asymptote off)

interesting things we can then do as follow up:

differences among users for the optimum frequency of showing them an intervention.

ramp up in frequency. so start at every one minute and then increase frequency. or other non-linear approaches

can we detect potential attrition before it actually occurs? for example: perhaps the user starts touching or there's small accelerometer motions that indicate frustration

approach (implementation)

when users install the android app, we vary them among conditions for how frequently we show them the intervention

some have the interventions showing more frequently, some have them showing less frequently

accessibility service stops receiving events as soon as habitlab app is closed

curiously this occurs on my le max 2 (android 6.0.1) but not on my galaxy s3 running lineageos (android 7.1). so it may be device/ROM specific, or specific to particular android versions. probably want to check to see how widespread the bug is?

steps to reproduce

open habitlab app. turn on accessibility service

then close all habitlab windows. open habitlab again. it will prompt that the service is not running ( from checkAccessibilityPermission in PermissionUtil.js )

adding various console.warn to onAccessibilityEvent calls shows that the service continually gets the calls, until the habitlab app is closed.

can be reproduced in the version on the play store as well

will we need to run a foreground service or can this be resolved some other way?

accessibility service crashes, also manage targets shows "no results"

screenshot_2017-09-01-00-55-18

stack trace below, seems to be something related to the target apps in the accessibility service

09-01 00:55:51.703  6278  6278 I Gallery2/BitmapUtils: <isSupportedByRegionDecoder> mimeType image/jpeg
09-01 00:55:51.704  6278  6278 W ResourceType: No package identifier when getting name for resource number 0x00000000
09-01 00:55:51.705  6278  6278 W ResourceType: No package identifier when getting name for resource number 0x00000000
09-01 00:55:51.755  6278  6278 I Gallery2/BitmapUtils: <isSupportedByRegionDecoder> mimeType image/jpeg
09-01 00:55:51.755  6278  6278 I Gallery2/BitmapUtils: <isSupportedByRegionDecoder> mimeType image/jpeg
09-01 00:55:51.755  6278  6278 I Gallery2/BitmapUtils: <isSupportedByRegionDecoder> mimeType image/jpeg
09-01 00:55:51.764  1629  1670 I WindowManager: setAppVisibility(Token{6a67672 ActivityRecord{f41077d u0 com.stanfordhci.habitlab/com.tns.NativeScriptActivity, isShadow:false t4}}, visible=false): mNextAppTransition=TRANSIT_UNSET hidden=true hiddenRequested=true
09-01 00:55:51.764  3198  3238 I ActivityThreadEui: scheduleStopActivity com.tns.NativeScriptActivity show=false configChanges=0
09-01 00:55:51.779  6278  6278 I Gallery2/BitmapUtils: <isSupportedByRegionDecoder> mimeType image/jpeg
09-01 00:55:51.779  6278  6278 I Gallery2/BitmapUtils: <isSupportedByRegionDecoder> mimeType image/jpeg
09-01 00:55:51.779  6278  6278 I Gallery2/BitmapUtils: <isSupportedByRegionDecoder> mimeType image/jpeg
09-01 00:55:51.788  3198  3198 I ActivityThread: Finishing stop of ActivityRecord{de9b893 token=android.os.BinderProxy@77290d0 {com.stanfordhci.habitlab/com.tns.NativeScriptActivity}}: show=false win=com.android.internal.policy.PhoneWindow@3ce6729
09-01 00:55:51.791  6278  6278 I Gallery2/BitmapUtils: <isSupportedByRegionDecoder> mimeType image/jpeg
09-01 00:55:51.791  6278  6278 I Gallery2/BitmapUtils: <isSupportedByRegionDecoder> mimeType image/jpeg
09-01 00:55:51.825  3198  3198 W System.err: com.tns.NativeScriptException: 
09-01 00:55:51.825  3198  3198 W System.err: Calling js method onAccessibilityEvent failed
09-01 00:55:51.825  3198  3198 W System.err: TypeError: Cannot read property 'target' of undefined
09-01 00:55:51.825  3198  3198 W System.err: File: "file:///data/data/com.stanfordhci.habitlab/files/app/util/StorageUtil.js, line: 1036, column: 32
09-01 00:55:51.825  3198  3198 W System.err: StackTrace: 
09-01 00:55:51.826  3198  3198 W System.err: 	Frame: function:'exports.canIntervene', file:'file:///data/data/com.stanfordhci.habitlab/files/app/util/StorageUtil.js', line: 1036, column: 33
09-01 00:55:51.826  3198  3198 W System.err: 	Frame: function:'nextOnLaunchIntervention', file:'file:///data/data/com.stanfordhci.habitlab/files/app/interventions/InterventionManager.js', line: 1005, column: 21
09-01 00:55:51.826  3198  3198 W System.err: 	Frame: function:'onAccessibilityEvent', file:'file:///data/data/com.stanfordhci.habitlab/files/app/services/AccessibilityService.js', line: 158, column: 37
09-01 00:55:51.826  3198  3198 W System.err: 	at com.tns.Runtime.callJSMethodNative(Native Method)
09-01 00:55:51.826  3198  3198 W System.err: 	at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1043)
09-01 00:55:51.826  3198  3198 W System.err: 	at com.tns.Runtime.callJSMethodImpl(Runtime.java:925)
09-01 00:55:51.826  3198  3198 W System.err: 	at com.tns.Runtime.callJSMethod(Runtime.java:912)
09-01 00:55:51.826  3198  3198 W System.err: 	at com.tns.Runtime.callJSMethod(Runtime.java:896)
09-01 00:55:51.826  3198  3198 W System.err: 	at com.tns.Runtime.callJSMethod(Runtime.java:888)
09-01 00:55:51.826  3198  3198 W System.err: 	at com.habitlab.AccessibilityService.onAccessibilityEvent(AccessibilityService.java:13)
09-01 00:55:51.826  3198  3198 W System.err: 	at android.accessibilityservice.AccessibilityService$1.onAccessibilityEvent(AccessibilityService.java:658)
09-01 00:55:51.826  3198  3198 W System.err: 	at android.accessibilityservice.AccessibilityService$IAccessibilityServiceClientWrapper.executeMessage(AccessibilityService.java:751)
09-01 00:55:51.826  3198  3198 W System.err: 	at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:37)
09-01 00:55:51.826  3198  3198 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:102)
09-01 00:55:51.826  3198  3198 W System.err: 	at android.os.Looper.loop(Looper.java:148)
09-01 00:55:51.826  3198  3198 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:5669)
09-01 00:55:51.826  3198  3198 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
09-01 00:55:51.826  3198  3198 W System.err: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
09-01 00:55:51.826  3198  3198 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
09-01 00:55:51.848   545   591 I BufferQueueProducer: [Starting com.android.gallery3d] disconnect(P): api 2
09-01 00:55:51.855  1629  2866 I ActivityManager: startActivity have callingUid=Intent { flg=0x14008000 FromType=0x1 mCallingUid=10301 cmp=com.stanfordhci.habitlab/com.tns.ErrorReportActivity (has extras) }
09-01 00:55:51.855  1629  2866 I ActivityManager: START u0 {flg=0x14008000 FromType=0x1 mCallingUid=10301 cmp=com.stanfordhci.habitlab/com.tns.ErrorReportActivity (has extras)} from uid 10301 on display 0
09-01 00:55:51.857  1629  2866 I WindowManager: Set focused app to: AppWindowToken{b235ac3 token=Token{6a67672 ActivityRecord{f41077d u0 com.stanfordhci.habitlab/com.tns.NativeScriptActivity, isShadow:false t4}}} old focus=AppWindowToken{aaaf482 token=Token{e4f73cd ActivityRecord{6428564 u0 com.android.gallery3d/.app.PhotoActivity, isShadow:false t6}}} moveFocusNow=true
09-01 00:55:51.858  1629  2866 I WindowManager: Changing focus from Window{cb3418c u0 com.android.gallery3d/com.android.gallery3d.app.PhotoActivity} to null mode=0 updateInputWindows=true
09-01 00:55:51.858  1629  2866 I WindowManager: Input focus has changed to null oldFocusWindow=Window{cb3418c u0 com.android.gallery3d/com.android.gallery3d.app.PhotoActivity} updateInputWindow=true
09-01 00:55:51.858  1629  1712 I WindowManager: Focus moving from Window{cb3418c u0 com.android.gallery3d/com.android.gallery3d.app.PhotoActivity} to null
09-01 00:55:51.859  1629  2866 I ActivityManager: screenshotActivity async who=ActivityRecord{6428564 u0 com.android.gallery3d/.app.PhotoActivity, isShadow:false t6}
09-01 00:55:51.859  6278  6289 I ActivityThreadEui: schedulePauseActivity com.android.gallery3d.app.PhotoActivity finished=false userLeaving=true configChanges=0 dontReport=false
09-01 00:55:51.859  1629  1689 I BufferQueue: [unnamed-1629-8](this:0x7fa302dc00,id:8,api:0,p:-1,c:-1) BufferQueue core=(1629:system_server)
09-01 00:55:51.859  1629  1689 I BufferQueueConsumer: [unnamed-1629-8](this:0x7fa302dc00,id:8,api:0,p:-1,c:1629) connect(C): consumer=(1629:system_server) controlledByApp=false
09-01 00:55:51.859  1629  1689 I BufferQueueConsumer: [unnamed-1629-8](this:0x7fa302dc00,id:8,api:0,p:-1,c:1629) setConsumerName: unnamed-1629-8
09-01 00:55:51.859  1629  1689 I BufferQueueConsumer: [ScreenshotClient](this:0x7fa302dc00,id:8,api:0,p:-1,c:1629) setConsumerName: ScreenshotClient
09-01 00:55:51.859  1629  2807 E qti_sensors_hal: batch: handle 0 period_ns = 66667000, timeout = 0
09-01 00:55:51.860   545   545 I BufferQueueConsumer: [Starting com.android.gallery3d] disconnect(C)
09-01 00:55:51.860   545   545 I BufferQueue: [Starting com.android.gallery3d](this:0x7f8ce29800,id:47,api:2,p:-1,c:-1) ~BufferQueueCore
09-01 00:55:51.861  1629  1689 I BufferQueueProducer: [ScreenshotClient](this:0x7fa302dc00,id:8,api:1,p:545,c:1629) connect(P): api=1 producer=(545:/system/bin/surfaceflinger) producerControlledByApp=false

Not available in Canada

Why does Google Play say the app is not available in my country? What is the advantage of excluding Canada?

Where in the code is the exclusion? Would there be an issue if I forked the repo and submitted app so it could be installed and used in Canada?

experiment design

hypothesis

we hypothesize that novelty has benefits to effectiveness and/or attrition. we want to see whether this is true (this experiment) and measure its degree.

if this turns out to be true, in follow up studies we hope to be able to utilize this information for intelligently picking interventions / crowdsourcing them taking into account novelty

research questions

effectiveness: comparing the high novelty condition weeks to the low novelty condition weeks, is more time saved relative to baseline (shorter sessions)

attrition: on weeks where the high novelty condition is shown, is there a difference in uninstall rates (hopefully lower) relative to low novelty weeks

experiment itself

within subjects design

2 weeks in duration

each week users are either in a high novelty or low novelty condition

high novelty = show randomly chosen message from a large pool

low novelty = show same message always. (just chosen at install time randomly)

in all weeks, half the time we don't show any message. this is the control so we know how much the baseline time would have been without any interventions (hence we know how much time is being saved)

timeline

hopefully should launch before the end of this quarter

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.