{"id":13645545,"url":"https://github.com/pcevikogullari/AndroidShortcuts","last_synced_at":"2025-04-21T14:31:32.608Z","repository":{"id":68709347,"uuid":"71563738","full_name":"pcevikogullari/AndroidShortcuts","owner":"pcevikogullari","description":"Example app for shortcuts","archived":false,"fork":false,"pushed_at":"2017-03-27T14:13:12.000Z","size":7995,"stargazers_count":336,"open_issues_count":1,"forks_count":45,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-08-02T01:25:30.545Z","etag":null,"topics":["android","android-shortcuts","shortcut","shortcuts"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pcevikogullari.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":"2016-10-21T12:37:57.000Z","updated_at":"2024-07-28T08:43:11.000Z","dependencies_parsed_at":"2023-04-02T11:05:29.171Z","dependency_job_id":null,"html_url":"https://github.com/pcevikogullari/AndroidShortcuts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcevikogullari%2FAndroidShortcuts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcevikogullari%2FAndroidShortcuts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcevikogullari%2FAndroidShortcuts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcevikogullari%2FAndroidShortcuts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pcevikogullari","download_url":"https://codeload.github.com/pcevikogullari/AndroidShortcuts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223868333,"owners_count":17217073,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","android-shortcuts","shortcut","shortcuts"],"created_at":"2024-08-02T01:02:36.936Z","updated_at":"2024-11-09T18:31:41.857Z","avatar_url":"https://github.com/pcevikogullari.png","language":"Java","readme":"# Android Shortcuts\n\nExample app for shortcuts in design library v25\n\n### Demo\n![Demo 1](https://raw.githubusercontent.com/pcevikogullari/AndroidShortcuts/master/shortcut1.gif) ![Demo 1](https://raw.githubusercontent.com/pcevikogullari/AndroidShortcuts/master/shortcut2.gif)\n\n### Manifest\nAdd meta-data before ```\u003c/activity\u003e``` tag in Manifest.xml\n```\n\u003cmeta-data android:name=\"android.app.shortcuts\"\n    android:resource=\"@xml/shortcuts\" /\u003e\n```\n\n### Add Shortcut\nTo add or edit a new shotcut, go to /res/xml/shortcuts.xml :\n```sh\n\u003cshortcuts xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n    \u003cshortcut\n        android:shortcutId=\"shortcut1\"\n        android:enabled=\"true\"\n        android:icon=\"@drawable/ic_directions_run_black_24dp\"\n        android:shortcutShortLabel=\"@string/shortcut1\"\n        android:shortcutLongLabel=\"@string/shortcut1_long\"\n        android:shortcutDisabledMessage=\"@string/shortcut1_disabled\"\u003e\n        \u003cintent\n            android:action=\"custom_action\"\n            android:targetPackage=\"com.pamir.shortcuts\"\n            android:targetClass=\"com.pamir.shortcuts.MainActivity\" /\u003e\n    \u003c/shortcut\u003e\n\u003c/shortcuts\u003e\n```\n\n### Handle Actions\n\nTo handle shortcuts, just add new constant:\n```\nprivate final static String CUSTOM_ACTION = \"custom_action\";\n```\n\nand check the intent for custom action :\n```\nswitch (getIntent().getAction()){\n    case CUSTOM_ACTION:\n        textView.setText(CUSTOM_ACTION);\n        break;\n    default:\n        break;\n}\n```\n\n","funding_links":[],"categories":["其他"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpcevikogullari%2FAndroidShortcuts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpcevikogullari%2FAndroidShortcuts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpcevikogullari%2FAndroidShortcuts/lists"}