intentfilter

Dynamic BroadcastReceiver to Check Online Connectivity

房东的猫 提交于 2020-01-24 21:57:09
问题 I want to dynamically set up a BroadcastReceiver to check whether or not I am online ONLY when my app is running in the foreground. Within my main class, I created an an Intent Filter, a nested BroadcastReceiver Class and finally register/unregister the receiver within the onResume and onPause methods respectively. My question is, is there an an intent ACTION that I can add to my intent filter that checks for online connectivity? If not, how can I create this Dynamic Broadcast Receiver to

Android Deeplink with facebook not working - redirecting to play store instead of launching application

和自甴很熟 提交于 2020-01-23 03:54:05
问题 I am trying to deep link my application with facebook. My App Url is https:www.xyz.com/app Below is my intent filter: <intent-filter android:label="@string/app_name"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.BROWSABLE"/> <category android:name="android.intent.category.DEFAULT" /> <data android:scheme="https" android:host="www.xyz.com"/> </intent-filter> I am posting a link in facebook, when someone click on the link, the link is

Nfc and Intent-filter

感情迁移 提交于 2020-01-17 03:59:47
问题 I wrote a nfc text tag like this myscheme://company?page=2&poiId=140 Then i've created an Intent-filter like this in my manifest file in order to open my app (and then call a WS with informations from tag) <intent-filter> <action android:name="android.nfc.action.NDEF_DISCOVERED"/> <category android:name="android.intent.category.DEFAULT"/> <data android:mimeType="text/plain" android:scheme="myscheme" android:host="company"/> </intent-filter> If i remove scheme and host params from data tag so

Xamarin Android Start app using link with parameters

断了今生、忘了曾经 提交于 2020-01-16 11:32:32
问题 I have a problem. I created a IntentFilter so my app launches when clicked on a specific link. Here is my IntentFilter: [IntentFilter(new[] { Intent.ActionView }, Categories = new[] { Intent.CategoryDefault, Android.Content.Intent.CategoryBrowsable }, DataScheme = "myapplication.app" )] And here is the link: <a href='myapplication.app://'>here</a> But how can I pass a parameter (integer) in that link and how can I use that parameter in my C# code? 回答1: A complete URL Scheme protocol format

How to Disable a particular Intent-filter programmatically in Android?

荒凉一梦 提交于 2020-01-16 08:05:43
问题 I have a SplashScreen with 3 Intent-filters defined in Manifest like this - <activity android:name=".SplashScreen" android:screenOrientation="portrait" android:theme="@style/SplashTheme" android:windowSoftInputMode="stateAlwaysHidden"> <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.VIEW" /> <category android:name="android.intent

Android - Custom action in Broadcast Intent

此生再无相见时 提交于 2020-01-16 06:07:34
问题 I am trying to allow user to post comment when he is offline such that whenever wifi/internet is turned on his comment will be posted.Fot that I am using BroadCastReceiver.But the issue i am having is that it is never going inside if (intent.getAction().equals("commentpost")) if i try switching on wifi after clicking on postcomment.However it does go inside if (wifi.isAvailable() || mobile.isAvailable()) whenever i switch on wifi.I failed to understand where i am going wrong.My log shows

Android - Custom action in Broadcast Intent

。_饼干妹妹 提交于 2020-01-16 06:06:16
问题 I am trying to allow user to post comment when he is offline such that whenever wifi/internet is turned on his comment will be posted.Fot that I am using BroadCastReceiver.But the issue i am having is that it is never going inside if (intent.getAction().equals("commentpost")) if i try switching on wifi after clicking on postcomment.However it does go inside if (wifi.isAvailable() || mobile.isAvailable()) whenever i switch on wifi.I failed to understand where i am going wrong.My log shows

Android app enable NFC only for one Activity

。_饼干妹妹 提交于 2020-01-08 18:01:14
问题 Is it possible to enable NFC for only one activity in android for an NFC enabled application? I've read this, Reading NFC tags only from a particuar activity But the devices are still scanning for tags on all activities of the application. EDIT: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.nfccheckout" > <uses-feature android:name="android.hardware.nfc" android:required="true" /> <uses-permission android:name=

Making own Android App default for map intents

≡放荡痞女 提交于 2020-01-06 23:46:07
问题 I have been working on an android application which uses google maps it is map related application. i want my to be able to handle implicit intents like if user click on map link like Latitude and longitude my app should handle the intent and show that position on map. Like default Google Maps Application. Is it possible then what piece of code for intent specific activity? 回答1: Add an intent-filter in the Manifest so your app can respond to map URLs: <intent-filter> <action android:name=

Application not appearing in activity chooser whenever outgoing call is made using dailer

杀马特。学长 韩版系。学妹 提交于 2020-01-05 13:08:24
问题 What intent filter should be used so that my app is shown in activity chooser whenever outgoing call is made :like Viber and Skype are shown. I am using this filter: <receiver android:name="OutgoingCallReceiver" > <intent-filter> <action android:name="android.intent.action.ACTION_NEW_OUTGOING_CALL" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </receiver> with permission: <uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" /> still myApp