Passing data between two android apps using intent

前端 未结 2 1348
臣服心动
臣服心动 2021-01-13 16:43

I have two separate android apps, AppA and AppB. I am trying to get AppA to launch AppB (which is a game app). After the user is done playing the game (AppB), it will send t

2条回答
  •  被撕碎了的回忆
    2021-01-13 17:09

    Try this:

    AppA's AndroidManifest.xml:

        
        
        .
        .
        .
        
    
                
                    
                
                
    
                
    
            
    

    Then to send data to app a activity from app b, do this:

    Intent i = new Intent();
    i.setAction("com.joy.AppA.views.activities.LAUNCH_IT");
    i.putExtra("gameRecord", gameRecord_array);
    startActivity(i);
    

提交回复
热议问题