Any workaround to save an Intent in settings?

后端 未结 2 677
小蘑菇
小蘑菇 2020-12-09 19:54

Hope you will understand my question with my basic english...

In my application, I allow the user to have a button that launch the application of his choice. I get n

2条回答
  •  我在风中等你
    2020-12-09 20:24

    Instead of saving the Intent you could just save the String which is necessary to build the Intent.

    Example:

    Intent intent = new Intent("com.android.notepad.action.EDIT_TITLE");
    

    Now you just store a String containing com.android.notepad.action.EDIT_TITLE

提交回复
热议问题