-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[MIUI-Android]The widget’s Hyperlink cannot open the URL #1514
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
Comments
Can you please provide the errors that were encountered? |
@andydotxyz The "am" function can be used on the mobile phone, and the "am" function can be used to successfully create folders and delete files. To traverse, use the previous source code "am" command, which is "err== nil".
|
I cannot replicate this issue, so I am asking for your help. |
"Am" runs without error, "err == nil". |
There must be some indication of it not working... if error is nil then perhaps there is some info on StdErr or StdOut? |
This issue should be fixed first - we cannot help diagnose the error without knowing why it is breaking. Can you try with android emulator?
You should not ignore errors like this. |
@andydotxyz @stuartmscott 1.The record corresponding to "am start" `I/Fyne ( 9402): 26 -------mo一一Command-------> D/VoldCmdListener( 151): CommandListener runCommand mkdir argv[2]:/storage/sdcard1/Android/data/org.golang.todo.a5/files/ W/Vold ( 151): Returning OperationFailed - no handler for errno 30 D/AndroidRuntime( 9423): D/AndroidRuntime( 9423): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<< D/AndroidRuntime( 9423): CheckJNI is OFF E/dalvikvm( 9423): ERROR: must specify non-'.' bootclasspath W/dalvikvm( 9423): CreateJavaVM failed: dvmClassStartup failed E/AndroidRuntime( 9423): JNI_CreateJavaVM failed I/Fyne ( 9402): 29 mo一一Command end <----` 2.The record corresponding to "Newapp.OpenUR" `I/Fyne ( 9402): 37 -------Newapp.OpenUR-------> D/AndroidRuntime( 9424): D/AndroidRuntime( 9424): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<< D/AndroidRuntime( 9424): CheckJNI is OFF E/dalvikvm( 9424): ERROR: must specify non-'.' bootclasspath W/dalvikvm( 9424): CreateJavaVM failed: dvmClassStartup failed E/AndroidRuntime( 9424): JNI_CreateJavaVM failed I/Fyne ( 9402): 37 Newapp.OpenUR end <--- ` 3."widget.NewHyperlink"对应的记录 |
This is progress, now we know the actual issue is:
Is this using a physical device or the android emulator? |
@stuartmscott |
Try with the emulator so we know whether it is an issue with your device or not |
I tried the latest mobile phones of three brands, and they all worked and opened the website. VMware virtual machine is equipped with Android-x86-5.1-rc1.iso, although it crashed in the end, |
What is special about this device I wonder? What is the manufacturer/model and are there any operator-customisations loaded? |
Mobile phone name: Hongmi mobile phone |
Ah, so the MIUI is not really Android I think. |
For what it's worth I am having the same problem on my Google Pixel 4a XL |
gets me
|
That is very helpful thank you @donatj. Is it possible for you find the appropriate entry in your android log? |
I just hit this too on Pixel 2 w/ Android 11 (though not using a
|
Nevermind, Sorry for the false positive. |
Finally figured out how to use logcat (sorry, I'm not primarily an Android dev)
|
Would it be possible to run a simple app on one of these devices to launch it using the activity API like this: That might help track down if it is solvable by removing dependency on the helper tool we invoke. |
Resolved on |
Describe the bug:
The official example generated [Android] APK can not open the URL link
https://github.com/fyne-io/fyne/tree/master/cmd/fyne_demo
I tried each of the following methods, but URL opening failed
=======
`
package main
import (
"net/url"
"log"
"os"
"fyne.io/fyne/app"
"fyne.io/fyne/widget"
)
func main() {
var giturl= "http://github.com"
}
func mo一一Command(giturl string){
var cmd1 = exec.Command("am", "start", "-a", "android.intent.action.VIEW","--user", "0","-d", giturl)
var cmd2 = exec.Command("/system/bin/am", "start", "-a", "android.intent.action.VIEW","-d", giturl)
var cmd3 = exec.Command("am", "start", "-a", "android.intent.action.VIEW","-d", giturl)
var cmd4 = exec.Command("am", "start", "-a", "android.intent.action.VIEW","-c","android.intent.category.BROWSABLE","-d", giturl)
var cmd5 = exec.Command("am", "start", "-a", "android.intent.action.VIEW","-c","android.intent.category.DEFAULT","-d", giturl)
var cmd6 = exec.Command("am", "start", "-a", "android.intent.action.VIEW","-c","android.intent.category.BROWSABLE","-d", giturl,"org.mozilla.firefox")
var cmd7 = exec.Command("am", "start", "-a", "android.intent.action.VIEW","-c","android.intent.category.DEFAULT","-d", giturl,"org.mozilla.firefox")
var cmd8 = exec.Command("am", "start", "-a", "android.intent.action.VIEW","-d", giturl,"com.android.browser")
}`
======================
AndroidManifest.xml
File added 100 permissions
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
....
....
....
Device (please complete the following information):
The text was updated successfully, but these errors were encountered: