{"id":20904475,"url":"https://github.com/xedziu/keepmypassword","last_synced_at":"2026-04-20T23:33:01.367Z","repository":{"id":104487747,"uuid":"346298102","full_name":"xEdziu/KeepMyPassword","owner":"xEdziu","description":"A simple mobile app to keep your passwords secure all in one place","archived":false,"fork":false,"pushed_at":"2021-10-20T22:05:34.000Z","size":482,"stargazers_count":3,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-02T07:13:46.228Z","etag":null,"topics":["android","java"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xEdziu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-10T09:17:22.000Z","updated_at":"2024-12-05T22:16:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"548fd5d6-138b-4bd8-9aea-4b50a19920af","html_url":"https://github.com/xEdziu/KeepMyPassword","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xEdziu/KeepMyPassword","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xEdziu%2FKeepMyPassword","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xEdziu%2FKeepMyPassword/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xEdziu%2FKeepMyPassword/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xEdziu%2FKeepMyPassword/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xEdziu","download_url":"https://codeload.github.com/xEdziu/KeepMyPassword/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xEdziu%2FKeepMyPassword/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32070656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T21:26:33.338Z","status":"ssl_error","status_checked_at":"2026-04-20T21:26:22.081Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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","java"],"created_at":"2024-11-18T13:17:20.634Z","updated_at":"2026-04-20T23:33:01.334Z","avatar_url":"https://github.com/xEdziu.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KeepMyPassword - Official Documentation\n\n## Summary\n\nThis application is designed to store passwords for free in one app.\nIt's eniterly created from scrap and developed to version 1.1.0 in one month from begging date.\n\n## Files\n\n### Structure of main files\n\n* ```MainActivity.java```\n* _```auth.forms```\n*  + ```Login.java```\n*  + ```Register.java```\n* _ ```main```\n*   + ```AboutFragment.java```\n*   + ```CreditsFragment.java```\n*   + ```LoggedMain.java```\n*   + ```PasswordsFragment.java```\n*   + ```SettingsFragment.java```\n* _```utils```\n*   + ```Toasts.java```\n*   + ```FormsClasses.java```\n*   + ```_asyncTasks```\n*   +   - ```CheckAndroidID.java```\n*   +   - ```DeleteIndividualContentDB.java```\n*   +   - ```GetContentDB.java```\n*   +   - ```LoginDB.java```\n*   +   - ```ManageAccount.java```\n*   +   - ```RegistrationDB.java```\n*   +   - ```SetContentDB.java```\n*   + _```functions```\n*   +   - ```OpenHTTP.java```\n*   +   - ```RequestHTTP.java```\n\nI decided to omit XML layouts file, because they are easily asccesible in ```res``` folder.\n\n\u003e Note: Below there are described only the most essential files that fulfill specific function that identifies its' usage from other files.\n\n#### MainActivity.java\n\nThe first activity file when App is opened is responsible for:\n* Reading unique **AndroidID** and saving it into variable:\n\n```java\nfinal String android_id;\nandroid_id = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n    Settings.Secure.ANDROID_ID);\n\n```\n\n* Reading theme from **SharedPreferences** and setting it up as well as setting colorString for ActionBar:\n\n```java\nSharedPreferences sharedPreferences = getSharedPreferences(\"night\", 0);\nfinal Boolean flag = sharedPreferences.getBoolean(\"night_mode\", false);\nColorDrawable colorDrawable;\nfinal String colorString;\n\nif (flag) {\n    AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);\n    colorString = \"#0E0E0E\";\n} else {\n    AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);\n    colorString = \"#C62828\";\n}\ncolorDrawable = new ColorDrawable(Color.parseColor(colorString));\n//-------------\nActionBar actionBar = getSupportActionBar();\nactionBar.setDisplayShowTitleEnabled(true);\nactionBar.setBackgroundDrawable(colorDrawable);\n```\n\n* Checking if App has permissions and if not - asks for them:\n\n```java\nif (ContextCompat.checkSelfPermission(MainActivity.this,\n                        Manifest.permission.INTERNET) != PackageManager.PERMISSION_GRANTED \u0026\u0026\n                ContextCompat.checkSelfPermission(MainActivity.this,\n                        Manifest.permission.USE_BIOMETRIC) != PackageManager.PERMISSION_GRANTED ){\n    ActivityCompat.requestPermissions(MainActivity.this,\n        new String[]{Manifest.permission.INTERNET}, 1);\n    ActivityCompat.requestPermissions(MainActivity.this,\n        new String[]{Manifest.permission.USE_BIOMETRIC}, 1);\n}\n```\n\n* Redirecting to login and register forms with extra arguments in bundle:\n\n```java\n// redirect to register form\nbtnRegister.setOnClickListener(new View.OnClickListener() {\n    @Override\n    public void onClick(View v) {\n        Intent intent = new Intent(MainActivity.this, Register.class);\n        intent.putExtra(\"androidID\", android_id);\n        intent.putExtra(\"colorString\", colorString);\n        startActivity(intent);\n    }\n});\n\n//redirect to login form\nbtnLogin.setOnClickListener(new View.OnClickListener() {\n    @Override\n    public void onClick(View v) {\n        Intent intent = new Intent(MainActivity.this, Login.class);\n        intent.putExtra(\"androidID\", android_id);\n        intent.putExtra(\"colorString\", colorString);\n        startActivity(intent);\n    }\n});\n```\n\n#### Login.java \u0026 Register.Java\n\n* Both this files fulfill a similar function - collect data from EditTexts, e.g.:\n\n```java\nfinal EditText userNameEditText = findViewById(R.id.loginUsername);\nString username = String.valueOf(userNameEditText.getText());\n```\n* And pass values to files responsible for handling asynchronous tasks: ```LoginDB.java``` and ```RegisterDB.java```:\n\n```java\nLoginDB async = //...\nasync.execute(params);\n```\n* For more information, look at ```Login.java``` or ```Register.java``` file.\n\n#### LoggedMain.java\n\n* This is the main activity after logging in.\n\n* It has special ```\u003cFrameLayout\u003e``` tag that holds and displays Fragments (```AboutFragment.java``` and so on) iniside this tag:\n\n```xml\n\u003cFrameLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:id=\"@+id/fragment_container\"\u003e\n\u003c/FrameLayout\u003e\n```\n\n* Moreover it hosts whole **Navigation Drawer** and uses ```switch``` function to change currently displayed Fragments :\n\n```xml\n\u003ccom.google.android.material.navigation.NavigationView\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"match_parent\"\n    android:layout_gravity=\"start\"\n    android:background=\"@color/colorBackground\"\n    app:itemTextColor=\"@color/primaryText\"\n    android:id=\"@+id/nav_view\"\n    app:headerLayout=\"@layout/nav_header\"\n    app:menu=\"@menu/drawer_menu\"/\u003e\n```\n\n```java\ndrawer = findViewById(R.id.drawer_layout);\nNavigationView navigationView = findViewById(R.id.nav_view);\nnavigationView.setNavigationItemSelectedListener(this);\n\nActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, toolbar,\n    R.string.navigation_drawer_open, R.string.navigation_drawer_close);\ndrawer.addDrawerListener(toggle);\ntoggle.syncState();\n```\nFor ```switch``` usage look into ```LoggedMain.java``` file.\n\n#### PasswordsFragment.java\n\nThis file generates main feature of the App - Descriptions and Passwords storaged in external database.\n\n\u003e Note: Offline mode not suported yet! (Status for 16.03.2021)\n\n* Main functionality is to generate header, content and buttons to refresh content, add and delete records to and from database:\n\n```java\ntable = view.findViewById(R.id.table);\nsetHeader(table);\nsetContent();\n```\n\nButtons are sending asynchronous requests to perform intended action.\nFor full body of functions and buttons funcionality look into ```PasswordsFragment.java``` file.\n\n#### SettingsFragment.java\n\nThis unique fragment is responsible for changing Theme preferences - Dark Mode, Night Mode:\n![Whole Themes Screenshot](https://github.com/xEdziu/KeepMyPassword/blob/main/whole.png)\n\nAs well as deleting passwords and user account from database.\nFor full code visit page with file ```SettingsFragment.java```\n\n#### AsyncTasks\n\nEach AsyncTask file is responsible for creating connection with external server using ```OpenHTTP.class```, and then sending POST request and recieving callback from external server using ```RequestHTTP.java``` class:\n\n```java\npublic class RequestHTTP {\n    //sending request\n    public static void sendData(String json, HttpURLConnection urlConnection){\n        try(OutputStream os = urlConnection.getOutputStream()) {\n            byte[] input = json.getBytes(\"utf-8\");\n            os.write(input, 0, input.length);\n        } catch (Exception e){\n            e.printStackTrace();\n        }\n    }\n\n    //recieving data from request\n    public static String receiveData(HttpURLConnection urlConnection){\n        try(BufferedReader br = new BufferedReader(\n                new InputStreamReader(urlConnection.getInputStream(), \"utf-8\"))) {\n            StringBuilder response = new StringBuilder();\n            String responseLine = null;\n            while ((responseLine = br.readLine()) != null) {\n                response.append(responseLine.trim());\n            }\n            return response.toString();\n        } catch (Exception e){\n            e.printStackTrace();\n        }\n        return null;\n    }\n}\n````\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## Bibliography\n\nFor bibliography check ```biblio.txt``` file.\n\n## Contact\n\nYou can contact me via email: \n\u003cadrian.goral@gmail.com\u003e\n\n## License\nKeepMyPassword by Adrian Goral is licensed under Attribution-NonCommercial-NoDerivatives 4.0 International.\nTo view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/\n\n## Also check it out\nhttps://youtu.be/dQw4w9WgXcQ?t=43\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxedziu%2Fkeepmypassword","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxedziu%2Fkeepmypassword","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxedziu%2Fkeepmypassword/lists"}