HelpActivity.kt 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*******************************************************************************
  2. * *
  3. * Copyright (C) 2017 by Max Lv <[email protected]> *
  4. * Copyright (C) 2017 by Mygod Studio <[email protected]> *
  5. * *
  6. * This program is free software: you can redistribute it and/or modify *
  7. * it under the terms of the GNU General Public License as published by *
  8. * the Free Software Foundation, either version 3 of the License, or *
  9. * (at your option) any later version. *
  10. * *
  11. * This program is distributed in the hope that it will be useful, *
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  14. * GNU General Public License for more details. *
  15. * *
  16. * You should have received a copy of the GNU General Public License *
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>. *
  18. * *
  19. *******************************************************************************/
  20. package com.github.shadowsocks.plugin
  21. /**
  22. * Base class for a help activity. A help activity is started when user taps help when configuring options for your
  23. * plugin. To create a help activity, just extend this class, and add it to your manifest like this:
  24. *
  25. * <pre class="prettyprint">&lt;manifest&gt;
  26. * ...
  27. * &lt;application&gt;
  28. * ...
  29. * &lt;activity android:name=".HelpActivity"&gt;
  30. * &lt;intent-filter&gt;
  31. * &lt;action android:name="com.github.shadowsocks.plugin.ACTION_HELP"/&gt;
  32. * &lt;category android:name="android.intent.category.DEFAULT"/&gt;
  33. * &lt;data android:scheme="plugin"
  34. * android:host="com.github.shadowsocks"
  35. * android:path="/$PLUGIN_ID"/&gt;
  36. * &lt;/intent-filter&gt;
  37. * &lt;/activity&gt;
  38. * ...
  39. * &lt;/application&gt;
  40. *&lt;/manifest&gt;</pre>
  41. */
  42. abstract class HelpActivity : OptionsCapableActivity() {
  43. override fun onInitializePluginOptions(options: PluginOptions) { }
  44. }