-
Notifications
You must be signed in to change notification settings - Fork 0
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
app,io: related to deeplink #1
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Egon Elbre <[email protected]>
Signed-off-by: Egon Elbre <[email protected]>
│ sec/op │ sec/op vs base │ SplitCubic/4-10 37.36n ± 0% 36.16n ± 0% -3.21% (p=0.000 n=10) SplitCubic/8-10 74.53n ± 0% 72.21n ± 0% -3.12% (p=0.000 n=10) SplitCubic/16-10 149.3n ± 1% 144.5n ± 0% -3.22% (p=0.000 n=10) SplitCubic/33-10 340.1n ± 0% 334.4n ± 0% -1.65% (p=0.000 n=10) Signed-off-by: Egon Elbre <[email protected]>
Now, it's possible to launch one Gio app using a custom URI scheme, such as `gio://some/data`. This feature is supported on Android, iOS, macOS and Windows, issuing a new deeplink.Event, containing the URL launched. If the program is already opened, one deeplink.Event will be sent to the current opened app. Limitations: On Windows, if the program uses deeplink (compiled with `-deeplink`), then just a single instance of the app can be open. In other words, just a single `myprogram.exe` can be active. Security: Deeplinking have the same level of security of clipboard. Any other software can send such information and read the content, without any restriction. That should not be used to transfer sensible data, and can't be fully trusted. Setup/Compiling: In order to set the custom scheme, you need to use the new `-deeplink` flag in `gogio`, using as `-deeplink gio` will listen to `gio://`. If you are not using gogio you need to defined some values, which varies for each OS: macOS/iOS - You need to define the following Properly List: ``` <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLSchemes</key> <array> <string>yourCustomScheme</string> </array> </dict> </array> ``` Windows - You need to compiling using -X argument: ``` -ldflags="-X "gioui.org/app.schemesDeeplink=yourCustomScheme" -H=windowsgui" ``` Android - You need to add IntentFilter in GioActivity: ``` <intent-filter> <action android:name="android.intent.action.VIEW"></action> <category android:name="android.intent.category.DEFAULT"></category> <category android:name="android.intent.category.BROWSABLE"></category> <data android:scheme="yourCustomScheme"></data> </intent-filter> ``` That assumes that you still using GioActivity and GioAppDelegate, otherwise more changes are required. Signed-off-by: inkeliz <[email protected]>
Signed-off-by: inkeliz <[email protected]>
Signed-off-by: inkeliz <[email protected]>
Signed-off-by: inkeliz <[email protected]>
Signed-off-by: inkeliz <[email protected]>
Signed-off-by: inkeliz <[email protected]>
Signed-off-by: inkeliz <[email protected]>
Signed-off-by: inkeliz <[email protected]>
Signed-off-by: inkeliz <[email protected]>
Signed-off-by: inkeliz <[email protected]>
discussion at gioui#117 (comment) Signed-off-by: Mearaj Bhagad <[email protected]>
Signed-off-by: Mearaj Bhagad <[email protected]>
Signed-off-by: Mearaj Bhagad <[email protected]>
69b0574
to
b38ddc0
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
discussion at gioui#117 (comment)