Hirdetés
- sziku69: Szólánc.
- sziku69: Fűzzük össze a szavakat :)
- Luck Dragon: Asszociációs játék. :)
- mefistofeles: Az elhízás nem akaratgyengeség!
- GoodSpeed: Windows 11 PRO FPP (Full Packaged Product) - Retail, Box, dobozos
- Elektromos rásegítésű kerékpárok
- gban: Ingyen kellene, de tegnapra
- ldave: New Game Blitz - 2026
- GoodSpeed: Daikin FTXF35E / RXF35F Sensira 3,3 kW Inverteres klíma - a Sztori
- D1Rect: Nagy "hülyétkapokazapróktól" topik
Új hozzászólás Aktív témák
-
PumpkinSeed
addikt
válasz
[KgP].Robot
#4321
üzenetére
A terv most:
PluginActivity mint Main. Ha nincs URL akkor company://welcome, ha van akkor company://upload-ra intent. A probléma, amit nem értek miért nem működik:
React oldalon van a Linking package ami elkapja az ilyen beérkező kéréseket és kezeli őket. Amikor meghívom ezt:
adb shell am start -W -a android.intent.action.VIEW -d "company://$1" com.company/.MainActivityakkor működik, de amikor ezt csinálom a PluginActivity-ből, akkor nem (ez csak átküld a MainActivity-be, de az URL-t a Linking nem kapja meg, szóval félig működik):
Intent intent = new Intent();
String uriString = "company://welcome";
intent.setData(Uri.parse(uriString));
startActivity(intent);Az ide tartozó React Native rész:
componentWillMount() {
Linking
.getInitialURL()
.then(event => this.handleOpenURL(event))
.catch(console.error);
Linking.addEventListener('url', this.handleOpenURL);
this.props.loadCredentials();
}
handleOpenURL(event) {
console.log('Event:');
console.log(event);
if (event === null || event.url === undefined || Helpers.isObjectEmpty(event)) {
this.props.setWelcomeRedirect(true);
return 0;
}
var res = event.url.split("#");
switch (res[0]) {
case `${Config.APP_SCHEMA}upload`:
Actions.Upload();
break;
default:
Actions.Home();
}
}Az utolsó módosított Manifest.xml:
<application
android:name=".MainApplication"
android:allowBackup="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme">
<activity
android:name="com.company.MainActivity"
android:launchMode="singleTask"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="company"
android:host="*" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<activity android:name="com.company.PluginActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/vnd.sony.scan3d" />
</intent-filter>
</activity>
</application>
Új hozzászólás Aktív témák
- 27% - Gamemax GAMER PC! 7500F / RTX 5070 / 32GB DDR5 / 1TB SSD /
- 27% - Erazer P20 GAMER PC! i7-14700F / RTX 4070 / 16GB DDR5 / 1TB NVMe / B760
- LENOVO L13 Yoga 360 touch - 13,3" - i5 10210U, 8GB RAM, SSD, jó akku, - számla, 6 hó gar
- Lenovo ThinkPad L13 Gen 3 13,3" - i5 1235U, 16GB RAM, SSD, jó akku, magyar bill. - számla, 6 hó gar
- Asus Maximus IX Apex (Z270) / Beszámítás OK!
- Sony PS3/PS4/PS5 és kézikonzolok Okosítása és Szoftveres szintű javítása - MÁR 13.00-S PS4 IS!
- Xiaomi 12T 128GB, Kártyafüggetlen, 1 Év Garanciával
- Telefon felvásárlás!! iPhone 14/iPhone 14 Plus/iPhone 14 Pro/iPhone 14 Pro Max
- iPhone 14 Pro 128GB 100% (1év Garancia)
- Apple iPhone 13 128GB,Átlagos,Adatkabel,12 hónap garanciával
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
