Skip to content

Implement file sharing - #14

Merged
eliasnaur merged 3 commits into
mainfrom
file-sharing
Jun 30, 2021
Merged

eliasnaur merged 3 commits into
mainfrom
file-sharing

Conversation

@eliasnaur

Copy link
Copy Markdown
Contributor

No description provided.

@eliasnaur
eliasnaur requested a review from DentonGentry June 26, 2021 20:39
@bradfitz

Copy link
Copy Markdown
Member

Yay! I'll take a look in a few hours.

@DentonGentry DentonGentry left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I downloaded this, built an APK, and have been able to share files back and forth with a Macbook. I've sent images and PDF files, I've sent one file and four files at a time. Everything has worked well, files arrive quickly and notifications appear when files are received.

Comment thread android/src/main/AndroidManifest.xml Resolved
Comment thread jni/jni.go Resolved
Comment thread jni/jni.go Resolved
Comment thread jni/jni.go Resolved
Comment thread cmd/tailscale/main.go Resolved
Comment thread cmd/tailscale/main.go Resolved
Comment thread cmd/tailscale/main.go Resolved
Comment thread cmd/tailscale/main.go Resolved
Comment thread cmd/tailscale/main.go Resolved
Comment thread cmd/tailscale/main.go Resolved
Comment thread cmd/tailscale/main.go Resolved
@eliasnaur

Copy link
Copy Markdown
Contributor Author

Ok to merge? Shall I do another release or do you want to?

@bradfitz

Copy link
Copy Markdown
Member

Yeah, LGTM. And yes, a release would be great, thanks!

@bradfitz

Copy link
Copy Markdown
Member

I get an error building this:

root@63968e99d1a6:~/tailscale-android# make tailscale-debug.apk
mkdir -p android/libs
go run gioui.org/cmd/gogio -buildmode archive -target android -appid com.tailscale.ipn -o android/libs/ipn.aar github.com/tailscale/tailscale-android/cmd/tailscale
go: downloading gioui.org v0.0.0-20210626160534-a87206c3647c
go: downloading gioui.org/cmd v0.0.0-20210623091900-5b8da35a798b
go: downloading github.com/akavel/rsrc v0.10.1
gogio: /usr/local/openjdk-8/bin/javac -target 1.8 -source 1.8 -sourcepath /build/go/pkg/mod/[email protected]/app/internal/wm -bootclasspath /build/android-sdk/platforms/android-29/android.jar -d /tmp/gogio-469261090/classes /build/go/pkg/mod/[email protected]/app/internal/wm/Gio.java /build/go/pkg/mod/[email protected]/app/internal/wm/GioActivity.java /build/go/pkg/mod/[email protected]/app/internal/wm/GioView.java failed: /build/go/pkg/mod/[email protected]/app/internal/wm/GioView.java:33: error: cannot find symbol
import android.view.WindowInsetsController;
                   ^
  symbol:   class WindowInsetsController
  location: package android.view
/build/go/pkg/mod/[email protected]/app/internal/wm/GioView.java:184: error: cannot find symbol
            insetsMask = WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS;
                         ^
  symbol:   variable WindowInsetsController
  location: class GioView
/build/go/pkg/mod/[email protected]/app/internal/wm/GioView.java:189: error: cannot find symbol
            insetsMask = WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS;
                         ^
  symbol:   variable WindowInsetsController
  location: class GioView
/build/go/pkg/mod/[email protected]/app/internal/wm/GioView.java:201: error: cannot find symbol
        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
                                                       ^
  symbol:   variable R
  location: class VERSION_CODES
/build/go/pkg/mod/[email protected]/app/internal/wm/GioView.java:212: error: cannot find symbol
        WindowInsetsController insetsController = window.getInsetsController();
        ^
  symbol:   class WindowInsetsController
  location: class GioView
/build/go/pkg/mod/[email protected]/app/internal/wm/GioView.java:212: error: cannot find symbol
        WindowInsetsController insetsController = window.getInsetsController();
                                                        ^
  symbol:   method getInsetsController()
  location: variable window of type Window
Note: /build/go/pkg/mod/[email protected]/app/internal/wm/GioView.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
6 errors

exit status 1
make: *** [Makefile:35: tailscale-debug.apk] Error 1

@bradfitz

Copy link
Copy Markdown
Member

WindowInsetsController was added in API level 30.

And we have:

android {
    compileSdkVersion 29
    defaultConfig {
        minSdkVersion 22
        targetSdkVersion 29

@bradfitz

Copy link
Copy Markdown
Member

@rosszurowski wants to play with an APK before we ship it to users, but I can't build the APK for him due to the dockershell make tailscale-debug.apk being broken right now.

@bradfitz

Copy link
Copy Markdown
Member

Still doesn't work. Same error.

@eliasnaur

Copy link
Copy Markdown
Contributor Author

Try again, I adjusted the Dockerfile as well.

@bradfitz

Copy link
Copy Markdown
Member

That works. I sent @rosszurowski an APK.

@bradfitz

Copy link
Copy Markdown
Member

Okay, all good here. Release at will. Thanks!

@eliasnaur
eliasnaur merged commit 10ded1b into main Jun 30, 2021
@eliasnaur
eliasnaur deleted the file-sharing branch June 30, 2021 09:11
@eliasnaur

Copy link
Copy Markdown
Contributor Author

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants