🙂 İNSANLARIN EN HAYIRLISI INSANLARA FAYDALI OLANDIR 🙂

Ramazan HABER / Android RMOS / Farklı uygulamadan farklı uygulama açma How to launch an Activity from another Application

1-) Android RMOS - Farklı uygulamadan farklı uygulama açma How to launch an Activity from another Application

 

 

1-) AndroidManifest.xml

 

<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>

 

2-) Kod

 

       

 

 String paketname="com.ramazan.rmosposx";

        
Intent intent = getPackageManager().getLaunchIntentForPackage(paketname);
        
if (intent != null) {
            
// We found the activity now start the activity
            
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(intent);
        }
else {
            
// Bring user to the market or let them choose an app?
            
intent = new Intent(Intent.ACTION_VIEW);
            intent.addFlags(
Intent.FLAG_ACTIVITY_NEW_TASK);
            intent.setData(
Uri.parse("market://details?id=" + paketname));
            startActivity(intent);
        }

 

 

 

 2022 Ağustos 06 Cumartesi
 357