German Fremd App in meiner App registrieren

Wolli013

Well-Known Member
Licensed User
Longtime User
Wer kann mir helfen die richtigen Einträge im Manifest zu erstellen?
Ich möchte Daten aus einer anderen App in meiner übernehmen und habe vom Hersteller folgende Informationen bekommen.
Doch leider habe ich es noch nicht hinbekommen.

Receive url reply on Android
To receive the reply in your app the following entry has to be added to the AndroidManifest.xml file:
This registers your app as handler for URLs starting with the scheme ‘newapp+application_identifier’. In the Java code of the application the onCreate/onNewIntent methods must be implemented to handle incoming intents.
Using the example url from before application_identifier should be replaced with mytestapplication to be able to receive a reply for that request.
To get the actual data of the reply one needs to implement the onCreate/onNewIntent methods and handle the incoming Intents there.
The received Intent will contain a uri in the following format (assuming the request was done with the example url):

<intent-filter>
<data android:scheme=”newapp+application_identifier”/>
<action android:name=”android.intent.action.VIEW”/>
<category android:name=”android.intent.category.DEFAULT”/>
<category android:name=”android.intent.category.BROWSABLE”/>
<intent-filter>
 

DonManfred

Expert
Licensed User
Longtime User
Deine Frage und der Beispielcode passen nicht zusammen.
mytestapplication kommt in dem beispielcode nicht vor

Poste bitte die Original Docu von der Library.
 

DonManfred

Expert
Licensed User
Longtime User
Also wenn ich das richtig verstehe, dann musst du einen Service anlegen (svcxyz hier)

proviers mal mit folgendem manifestcode

B4X:
AddReceiverText(svcxyz ,
<intent-filter>
<data android:scheme=”testoapp+${applicationId}”/>
<action android:name=”android.intent.action.VIEW”/>
<category android:name=”android.intent.category.DEFAULT”/>
<category android:name=”android.intent.category.BROWSABLE”/>
<intent-filter>
)

oder
B4X:
AddReceiverText(svcxyz ,
<intent-filter>
<data android:scheme=”testoapp+HIERDEINPACKAGENAME”/>
<action android:name=”android.intent.action.VIEW”/>
<category android:name=”android.intent.category.DEFAULT”/>
<category android:name=”android.intent.category.BROWSABLE”/>
<intent-filter>
)
 

Wolli013

Well-Known Member
Licensed User
Longtime User
Leider kommt ein Fehler

Fehler beim Parsen des Manifestskripts:
Modul main_br nicht gefunden (Manifesteditor)
 

Wolli013

Well-Known Member
Licensed User
Longtime User
AddManifestText(
<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

SetApplicationAttribute(android:theme, "@style/MyAppTheme")

CreateResource(values, theme.xml,
<resources>
<style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#FF0064A9</item>
<item name="colorPrimaryDark">#FF005896</item>
<item name="colorAccent">#FF0064A9</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
</style>
<style name="ToolbarMenu" parent="Base.ThemeOverlay.AppCompat.ActionBar">
<item name="android:textColorPrimary">#fff</item>
<item name="android:colorBackground">#FF0064A9</item>
</style>
</resources>
)
AddApplicationText(
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
)
AddReceiverText(Main,
<intent-filter>
<data android:scheme="testoapp+meinappname/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
)
 

Wolli013

Well-Known Member
Licensed User
Longtime User
Das mit dem Service war das Problem.
Jetzt bin ich ein stückchen weiter.
Danke
 
Top