{"id":16962826,"url":"https://github.com/fiqryq/mango","last_synced_at":"2026-03-04T23:32:13.167Z","repository":{"id":108353232,"uuid":"236647501","full_name":"fiqryq/mango","owner":"fiqryq","description":"Attendance app using BLE beacon.","archived":false,"fork":false,"pushed_at":"2020-08-01T11:17:26.000Z","size":2310,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-06T04:42:03.327Z","etag":null,"topics":["android","beacon","estimote-beacons","firebase","firestore"],"latest_commit_sha":null,"homepage":"http://mangodb.online/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fiqryq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-28T03:11:24.000Z","updated_at":"2025-06-08T22:29:22.000Z","dependencies_parsed_at":"2023-03-13T14:27:42.939Z","dependency_job_id":null,"html_url":"https://github.com/fiqryq/mango","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fiqryq/mango","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiqryq%2Fmango","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiqryq%2Fmango/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiqryq%2Fmango/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiqryq%2Fmango/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fiqryq","download_url":"https://codeload.github.com/fiqryq/mango/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiqryq%2Fmango/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30099403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T23:31:22.529Z","status":"ssl_error","status_checked_at":"2026-03-04T23:31:22.112Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","beacon","estimote-beacons","firebase","firestore"],"created_at":"2024-10-13T23:07:58.670Z","updated_at":"2026-03-04T23:32:13.114Z","avatar_url":"https://github.com/fiqryq.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Mango\n![Android CI](https://github.com/fiqryq/Mango-Master/workflows/Android%20CI/badge.svg)\n![Build Status](https://dev.azure.com/fiqrychoerudin/Mango/_apis/build/status/fiqryq.Mango-Master?branchName=master)\n\nAttendance App using [Estimote Proximity Beacon](https://estimote.com/products/).\n\n## Prototype\n- Full Ui [here](https://bit.ly/UIMango)\n- interactive UI Dosen [here](https://bit.ly/PrototypeMangoDosen)\n- interactive UI Mahasiswa [here](https://bit.ly/ProtoMHS)\n\n## Document\n- Journal\n- Video [here](https://bit.ly/PromosiMango)\n- Poster [here](https://bit.ly/PosterMango)\n\n## Add Proximity SDK\n```gradle\ndependencies {\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\n    // ...\n\n    // add this:\n    implementation 'com.estimote:proximity-sdk:1.0.4'\n    // for the latest version, see the CHANGELOG and replace \"1.0.4\"\n    // https://github.com/Estimote/Android-Proximity-SDK/blob/master/CHANGELOG.md\n\n    implementation 'com.estimote:mustard:0.2.1'\n\n    // for compatibility with Android 10, also add:\n    implementation 'com.estimote:scanning-plugin:0.25.4'\n}\n```\n## Set up Estimote Cloud credentials\n```java    \n        // add this:\n        EstimoteCloudCredentials cloudCredentials =\n            new EstimoteCloudCredentials(\"APP ID\", \"APP TOKEN\");\n```\n\n## Create a Proximity Observer object\n```java  \n    // 1. Add a property to hold the Proximity Observer\n        private ProximityObserver proximityObserver;\n\n    // 2. Create the Proximity Observer\n            this.proximityObserver =\n                new ProximityObserverBuilder(getApplicationContext(), cloudCredentials)\n                    .onError(new Function1\u003cThrowable, Unit\u003e() {\n                        @Override\n                        public Unit invoke(Throwable throwable) {\n                            Log.e(\"app\", \"proximity observer error: \" + throwable);\n                            return null;\n                        }\n                    })\n                    .withBalancedPowerMode()\n                    .build();\n```\n# Define Proximity Zones\nTime to tell our Proximity Observer what enter/exit events we’re interested in! But first, some theory:\n\n## Tags and attachments\nChance is, knowing when the user enters range of beacon 1b4fe is not that useful in and on itself. However, if your app somehow knows that beacon 1b4fe is placed on Peter’s desk … “In range of beacon 1b4fe” suddenly means “close to Peter’s desk”.\nIn other words, most of the time, proximity to beacons only makes sense if you can give your beacons some meaning. That’s what beacon tags and attachments are for … an easy way for you to attach some extra data/meaning to a beacon, for example:\n\n```\n    \"identifier\": \"1b4fe\",\n    \"tag\": \"desks\",\n    \"attachments\": {\n       \"desk-owner\": \"Peter\"\n     }\n```\n\nWith such a setup, it’s now easy to say “monitor proximity to desks”, and also figure out whose desk we’re close to.\nAnd since tags and attachments are stored in Estimote Cloud, it’s also easy to change the setup without having to change the app’s code. \nFor example, if sombebody else takes Peter’s desk, just change the “desk-owner” to a new one. If your app was coded to welcome the owner at their desk by their name, it’ll now start using the new one.\n\n## Set up tags and attachments\nWith the theory out of the way, let’s set up some tags and attachments.\nGo to cloud.estimote.com, select one of your beacons, and click “Edit”. Then:\n- to set up a tag: Click on “Tags”, “Create New Tag”, enter “desks”, and click “Add”.\n- to set up attachments: On the left side, select “Beacon Attachment”. Then, add a “desk-owner” key with value set to “Peter”.\n\nFinish with the “Save Changes” at the bottom. Ta-da, we’ve just set up our first beacon!\nRepeat these steps for another beacon. Use the same “desks” tag, but this time, set the “desk-owner” to “Alex”.\n\n## Create Proximity Zone objects\nNow we can move on to creating Proximity Zone objects in our app. Back to the future MainActivity!\n```java  \n    this.proximityObserver = // ...\n    \n    // add this below:\n    ProximityZone zone = new ProximityZoneBuilder()\n        .forTag(\"desks\")\n        .inNearRange()\n        .onEnter(new Function1\u003cProximityZoneContext, Unit\u003e() {\n            @Override\n            public Unit invoke(ProximityZoneContext context) {\n                String deskOwner = context.getAttachments().get(\"desk-owner\");\n                Log.d(\"app\", \"Welcome to \" + deskOwner + \"'s desk\");\n                return null;\n            }\n        })\n        .onExit(new Function1\u003cProximityZoneContext, Unit\u003e() {\n            @Override\n            public Unit invoke(ProximityZoneContext context) {\n                Log.d(\"app\", \"Bye bye, come again!\");\n                return null;\n            }\n        })\n        .build();\n```\nNote that for this setup to work, you need to spread the beacons apart a good few meters. If they overlap, then moving from one beacon to the other is considered moving within the zone, and it won’t trigger additional enter/exit actions.\nIf you want to know about movements inside a zone spanned by multiple overlapping beacons, you can use the “onContextChange” action instead. Think about it as: I’m still in the same desks zone (hence no new enter/exits), but my context (which specific desks are in range) has changed (hence the “onContextChange” action).\n\n```java \n    ProximityZone zone = new ProximityZoneBuilder()\n        // ...\n        .onContextChange(new Function1\u003cSet\u003c? extends ProximityZoneContext\u003e, Unit\u003e() {\n            @Override\n            public Unit invoke(Set\u003c? extends ProximityZoneContext\u003e contexts) {\n                List\u003cString\u003e deskOwners = new ArrayList\u003c\u003e();\n                for (ProximityZoneContext context : contexts) {\n                    deskOwners.add(context.getAttachments().get(\"desk-owner\"));\n                }\n                Log.d(\"app\", \"In range of desks: \" + deskOwners);\n                return null;\n            }\n        })\n```\nHere’s how this would work in an overlapping scenario:\n\n```\n    # move in range of \"Peter's desk\" beacon\n    # this is also when the \"enter\" action would get called\n    Nearby desks: [Peter]\n    # move in range of both beacons\n    Nearby desks: [Peter, Alex]\n    # move out of range of \"Peter's desk\", but still in range of \"Alex's desk\"\n    Nearby desks: [Alex]\n    # move out of range of both beacons\n    # this is also when the \"exit\" action would get called\n    Nearby desks: []\n```\n## About the Proximity Zone range\n\n```java \n    ProximityZone innerZone = new ProximityZoneBuilder()\n        .forTag(\"treasure\")\n        .inCustomRange(3.0)\n        .create();\n    \n    ProximityZone outerZone = new ProximityZoneBuilder()\n        .forTag(\"treasure\")\n        .inCustomRange(9.0)\n        .create();\n```\n\n## Start proximity observation\nWe’re almost there! Before we start proximity observations, there’s just one more thing left to do.\n\n## Request location permissions\nPerforming a Bluetooth scan on Android requires the app to obtain an ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission from the user. There’s a tutorial on Android Developer Portal which shows how to do that: Requesting Permissions at Run Time. However, to get started quickly, we’ll use our little helper library, com.estimote:mustard, to check and request the appropriate permissions with just a few lines of code.\nAs an added bonus, it’ll also check if all the other requirements are met—for example, if Bluetooth is available and turned on.\n\n```java \n    RequirementsWizardFactory\n        .createEstimoteRequirementsWizard()\n        .fulfillRequirements(this,\n        // onRequirementsFulfilled\n        new Function0\u003cUnit\u003e() {\n            @Override public Unit invoke() {\n                Log.d(\"app\", \"requirements fulfilled\");\n                proximityObserver.startObserving(zone);\n                return null;\n            }\n        },\n        // onRequirementsMissing\n        new Function1\u003cList\u003c? extends Requirement\u003e, Unit\u003e() {\n            @Override public Unit invoke(List\u003c? extends Requirement\u003e requirements) {\n                Log.e(\"app\", \"requirements missing: \" + requirements);\n                return null;\n            }\n        },\n        // onError\n        new Function1\u003cThrowable, Unit\u003e() {\n            @Override public Unit invoke(Throwable throwable) {\n                Log.e(\"app\", \"requirements error: \" + throwable);\n                return null;\n            }\n        });\n```\n\n## Tech 👨‍💻\n\n- [Picasso](https://square.github.io/picasso/) - Picasso\n- [hdodenhof](https://github.com/hdodenhof/CircleImageView) - hdodenhof\n- [KAlertDialog](https://github.com/TutorialsAndroid/KAlertDialog) - KAlertDialog\n- [Firebase](https://firebase.google.com/docs/android/setup?authuser=0) - Firebase\n- [Estimote SDK](https://developer.estimote.com/) - Estimote SDK\n\n## Task List\n- [x] Multi Role Login\n\n## LEGAL\nCopyright 2019-2020 Autumn Leaves Program Studi D3 Rekayasa Perangkat Lunak Aplikasi Universitas Telkom Bandung.\n**Don't upload** any fork ,source on any other paltform.\n\n## Who Supported This Project (All lecturers of D3IF Telkom University)\n- Rahmadi Wijaya, S.Si., M.T. (Head of Study Program)\n- Gandeva Bayu Satrya, ST., MT., Ph.D. (Advisor 1)\n- Hariandi Maulid , S.T., M.Sc\n- Amir Hasanudin Fauzi, S.T., M.T.\n- Fat'hah Noor Prawita, S.T., M.T.\n- Hariandi Maulid, S.T., M.Sc.\n- Hetti Hidayati, S.Kom., M.T.\n- Indra Azimi, S.T., M.T.\n- Rizza Indah Mega Mandasari, S.Kom., M.T.\n- Tri Brotoharsono, S.T., M.T.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiqryq%2Fmango","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiqryq%2Fmango","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiqryq%2Fmango/lists"}