Purple – Check NFC availability πŸŽ‰

:purple_circle: Purple

Purple, built exclusively[1] for Kodularβ„’ and with Rush, making it easier to build, allows any Kodularβ„’ developer to check the availability of NFC using a few blocks.

1 Purples icon is 128x128. The icon will appear larger when imported into App Inventor.


:dart: π™Ύπš—π™°πšπšŠπš™πšŠπšπšŽπš›πš‚πšπšŠπšπšŽπ™²πš‘πšŠπš—πšπšŽπš(πšŽπš—πšŠπš‹πš•πšŽπš : π™±πš˜πš˜πš•πšŽπšŠπš—) : πšŸπš˜πš’πš

The state of the NFC adapter has changed.

:lock: π™·πšŠπšœπš‚πšŽπšŒπšžπš›πšŽπ™½πšπšŒ() : π™±πš˜πš˜πš•πšŽπšŠπš—

Checks if secure NFC is supported.

:zap: π™Έπšœπ™½πšπšŒπ™΄πš—πšŠπš‹πš•πšŽπš() : π™±πš˜πš˜πš•πšŽπšŠπš—

If an NFC adapter exists, checks if NFC is enabled.

:lock: π™Έπšœπš‚πšŽπšŒπšžπš›πšŽπ™½πšπšŒπ™΄πš—πšŠπš‹πš•πšŽπš() : π™±πš˜πš˜πš•πšŽπšŠπš—

If secure NFC is supported, checks if secure NFC is enabled.

:zap: π™·πšŠπšœπ™½πšπšŒπ™°πšπšŠπš™πšπšŽπš›() : π™±πš˜πš˜πš•πšŽπšŠπš—

Checks if an NFC adapter exists.

:eye: πšƒπš˜πšπšπš•πšŽπ™°πšπšŠπš™πšπšŽπš›πš‚πšπšŠπšπšŽπš†πšŠπšπšŒπš‘πšŽπš›(πšπš˜πšπšπš•πšŽπš : π™±πš˜πš˜πš•πšŽπšŠπš—) : πšŸπš˜πš’πš

Toggle watching for NFC adapter state changes.

History

From initial release, Purple supports Androidβ„’ 5.0 and newer.


17 Likes

Great extension, may be helpful to me in my upcoming project :clap:

You may need to change the name for the event block OnAdapterStateChanged to only AdapterStateChanged because there is when before it :sweat_smile:

I like the way you write the topic :grin:

4 Likes

2021 Appathon

Hi all!

Following is a line from the 2021 Appathon FAQ.

You may use any extensions from MIT, or any free extension so long as you include a note from the extension author that it can be redistributed by MIT as part of the competition.

I’m not sure if this applies to free extensions, as I’m a bit confused by the sentence, however since my PMs are closed… Purple is allowed to be redistributed by MIT as part of the competition.

Good luck and have fun!

2 Likes

You may use any extensions from MIT, or any free extension so long as you include a note from the extension author that it can be redistributed by MIT as part of the competition.

One of the criteria for the competition is that the project must be built with and open in App Inventor 2 (meaning not Kodular). So, I believe they are referring to all free extensions that are fully compatible with App Inventor.

If your unsure, then ask the developer or test the extension to see if the your project compiles using App Inventor.

As FlailingOctopus mentions, extensions from either community (Kodular or App inventor) may still work with App Inventor. This extension is compatible.

1 Like

Purple is compatible with App Inventor. If you’re talking about being on the App Inventor community, then no, my extensions aren’t on there. However, I don’t think it should be an issue.

Hi, thank you so much for the extension!
I was wondering if it would be possible in a future update to include two blocks to activate and de-activate the NFC, or if it’s an already available feature (or if it’s impossible to implement it).
Thank you so much again!

1 Like

hello :sweat_smile:, your extension is very good :star_struck:, only there is an error when i use this block :smiling_face_with_tear:

That error exists because you didn’t toggle the receiver on in the first place.

NFC is activated, what should I change?:sweat_smile:

Your workspace should look more like this…


Same

Yeah, I can’t help you here. The extension works for me, not sure what you’re doing.

I did the same

Uploading: Screenshot_2022-09-18-19-59-28-479_com.android.chrome.jpg…

do you have telegram?

Your screenshot got stuck while uploading… you might want to upload it again…

Taifun

1 Like

Purple v0.2.0

Added

  • :sparkles: Added AdapterStateChanged as replacement for OnAdapterStateChanged

Fixed

  • :bug: Fixed ToggleAdapterStateWatcher failing to unregister the receiver

Removed

  • :wastebasket: Deprecated OnAdapterStateChanged, replace usages with AdapterStateChanged


Files

cc // @dennis_littawe1542 @Xoma

2 Likes

hey, NFC will not be disabled :sweat_smile:

thanks for update :heart_eyes:

NFC isn’t disabled because that’s not what Purple is for. It’s meant to watch for when NFC is dis/enabled.