Elixir SDK
The Fostrom Device SDK for Elixir is well-documented on HexDocs. Refer to the documentation for setup instructions, more details, and examples.
The Fostrom Device SDK for Elixir is super-straightforward to use. All you need to do is add config to your config.exs
file, and the library will automatically start the Device Agent when you start your Elixir application.
If you wish to use different devices or even fleets for dev and prod, you can simply specify different config for each environment in Elixir.
It is recommended that you write a Handler
module using the use Fostrom.Handler
behaviour, and at least implement the handle_mail/1
function. This will allow you to process incoming mail. If you do not define this handler, all incoming mail is automatically acknowledged.
Although the library should already work well with Nerves, we’re working on testing and improving the Elixir SDK to integrate better with Nerves. Stay tuned for updates.