Task #3204
merge kerplapp into fdroid
Status: | Closed | Start date: | 04/06/2014 | |
---|---|---|---|---|
Priority: | Urgent | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | Integrate Kerplapp into FDroid | |||
Component: |
Description
kerplapp works, so time to merge it into FDroid for one stop shopping!
Associated revisions
move Utils to match FDroid
move Apk and App classes to FDroid packages
These will then have to be normalized to FDroid's version.
AppEntry.loadLabel() mirrors PackageItemInfo.loadLabel()
make AppEntry.loadLabel() take a PackageManager as the argument, and clean
up the code surrounding it a bit.
purge some dead code: Utils.getBinaryHash(File apk)
Only Utils.getBinaryHash(File apk, String algo) is used.
port to FDroid's current Apk class
- changes in Kerplapp's Apk class need to be folded into FDroid's
- FDroid's ValueObject is included only to support porting
purge apkSourcePath and apkSourceName from Kerplapp's Apk.java
These were not needed at all, so we should not introduce them.
rename Apk.file to Apk.installedFile for clarity
This File is referring to the installed .apk file on the device's local
filesystem, i.e. in /data/app
port to FDroid's current App class
No real changes needed, just removed the unneeded init stuff in App() and
included some code from FDroid's App.java to make future comparison easier.
a quick cosmetic sync to FDroid's Repo.java
set minSdkVersion to android-7 aka 2.0
This is what FDroid will be moving to in order to support appcompat-v7
use global, static properies in Application for local repo state
The Application class is meant to provide a place to store global state of
the app, so let's use it! FDroid uses it already, its called FDroidApp, so
the calls will get a lot shorter once in FDroid since KerplappApplication
will be replaced by FDroidApp.
Don't fear the global static properties! Getters and setters suck often.
Or maybe I've just been too deep in Python these days ;)
rename KerplappApplication to FDroidApp
rename AppSelectActivity to SelectLocalAppsActivity
rename KerplappActivity to LocalRepoActivity
rename net.binaryparadox.kerplapp.repo to org.fdroid.fdroid.localrepo
rename LocalRepo to LocalRepoManager
rename net.binaryparadox.kerplapp.network to org.fdroid.fdroid.net
move getDefaultRepoName() to org.fdroid.fdroid.Utils
org.fdroid.fdroid.Utils is the current FDroid location for static utility
methods.
refactor webserver class into much simplified NanoHTTPD subclass
The SimpleWebServer.java example had a lot more stuff than we needed in it,
plus it had some code that was only supported on android-9 or higher. I
stripped out anything that is not currently needed and merged
KerplappHTTPD and SimpleWebServer into a single class: LocalHTTPD.
This should now work down to android-7 at least.
generate QR Codes internally based on ZXing's core.jar
This app needs to be able to generate QR Codes regardless of what other
app might be installed, so zxing's core.jar needs to be embedded in this
app.
This also includes two classes which are modified versions of ZXing classes
that allow the generation of QR Codes without the Barcode Scanner app being
installed:
https://stackoverflow.com/questions/4782543/integration-zxing-library-directly-into-my-android-application
The classes are src/com/google/zxing/encode/Contents.java which is a copy
of zxing/android/src/com/google/zxing/client/android/Contents.java; and
src/com/google/zxing/encode/QRCodeEncoder.java which is a heavily stripped
and modified version of
zxing/android/src/com/google/zxing/client/android/encode/QRCodeEncoder.java
refs #3204 https://dev.guardianproject.info/issues/3204
refs #2470 https://dev.guardianproject.info/issues/2470
QR Code image generation into AsyncTask to keep things snappy
Generating the QR Code image can take some time, so do it in an AsyncTask
which then updates the ImageView once the QRCode is complete. This will be
used for the kerplapp repo swapping process.
refs #3204 https://dev.guardianproject.info/issues/3204
refs #3201 https://dev.guardianproject.info/issues/3201
nanohttpd submodule for supporting local HTTP repos
This webserver is the core of the kerplapp swap local repo when used over
IP connections (WiFi). It is the smallest Java webserver we could find. It
is included as a git submodule, but then only the actual source files that
are needed are included. They are symlinked in src/.
The git repo used is the one that we submitted upstream as a pull request.
The pull request contains changes required to support https://. It has not
yet been accepted, so we cannot yet use the official repo. Once the pull
request is included, this should be switched to the latest release in the
official git repo.
https://github.com/eighthave/nanohttpd
https://github.com/NanoHttpd/nanohttpd/pull/107
monitor Wifi changes with BroadcastReceiver/Service
The local repo will need to both have current wifi settings in order to
send the correct IP address, SSID, etc. Also, this could be used to handle
interrupted downloads and updates, but that is not included in this commit.
Activity/Service for running a local repo via http://
This is a skeleton for the upcoming local repo (aka swap aka Kerplapp).
Right now, it just provides an Activity for controlling a Service which
manages a local webserver (nanohttpd). Next, it will be wired up to the
local repo created via a dedicated Activity for managing the list of apps
included in the local repo.
build a local repo from a list of installed APKs
Wire up the "Setup Repo" button on the Local Repo view to generate an
FDroid repo on the device that is hosted with the local webserver. This
also generates an index.html for when people navigate to the local repo via
a browser. This index.html will allow them to both download FDroid and to
setup the repo on the device running the webserver on the local FDroid.
refs #3204 https://dev.guardianproject.info/issues/3204
refs #2668 https://dev.guardianproject.info/issues/2668
add wizard for sending FDroid to another device via WiFi/QR
This is a little helper to direct people to get a new device to download
FDroid from another device that already has it. It first prompts them to
join the same wifi network, and offers a QR Code to associate to the same
wifi. The next step is a QR Code for getting the URL to the local repo.
The index.html on that local repo includes a download link for FDroid and
a repo link to the local repo.
add Activity to choose which installed apps are in the local repo
This gets the data about which apps are installed from the ContentProvider
that pserwylo recently added for data about "Installed Apps" and presents
a list view for the user to select from by touching each line. Then if the
user chooses "Update Repo", it will regenerate the local repo based on the
current selection. It will always include FDroid in the local repo.
fixes #3232 https://dev.guardianproject.info/issues/3232
refs #3204 https://dev.guardianproject.info/issues/3204
init SelectLocalApps list from the apks in the local repo
When FDroid has been started, this checks the symlinked APKs in the local
repo and uses those package names to build up the list of selected local
apps. This gives the SelectLocalApps experience continuity across app
restarts.
History
#1 Updated by hans over 3 years ago
- Target version changed from improved security/usability to Integrate Kerplapp into FDroid
#3 Updated by hans over 3 years ago
- Status changed from New to Closed
the kerplapp core is in the official 0.67-test release!