Code Monkey home page Code Monkey logo

sos-maui's Introduction

SOS App

SOS-Maui

Description

SOS App is a cross-platform app that allows the user to send an SOS message with their location to a saved phone number in times of distress.

Components

  • The main branch contains the .NET MAUI 6 project used to build the app that gets the coordinates of the phone through the .NET MAUI Essentials Geolocation API and call the SOS Appwrite Function.

  • The appwrite-function branch contains the Appwrite Function that reverse geocodes the coordinates to get the address from the Radar Geocoding API and uses Twilio Programmable Message to send an SOS message to predecided number.

Demo

SOS.MAUI.Demo.mp4

Steps To Setup

For SOS Appwrite Function

  • Setup an Appwrite instance, create a new admin account and a new project
    • Enable the .NET 6.0 runtime for Appwrite Functions (check the note below)
  • Install the Appwrite CLI and login with your Appwrite credentials
  • Create an account on Twilio, obtain your Twilio Account SID and Auth Token from your Twilio console, and await a Phone Number (using this guide)
  • Create an account on Radar and grab an API key (Test secret(server) should be fine)
  • Visit the SOS Appwrite Function Readme in the appwrite-function branch for more details on setting up and deploying the function
    • Visit the SOS Function's Settings page and add Execute Access for any role

Note: In order to enable the .NET runtime for Appwrite Functions, you need to update the .env file in the Appwrite installation folder. Find the file and add dotnet-6.0 to the comma-separated list in the environment variable _APP_FUNCTIONS_RUNTIMES. This will make the .NET runtime available in Appwrite Functions. You can then load the updated configuration using the docker-compose up -d command.

For .NET MAUI App

  • Install latest version of Visual Studio 2022 with the .NET Multi-platform App UI development workload (Reference)
  • Clone this repo
  • Open the SOS\ folder and run the following command
    dotnet restore
  • Visit the SOS\Constants folder and create a class AppwriteConstants.cs as follows:
    namespace SOS.Constants
    {
        public static class AppwriteConstants
        {
            public const string AppwriteUrl = "<Enter Appwrite API Endpoint>";
            public const string ProjectId = "<Enter Appwrite Project Id>";
            public const string FunctionId = "<Enter Appwrite Function Id>";
        }
    }
  • Build your app and deploy it to your preferred mobile platform (Reference)

Attribution

Thanks to Freepik for the menu, settings, and sos icons used in the flyout menu in the app

sos-maui's People

Contributors

adityaoberai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sos-maui's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.