```java Amplify.Auth.fetchDevices( devices -> { for (AuthDevice device : devices) { Log.i("AuthQuickStart", "Device: " + device); } }, error -> Log.e("AuthQuickStart", "Fetch devices failed with error: " + error.toString())); ``` ```kotlin Amplify.Auth.fetchDevices( { devices -> devices.forEach { Log.i("AuthQuickStart", "Device: " + it) } }, { Log.e("AuthQuickStart", "Fetch devices failed with error", it) } ) ``` ```kotlin try { Amplify.Auth.fetchDevices().forEach { device -> Log.i("AuthQuickStart", "Device: $device") } } catch (error: AuthException) { Log.e("AuthQuickStart", "Fetch devices failed with error", error) } ``` ```java RxAmplify.Auth.fetchDevices() .subscribe( device -> Log.i("AuthQuickStart", "Device: " + device); error -> Log.e("AuthQuickStart", "Fetch devices failed with error: " + error.toString()) ); ```