Invoking activity from APK in another android application

前端 未结 2 1748
北海茫月
北海茫月 2021-01-13 17:47

I have an android application that starts an activity and is running well. I need other developers to be able to integrate my APK into their applications in such a way that

2条回答
  •  佛祖请我去吃肉
    2021-01-13 18:34

    The best thing to do, IMHO, is declare a custom action in an in your activity's manifest. Something like:

    
      
        
      
    
    

    Then, your compatriots can launch it via that custom action:

    startActivity(new Intent("com.commonsware.android.THIS_IS_MY_ACTION"));
    

    By namespacing your action, you should not run into accidental conflicts with anyone else's app.

提交回复
热议问题