Inspiration The idea behind using on-device AI stems from the need to assist users even when they are offline or in emergency situations. Brainstorming meaningful ways to apply AI led to the realization that having an AI-powered assistant could be crucial in emergency scenarios, where internet connectivity might be unreliable or unavailable.

What it does Chatting with Users: The SOS Assistant utilizes Google's Gemini Nano to chat with users and guide them through emergencies. This AI-driven interaction provides real-time support, offering advice, comforting words, or instructions.

Offline Navigation: The app provides access to offline maps using cached data, ensuring that users can find their way even when their internet connection is low or unavailable.

SMS Integration: In areas with cellular network coverage, the SOS Assistant can send emergency SMS messages to predefined contacts, alerting them of the user's location and status.

How we built it We integrated several technologies to bring the SOS Assistant to life:

On-device AI: Google's Gemini Nano powers the conversational features, ensuring that users get real-time assistance, even without internet access. Offline Maps: We utilized Leaflet (an open-source JavaScript library for interactive maps) and its offline plugin to provide cached maps that work when the user is disconnected. SMS Functionality: Leveraging native mobile functionality, the app sends SMS messages directly from the user's phone to alert contacts in case of an emergency. Service Workers: A key component was implementing service workers to ensure offline capabilities, enabling users to interact with the app without internet access. Challenges we ran into Limited connectivity in emergency situations: Ensuring the app could function without internet was challenging, but leveraging technologies like Leaflet offline and service workers helped us address this. Battery and power constraints: Since the app is designed for emergencies, we needed to consider its impact on battery life, ensuring it wouldn't drain too quickly in critical moments. Integrating real-time SMS: Ensuring that SMS functionality was reliable and accessible for users, particularly for different phone models and network conditions, required careful testing and development.

Accomplishments that we're proud of Real-world impact: We’re proud to address a tangible problem: helping people in emergencies when connectivity and resources are limited. Cross-technology implementation: Successfully integrating AI, offline maps, SMS, and service workers within one application demonstrated how multiple technologies can collaborate to create a seamless experience. Clear roadmap for future: We’ve laid the groundwork for expanding SOS Assistant’s capabilities, such as adding Bluetooth-based proximity alerts and media sharing during emergencies. What we learned Offline capabilities are essential for emergency apps, and integrating offline maps with service workers can be a game-changer. AI in emergencies: On-device AI is incredibly valuable in situations where users need assistance but might not have reliable internet access. Real-time SMS functionality: This feature demonstrated how mobile devices can be leveraged to send critical alerts, even when other communication channels are down.

What's next for SOS The future of the SOS Assistant includes:

Bluetooth Connectivity: Enabling communication between nearby users in emergencies, facilitating faster help when every second counts. Audio and Video Recording: Adding the ability to record and send video/audio during an emergency will help users capture evidence or share critical moments in real time. File Sharing: Integrating file-sharing capabilities will allow users to send vital documents, images, or other resources to emergency contacts, helping them prepare for action.

Built With

  • css
  • geolocation-api-(for-location-tracking)
  • geolocationapi
  • html
  • javascript
  • javascript-frameworks:-leaflet.js-(for-maps)
  • leaflet.js
  • pwa
  • service-workers-(for-offline-functionality)-cloud-services:-none-(if-not-using-cloud-storage-or-services)-apis:-google-gemini-(for-ai-chat)
  • serviceworkers
  • smsapi
Share this project:

Updates