Simple Authentication - Associate a device with a customer

Hi Everyone,

After a few months of reviewing the documentation and community posts I finally created a working Android app! I really appreciate everyone’s help! The app allows you to login using an existing particle account, list the devices and interact with the selected device. I plan to share this project on hackster.io soon.

If I wanted to create a commercial product out of this how do I go about adding the "create and claim device using Simple Authentication " . Where do I add the OAuth client ID and secret and how can the customer claim the device? Any sample code someone willing to share? This would be for the 3rd gen devices. How do you associate a device with a customer? Can they type in the Device ID to a text box? Sorry for all the questions.

Hi,
I think you would like to use Particle’s Android SDK.
If it is similar to the JS SDK, then the function calls will guide you on where to put what, from the methods signature and their docs.

Good luck!
Gustavo.

Thanks @gusgonnet

This helps. Can I claim a device just by typing the device ID and not using the QR code?

I think so, I think the QR code is a convenient way of getting the deviceID. Maybe even the app you are developing can scan the QR code, which may require you to print a QR in the outside of your product.

Ok. Where do I add the OAuth client ID and secret within the Android app.

@jensck_particle

This is covered in the docs:
https://docs.particle.io/reference/SDKs/android/#oauth-client-configuration

How do you create a claim code for a cellular device?

I would search for a getClaimCode or similar API in the SDK (at least it is present in the JS SDK)