New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making it work on devices without sdcards #32
Conversation
Batphone should be able to run on a device without sdcard. Use ServalBatPhoneApplication.getStorageFolder() for retrieving the sdcard folder if it is present, an internal storage folder otherwise. This is necessary but not sufficient, because Rhizome *needs* sdcard.
Rhizome *needs* sdcard. If no sdcard is present on the device, then rhizome must not be called. A feature to disable it was already implemented, just add: rhizome.enable=0 to serval.conf (don't forget '\n'). But it was not read by the Android application not to call rhizome functions. This commit disable rhizome calls and avoids to make the app crash when no sdcard is present. It needs the modifications done on 'serval-dna' submodule.
Hi, |
So running your new "servald rhizome enabled" is equivalent to "servald config get rhizome.enabled"? I don't think getStorageFolder() should ever return "/BatPhone". I'm tempted to drop this "feature" of remembering your phone number between installs anyway, it's not that time consuming to enter a new number and we aren't backing up your private key so you are effectively a different person as it is. Otherwise this is pretty good. |
@gardners @lakeman Just a tiny problem: it returns the config value "as it is" in serval.conf. For boolean values, you can indifferently use {"on", "yes", "true", "1"} (resp. {"off", "no", "false", "0"}). For ®om |
Hello, On Fri, Oct 5, 2012 at 3:22 PM, Jeremy Lakeman notifications@github.comwrote:
Paul.
|
I've pulled your changes into my repo, with some slight changes. I'll push them manually once I've also tidied up some other issues I mentioned above and had a chance to re-test. |
Most changes have now been applied manually. With some further path related changes built on top. |
I tried to use a device without sdcard, and the application crashes.
The first commit (c5923b3) essentially allows to store serval-mesh.db in internal storage if there is no sdcard.
But after that, rhizome still tries to use /sdcard storage. We could modify its path in serval.conf, but we can also disable rhizome. Such an option was partially implemented (adding "rhizome.enable=0" in serval.conf), but 2 things were missing:
The second commit (efc94c5) fixes a part of 2).
Two commits in serval-dna (ad3b316 and c31c1fe) fix 1) and the rest of 2).
After these changes, I successfully phoned another device (without root access, with a wifi router) on a Motorola Milestone Android 2.2, having no sdcard (disabling rhizome).
Regards,
®om