Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Near Field Communication with Android Cookbook
  • Table Of Contents Toc
Near Field Communication with Android Cookbook

Near Field Communication with Android Cookbook

By : Subtil
4 (1)
close
close
Near Field Communication with Android Cookbook

Near Field Communication with Android Cookbook

4 (1)
By: Subtil

Overview of this book

An easy-to-follow guide, full of hands-on examples of and real-world applications. Each recipe is explained and placed in context. If you want to learn how to create NFC-enabled Android applications, this is the book for you. Perhaps you already know a bit about Android application developments but have never used NFC, or perhaps you know a little about NFC android development but want some more advanced features and examples. In either case, this book will get you up and running quickly. You are expected to have Android programming knowledge.
Table of Contents (12 chapters)
close
close
11
Index

Configuring a Wi-Fi network


I'm sure you've experienced friends asking you for your Wi-Fi password when they come over, and I bet that most times the answer is "Don't remember," "I'm not sure," or "Let me check the router sticker." In this recipe, we will learn how to create an application to write a simple Wi-Fi network configuration to an NFC tag that allows us to stick it somewhere around the house.

How to do it...

We will store three Wi-Fi network fields, the SSID, the security type, and the password in the tag. When we read it, we will add the network to our device and enable the Wi-Fi adapter:

  1. Open Eclipse and create a new Android application project named NfcBookCh9Example2 and package named nfcbook.ch9.example2.

  2. Make sure the AndroidManifest.xml file is correctly configured. Refer to the Requesting NFC permissions recipe in Chapter 1, Getting Started with NFC.

  3. Request for permission to change the Wi-Fi adapter state by adding the following lines of code to AndroidManifest.xml:

    <uses...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Near Field Communication with Android Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon