I read almost the entire forum, but I still couldn't find solutions on how to read a text file with the ".ged" extension, when a file is selected by the device's file manager.
I have to repeat the question again.
I found several manifest examples. For example:
None of the examples set the default value in the application settings.
Although the application is launched for the first time with the option to select "always" or "only now", it is impossible to change this choice later.
I wonder where these settings are saved?
Even if I delete the application and reinstall it, the device does not offer to make a choice.
If there is another application on the device for reading such files, then when you delete one of them, the remaining application will also read the file without the ability to change the choice.
What can be done?
And another question:
How can I find out the file name and path in the given example?
I have attached an example.
I have to repeat the question again.
I found several manifest examples. For example:
B4X:
AddActivityText(Main,
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http" android:host="*" android:pathPattern=".*\\.ged" />
<data android:scheme="https" android:host="*" android:pathPattern=".*\\.ged" />
<data android:scheme="content" android:host="*" android:pathPattern=".*\\.ged" />
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.ged" />
<data android:mimeType="*/*" />
</intent-filter>)
Although the application is launched for the first time with the option to select "always" or "only now", it is impossible to change this choice later.
I wonder where these settings are saved?
Even if I delete the application and reinstall it, the device does not offer to make a choice.
If there is another application on the device for reading such files, then when you delete one of them, the remaining application will also read the file without the ability to change the choice.
What can be done?
And another question:
How can I find out the file name and path in the given example?
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim In As Intent = Activity.GetStartingIntent
Dim Parametri As String = In.GetData
If Parametri<>Null Then
Activity.LoadLayout("print")
LabelInfo.Text="Print file: " & Parametri
Else
Activity.LoadLayout("main")
End If
End Sub
Attachments
Last edited: