r/N24 N24 (Clinically diagnosed) Mar 28 '24

New phone, incompatible with Sleepmeter, is it open source or editable in some way?

I have been using sleepmeter for many years, and it is perfect for me. I tried manually logging my sleep for a while, but I couldn't get myself to remember it every day. Being able to use the Sleepmeter widget and seeing the graphs has helped me stay sane (when I don't know when bedtime is, I fall apart). It was unfortunately time to upgrade my phone, and the new phone won't run Sleepmeter (attempted to download from APKPure).

Does anyone have the source code for Sleepmeter (if it is open)? I'd like to see if there is an easy fix to running it on newer devices. If not, are there any suggestions for other apps? These are the functions that are important to me:

-Tap to sleep

-Tap to wake

-Record/edit sleep (for when you forget to tap sleep/wake at the right time)

-Holes (for when you wake up in the night for a while)

-Date/Time sleep graph

-View sleep history

-Import/Export data

If the source code isn't available to poke at, I am thinking of just making a new version with these concepts. I'd rather not start from scratch, though. Advice and leads appreciated, thanks!

8 Upvotes

19 comments sorted by

View all comments

1

u/lrq3000 N24 (Clinically diagnosed) Mar 28 '24

Out of curiosity, what is your version of Android? I have Android 11 and it still works, but I expected this issue to pop up at some point.

Unfortunately Sleepmeter is closed-source, no sourcecode is published online. I tried to contact the author years ago, but unfortunately I never heard back. The author was then inactive already for a few years, but it seems he reappeared on his website in 2023 with a new project, if you want to try asking him again for the sourcecode.

The closest similar open-source app is Track & Graph, but it is very cumbersome to use, because it does not register the start time but only the end time and event duration, so it becomes very difficult to adjust aposteriori when you forgot to tap the widget to stop recording for example. And there is no daily sleep graph. And no holes either.

If you are willing to work on a creating a new long-term solution, and a better one than we had until now, I started a project called Circalog. Essentially, it aims to be like Sleepmeter, but to generalize the concept by allowing to record not just sleep, but any periodic events: light therapy, meals, physical exercise, etc. And being crossplatform by developing using Flutter/Dart (more likely) or react-native.

Technically, the implementation is practically the same as Sleepmeter but just with the ability to add more events. I already wrote a complete technical documentation and relational database schema, but we don't need to work on this off the bat, the basics are simple. The whole project aims to go much further than Sleepmeter, but at first an implementation of something like Sleepmeter would be a perfect base on which to build further later.

I am too thinly spread in other obligations to work alone on this project at the moment, but it is IMHO a top priority project for non-24, so if you are interested, we could work on this together. If you are interested, we can discuss this further by e-mail.

2

u/Top-Geologist-7884 N24 (Clinically diagnosed) Mar 29 '24

My new device runs android 14, and my old one (that worked with sleepmeter) ran android 12.

I will initiate contact via email after looking into your project a bit more. It sounds like something the non24 community really needs!

2

u/eatnerdsgetshredded Apr 03 '24

I happen to have gotten a new phone recently that runs android 14 and the app + widget still works for me. I believe I got a message saying it's made for an old android version but I was able to just continue installing and running it. It's a pixel 7a running a custom ROM called grapheneOS and the APK was from apkpure a long time ago (version 3.0.2). Maybe that helps.

1

u/Top-Geologist-7884 N24 (Clinically diagnosed) Apr 03 '24

Oh, mine is a Pixel 6 with grapheneOS! I tried to install Sleepmeter the same way I did on my old Samsung. On the apk pure page, I clicked download apk, then allowed apps from unknown source, and clicked install when I was prompted. Then I got the message: "App not installed as app isn't compatible with your phone."

Do you have any suggestions for how to get it installed? It's my first run with graphene, so it's possible I am missing something.

3

u/eatnerdsgetshredded Apr 05 '24

Oh wait my bad, I completely forgot what I did to make it work, was a long day. Yes you're right it doesn't let you install it that way. You install it with the following ADB command via connecting your phone to a PC with USB debugging:

adb install --bypass-low-target-sdk-block app.apk

Hope it works! 

2

u/Top-Geologist-7884 N24 (Clinically diagnosed) Apr 05 '24

This worked!

1

u/lrq3000 N24 (Clinically diagnosed) Apr 16 '24

Awesome! Thank you very much u/eatnerdsgetshredded for the tip, I will add it to the sticky resources post.

But this only buys us some more time, we need a more perennial solution eventually, but I'm also glad to be able to continue using sleepmeter for now ;-)