Can I use NFC demo as a tester of foreground dispatch? - android

I tried NFC demo with my nexus s and it works well.
I want to call an app from background to foreground using foregrounddispatch example given by android sdk. Can I test foregrounddispatch example with NFC demo? Does anyone who tried this?
and if possible, which part I should edit? It is my first time to manage android app so please give me advice.
(foregrounddispatch example: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundDispatch.html )

Foreground dispatching requires the app to be in the foreground when scanning the tag. If I understand correctly, you want an app to launch upon scanning the tag. In this case, you need to create intent filters to handle the specific tag that you want to handle. See the dev guide for more information: http://developer.android.com/guide/topics/nfc/nfc.html or let me know if you need more guidance.

Related

Flutter: Wake up phone screen for alarm

I'm implementing an alarm application for Android with Flutter. With the android_alarm_manager package, I'm able to create and receive alarms. Furthermore, the package bringtoforeground is useful to bring the application to foreground when using another app. However, I haven't found a way to wake up the phone screen, yet. Does anybody knows how to do that? Also, It should be possible to have the application open without entering a password or something comparable.
Thank you in advance!
I've found an answer to my question. Additionally to the two packages said, there is a modification to be made in the AndroidManifest.xml file. Two more properties are needed in the activity tag as follows:
<activity
android:showWhenLocked="true"
android:turnScreenOn="true">

Bixby: I'm looking for a way to make alert or notification by Bixby

I am making a System which uses Bluetooth. But Bixby does not have Bluetooth API. So My plan was using Android Application and it catches notification then, send data by BlueTooth. But I recognize there is no Notification API in Bixby too.
So... Is there any idea to make a notification push by Bixby?
This feature is rather advanced. Here are some information that might help you.
Bixby is not allowed to edit contact or calendar other than using the already existing built-in capsule. Utterance example "add a meeting at 2 pm" would work fine already. There is no standard library for that.
If by "notification" you mean the pop up notification, there is a way to do so, but not directly from Bixby. The notification is an Android App notification that must sent by Android App. For example, let's call it MyEventApp and say you also have a MyCapsule. It is possible in MyCapsule using a deep link to request MyEventApp for a certain action (in this case, send notification or maybe schedule one)
For how to use deep link in Bixby please read https://bixbydevelopers.com/dev/docs/reference/type/result-view.app-launch as a starting point. There is also a github sample capsule.
The format for deep link (the payload-uri key in Bixby) depends on the MyEventApp and it's part of developer's responsibility to get the format correctly.
Please read carefully regarding https://bixbydevelopers.com/dev/docs/dev-guide/design-guides/design-principles.app-punch-out-policies Or your capsule submission might be rejected.

Is posible to read a NFC tag while the app is closed? - chariotsolutions phonegap-nfc plugin

I'm building an Android app with Cordova. I'm also using the chariotsolutions phonegap-nfc plugin, to read NFC/NDEF tags.
My app opens when I pass a tag but don't read the content, because the listeners aren't set already, so I want to know if doing some modification or something to the plugin, is posible to send the data and read it on the first tag passing.
I found this article where it explains how to do it while the app is in background. My app already do this, when is running it cames from background and read the tag. In my case is when the app is totally close, not in background.
Similar article: chariotsolutions phonegap-nfc plugin intent
I'd appreciate some help with this one, or any directions about it.
Thank you for the help!
Yes it's possible to launch a Cordova app with a NFC tag and process the NFC tag contents in your app.
See this sample project https://github.com/don/nfc-launch
There's an intent filter in AndroidManifest.xml for the NFC tag to launch the app. There's nfc.addMimeTypeListener in index.js to process the tag. See the README and comments in index.js for more info.

Currently Connected Receiver

I'm developing an Android app which supports Chromecast and to do that I'm using a combination of MinimalCastMediaRouteProvider + a custom receiver. All is well with the playback but the Chomecast UX guide has a section headed Cast menu functions appropriately for available receiver devices. It seems to state that when the Chromecast device is already connected to a service it should have a label indicating it, like the following with netflix:
The issue is that on my device all I see is this:
where it's missing the "casting xxx" while I have another device casting to it. Is there something I need to set in my receiver app or is it something in the Android code? I don't see any documentation about it.
You don't need to do anything on your side at this point; there is currently a bug in the preview sdk that doesn't let that to work properly.

Start Android application from NFC-tag with extra data

I can start my application by simply putting the phone on a NFC-tag. But I would like to take the idea one step further. Imagine a simple time-tracking application with two NFC-tags. The first will start (and download) the application and register a starttime. The other will also start (and download) the application, but register a stoptime.
My problem I'd like to solve is that I don't want my phone to know about these tags. The application should not need to have a list of tag-ids programmed and know what actions that is connected to each id. The tag should carry the information needed to start the action on the phone with the correct parameters.
Are there any information about how to accomplish this scenario? I have installed "nfc-eclipse-plugin" but doesn't understand how to use it to get my goal and even less how to get my application to read the extra data.
Thanks in advance
Roland
Your tags should be capable of storing NDEF messages. Such messages are automatically read out by Android and passed to your app in an Intent. Automatically installing and/or starting your app can be accomplished by putting an Android Application Record in your tag. Any additional information ("start" or "stop" indication) can be stored in a proprietary record.
You probably want to put the AAR as the last record of the NDEF message, as it is detected and acted upon by Android automatically, but is only supported since ICS. To make automatic installation work with Gingerbread, you can put an additional URI record or SmartPoster record with a Google Play Store link in it as the first record of the message. Your app should then filter (ACTION_NDEF_DISCOVERED) for this URI, so it will also start automatically on Gingerbread.

Categories

Resources