📱

Android IoT Controller

A native Android application for real-time IoT device monitoring and control. Connects to a Node.js backend via REST API, with JWT authentication and LED on/off control.

Android Java OkHttp REST API JWT Auth IoT
🤖
3 Screens · Min SDK 26
App Screenshots
Portrait screenshots from the Android app
Login Screen
Login Screen
Login
Dashboard
Dashboard
Dashboard
LED Control
LED Control
LED Control
Features
What the app can do
🔐
JWT Authentication
Login with username and password. Token saved to SharedPreferences for auto-login on next launch.
📊
IoT Dashboard
View live stats — total devices, online count, alert count, and readings per hour from the server.
📋
Device Feed
Scrollable list of all IoT devices showing name, type, location, status, and latest sensor reading.
💡
LED Control
Toggle individual LEDs on or off with a single tap. All ON and All OFF buttons for bulk control.
🔄
Pull to Refresh
Swipe down to reload all data fresh from the server on Dashboard and LED Control screens.
🚪
Logout
Clears saved token and returns to login screen from the top menu.
Tech Stack
Libraries and tools used
 
Android (Java)
Native Android development in Java
 
OkHttp 4.12
HTTP client for REST API calls
 
org.json
Parsing JSON API responses
 
SharedPreferences
Local storage for JWT token
 
Min SDK 26
Android 8.0+ (Oreo and above)
 
Material Design
UI components and theme
App Screens
3 activities in the app
1
LoginActivity
POST /api/login → save JWT token → auto-login on relaunch
2
DashboardActivity
GET /api/dashboard/stats + /api/dashboard/devices → shows stats + device list
3
LedActivity
GET /api/devices → filter LED type → toggle via POST /api/devices/{id}/led
API Endpoints Used
Connected to https://yytechs.xyz
Method Endpoint Used In
POST /api/login LoginActivity
GET /api/dashboard/stats DashboardActivity
GET /api/dashboard/devices DashboardActivity
GET /api/devices LedActivity
POST /api/devices/{id}/led LedActivity