अपने ऐप की शुरुआत में उपलब्ध संस्करण की जांच करें, आप अपग्रेड के लिए पूछने के लिए अलर्टडिअलॉग का उपयोग कर सकते हैं।
इस पढ़ें :: Is there a way to automatically update application on Android?
और यह एक AlertDialog उदाहरण ::
if (ConfigXML_app_version> myapp_version){
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Upgrade");
builder.setMessage("Update available, ready to upgrade?");
builder.setIcon(R.drawable.icon);
builder.setCancelable(false);
builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
Intent intent = new Intent(Intent.ACTION_VIEW ,Uri.parse(app_link));
startActivity(intent);
finish();
}
});
builder.setNegativeButton("Nop", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
});
AlertDialog alert = builder.create();
alert.show();
}
भयानक धन्यवाद! – Mike
यह पुराना तरीका है, लेकिन हर किसी के भविष्य के संदर्भ के लिए, जब कोई जवाब आपकी समस्या हल करता है, तो इसे स्वीकार्य उत्तर के रूप में चिह्नित करना प्रथागत है। – Erhannis
यह इरादा केवल मेरे एपीके के नए संस्करण को डाउनलोड करता है। मुझे एक इंस्टॉलेशन पॉपअप खोलने की आवश्यकता है – vimal1083