AIR For Andorid使用Intent-based URI记录
一、通过AIR 直接使用Intent-based URI 来打开外部APP,而不需任何的配置。不过要想同时支持IOS还是老老实实的用URI Schame的方式吧
1 2 3 4 5 6 7 8 | //其中data=12345是传递过去的参数,AIR中 通过InvokeEvent.Invoke可以获取到 var url: String = ( "intent:data=12345#Intent;" + "action=android.intent.action.VIEW;" + "category=android.intent.category.BROWSABLE;" + "component=air.com.xx.openApp/.AppEntry;" + "end" ); navigateToURL( new URLRequest(url)); |
二、通过AIR 直接使用Intent-based URI打开设置信息界面,这个功能无疑是一个福音啊
1 2 3 4 5 6 | url = ( "intent:#Intent;" + "action=android.intent.action.MAIN;" + "category=android.intent.category.LAUNCHER;" + "component=com.android.settings/.Settings;" + "end" ); navigateToURL( new URLRequest(url)); |
如果要打开具体的某个选项,将.Settings换成下面的这些就行了,不过好像不是全部都能用。wifi设置是可以的。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | .AccessibilitySettings .ActivityPicker .AirplaneModeEnabler .ApnEditor .ApnPreference .ApnSettings .AppWidgetPickActivity .ApplicationSettings .BandMode .BatteryInfo .BrightnessPreference .ChooseLockPattern .ChooseLockPatternExample .ChooseLockPatternTutorial .ConfirmLockPattern .CreateShortcut .CredentialInstaller .DateTimeSettings .DateTimeSettingsSetupWizard .DebugIntentSender .DefaultRingtonePreference .DevelopmentSettings .DeviceInfoSettings .Display .DockSettings .EditPinPreference .IccLockSettings .IconPreferenceScreen .InstalledAppDetails .LanguageSettings .LauncherAppWidgetBinder .LocalePicker .LocalePickerInSetupWizard .ManageApplications .MasterClear .MediaFormat .PhysicalKeyboardSettings .PrivacySettings .ProgressCategory .ProxySelector .RadioInfo .RingerVolumePreference .RunningServices .SdCardIntentReceiver .SdCardSettings .SecuritySettings .Settings .SettingsLicenseActivity .SettingsSafetyLegalActivity .SoundAndDisplaySettings .TestingSettings .TestingSettingsBroadcastReceiver .TextToSpeechSettings .UsageStats .UserDictionarySettings .Utils .WirelessSettings .ZoneList .ZonePicker .bluetooth.BluetoothDevicePreference .bluetooth.BluetoothDiscoverableEnabler .bluetooth.BluetoothEnabler .bluetooth.BluetoothEventRedirector .bluetooth.BluetoothNamePreference .bluetooth.BluetoothPairingDialog .bluetooth.BluetoothPairingRequest .bluetooth.BluetoothSettings .bluetooth.CachedBluetoothDevice .bluetooth.CachedBluetoothDeviceManager .bluetooth.ConnectSpecificProfilesActivity .bluetooth.DockEventReceiver .bluetooth.DockService .bluetooth.LocalBluetoothManager .bluetooth.LocalBluetoothProfileManager .bluetooth.RequestPermissionActivity .bluetooth.RequestPermissionHelperActivity .bluetooth.SettingsBtStatus .vpn.AuthenticationActor .vpn.L2tpEditor .vpn.L2tpIpsecEditor .vpn.L2tpIpsecPskEditor .vpn.PptpEditor .vpn.Util .vpn.VpnEditor .vpn.VpnProfileActor .vpn.VpnProfileEditor .vpn.VpnSettings .vpn.VpnTypeSelection .wifi.AccessPointDialog .wifi.AccessPointPreference .wifi.AccessPointState .wifi.AdvancedSettings .wifi.WifiEnabler .wifi.WifiLayer .wifi.WifiSettings .wifi.WifiStatus |