Coder Social home page Coder Social logo

venryx / lucidlink Goto Github PK

View Code? Open in Web Editor NEW
17.0 4.0 4.0 16.24 MB

Lucid dreaming tools: dream journal, random-voice-prompt engine, user scripts

License: MIT License

JavaScript 0.44% Java 45.23% Objective-C 0.56% Batchfile 0.02% TypeScript 53.54% Starlark 0.21%
lucid-dreaming muse-headband muse eeg eeg-headband eeg-monitor dream-journal user-scripts react-native android

lucidlink's Introduction

LucidLink

Features:

  • Dream journal
  • Random-voice-prompt engine
  • Muse eeg monitor
  • User scripts

Download page: https://play.google.com/store/apps/details?id=v.lucidlink
Task list: https://trello.com/b/2ZYLJ2l1/lucid-link

Prepare

  1. Ensure prerequisite programs are installed: Git (+TortoiseGit), NodeJS, Android SDK, VirtualBox, Genymotion
  2. Ensure prerequisite Android SDK packages are installed: [...]
  3. Ensure prerequisite npm modules are installed: react-native-cli
  4. Ensure a virtual Android 5+ device is set up in Genymotion (which uses VirtualBox). (or have an Android 5+ device)

Install

  1. Clone this repo to your computer using git. (I use TortoiseGit)
  2. Open console in "Main" folder, and run "npm install".
  3. Fix metro-bundler file (temp; till I update react-native): https://stackoverflow.com/a/58798648/2441655
  4. Make sym-link from "./node-modules/react-native-libmuse" to "Source/react-native-libmuse". (temp)
  5. Replace "./node_modules/rn-spinner/index.js" with (temp): https://github.com/RNComponents/rn-spinner/blob/f6b817071b22ea491acfe144ea191470ac1e9172/index.js

Compile and run

  1. Start up the virtual Android device. (or connect Android device through usb/wifi)
  2. Compile the TS (TypeScript) files to JS, either by:
    2.A) Open the project in Visual Studio Code and run the build task. (ctrl+shift+b)
    2.B) Run npm run dev in main folder.
  3. Build the Android project, and start the JS packager, either by: 3.A) Run "react-native run-android" in main folder.
    3.B) Run "react-native start" in main folder, then press "Launch" in Android Studio. (preferred if Android Studio is open, to avoid file-usage clashes)
  4. On first launch, the js won't load, because the server address+port aren't specified. Set these through the react-native options panel, and reload.

Making changes

  • For JS (ui) changes, edit the files in "Main/Source". (I use Visual Studio Code)
  • For Java changes, edit the files in "Main/android/app/src". (I use Android Studio)

Troubleshooting

For common troubleshooting solutions (for developers), see Troubleshooting.md.

lucidlink's People

Contributors

venryx avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

lucidlink's Issues

Fix production compile error

Current workaround: increase console buffer size to 8000 or the like.

Going to keep this one open, since it requires either globally changing the console buffer size, or changing it every time you open a CMD window to start a production compile.

Production builds have error in lodash file

Here is the error:

02-03 20:50:29.862: E/ReactNativeJS(31290): Module AppRegistry is not a registered callable module (calling runApplication)
02-03 20:50:29.868: E/AndroidRuntime(31290): FATAL EXCEPTION: mqt_native_modules
02-03 20:50:29.868: E/AndroidRuntime(31290): Process: v.lucidlink, PID: 31290
02-03 20:50:29.868: E/AndroidRuntime(31290): com.facebook.react.common.JavascriptException: undefined is not a function (evaluating 'i.push({name:t,func:r})'), stack:
02-03 20:50:29.868: E/AndroidRuntime(31290): <unknown>@460:7681
02-03 20:50:29.868: E/AndroidRuntime(31290): <unknown>@458:38119
02-03 20:50:29.868: E/AndroidRuntime(31290): oe@458:28488
02-03 20:50:29.868: E/AndroidRuntime(31290): n@460:7595
02-03 20:50:29.868: E/AndroidRuntime(31290): <unknown>@460:8065
02-03 20:50:29.868: E/AndroidRuntime(31290): <unknown>@460:8223
02-03 20:50:29.868: E/AndroidRuntime(31290): o@2:517
02-03 20:50:29.868: E/AndroidRuntime(31290): e@2:326
02-03 20:50:29.868: E/AndroidRuntime(31290): i@2:188
02-03 20:50:29.868: E/AndroidRuntime(31290): <unknown>@457:95
02-03 20:50:29.868: E/AndroidRuntime(31290): o@2:517
02-03 20:50:29.868: E/AndroidRuntime(31290): e@2:326
02-03 20:50:29.868: E/AndroidRuntime(31290): i@2:188
02-03 20:50:29.868: E/AndroidRuntime(31290): <unknown>@456:126
02-03 20:50:29.868: E/AndroidRuntime(31290): o@2:517
02-03 20:50:29.868: E/AndroidRuntime(31290): e@2:326
02-03 20:50:29.868: E/AndroidRuntime(31290): i@2:188
02-03 20:50:29.868: E/AndroidRuntime(31290): <unknown>@455:101
02-03 20:50:29.868: E/AndroidRuntime(31290): o@2:517
02-03 20:50:29.868: E/AndroidRuntime(31290): e@2:326
02-03 20:50:29.868: E/AndroidRuntime(31290): i@2:188
02-03 20:50:29.868: E/AndroidRuntime(31290): <unknown>@429:197
02-03 20:50:29.868: E/AndroidRuntime(31290): o@2:517
02-03 20:50:29.868: E/AndroidRuntime(31290): e@2:326
02-03 20:50:29.868: E/AndroidRuntime(31290): i@2:188
02-03 20:50:29.868: E/AndroidRuntime(31290): <unknown>@372:2228
02-03 20:50:29.868: E/AndroidRuntime(31290): o@2:517
02-03 20:50:29.868: E/AndroidRuntime(31290): e@2:326
02-03 20:50:29.868: E/AndroidRuntime(31290): i@2:188
02-03 20:50:29.868: E/AndroidRuntime(31290): <unknown>@371:100
02-03 20:50:29.868: E/AndroidRuntime(31290): o@2:517
02-03 20:50:29.868: E/AndroidRuntime(31290): e@2:326
02-03 20:50:29.868: E/AndroidRuntime(31290): i@2:188
02-03 20:50:29.868: E/AndroidRuntime(31290): <unknown>@12:88
02-03 20:50:29.868: E/AndroidRuntime(31290): o@2:517
02-03 20:50:29.868: E/AndroidRuntime(31290): e@2:256
02-03 20:50:29.868: E/AndroidRuntime(31290): i@2:188
02-03 20:50:29.868: E/AndroidRuntime(31290): global code@563:9
02-03 20:50:29.868: E/AndroidRuntime(31290): 	at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:97)
02-03 20:50:29.868: E/AndroidRuntime(31290): 	at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:81)
02-03 20:50:29.868: E/AndroidRuntime(31290): 	at java.lang.reflect.Method.invoke(Native Method)
02-03 20:50:29.868: E/AndroidRuntime(31290): 	at java.lang.reflect.Method.invoke(Method.java:372)
02-03 20:50:29.868: E/AndroidRuntime(31290): 	at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:318)
02-03 20:50:29.868: E/AndroidRuntime(31290): 	at com.facebook.react.cxxbridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:158)
02-03 20:50:29.868: E/AndroidRuntime(31290): 	at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
02-03 20:50:29.868: E/AndroidRuntime(31290): 	at android.os.Handler.handleCallback(Handler.java:739)
02-03 20:50:29.868: E/AndroidRuntime(31290): 	at android.os.Handler.dispatchMessage(Handler.java:95)
02-03 20:50:29.868: E/AndroidRuntime(31290): 	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
02-03 20:50:29.868: E/AndroidRuntime(31290): 	at android.os.Looper.loop(Looper.java:135)
02-03 20:50:29.868: E/AndroidRuntime(31290): 	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
02-03 20:50:29.868: E/AndroidRuntime(31290): 	at java.lang.Thread.run(Thread.java:818)

In one of the "[something]\node_modules\lodash\index.js" files (not sure which one, as I did a replace all), an error occurs until we change lines 12285-12286:

        var key = lodashFunc.name,
            names = names = realNames[key] || (realNames[key] = []);

To this:

        var key = lodashFunc.name,
            names = realNames[key] && realNames[key].push ? realNames[key] : (realNames[key] = []);

While the above fixes it, would be nice to find a way of solving it with configuration files. (instead of brittle source-code changes)

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.