How to install Android apk from code in unity

后端 未结 4 1516
终归单人心
终归单人心 2020-11-29 11:43

I found snippet for Java. How can I write such a code in C# Unity?

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_T         


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-29 12:32

    Here we have to change your manifest file. We have to give Read & Write permissions. after change this we can easily install downloaded application file.

    Without these permissions we can't access Android External Files.

    
        
          
          
            
              
                
                
              
              
            
    
            
              
            
    
          
          
          
          
          
        
    

提交回复
热议问题