यहां एक पूरा उत्तर है।
चरण 1. सबसे पहले आप की घोषणा करने की जरूरत है और कुछ चर प्रारंभ: -
private static final String APP_DETAILS_PACKAGE_NAME = “com.android.settings”; // Here you need to define the package name
private static final String SCREEN_CLASS_NAME = “com.android.settings.RunningServices”; // Here you need to define the class name but NOTICE!! you need to define its full name including package name.
चरण 2. का दृष्टांत ACTION_VIEW के लिए एक आशय
Intent intent = new Intent();
चरण 3. सेट कार्रवाई
intent.setAction(Intent.ACTION_VIEW);
चरण 3. इरादे के अंदर कक्षा का नाम सेट करें क्योंकि हम जानते हैं कि पैकेज में एक से अधिक गतिविधि हो सकती है। तो पैकेज नाम के अंदर गतिविधि से मेल खाने के लिए इरादे की जरूरत है।
intent.setClassName(APP_DETAILS_PACKAGE_NAME, SCREEN_CLASS_NAME); //Here you need to set package name as well as class name so it could refer to the Package and IntentFilter of the given Activity.
चरण 4. प्रारंभ गतिविधि
context.startActivity(intent); // As soon as this line will be executed Running Service screen will be displayed as a foreground activity.
ऊपर के उदाहरण में आप अपनी जरूरत के अनुसार APP_DETAILS_PACKAGE_NAME और SCREEN_CLASS_NAME फिर कुछ अलग स्क्रीन का उपयोग बदलना चाहते हैं।
मुझे सच में नहीं पता कि यह विधि दस्तावेज है या नहीं, लेकिन यह मेरे लिए आकर्षण की तरह काम करता है।
http://varundroid.blog.com/2011/05/22/androidscreens/ मैं नहीं जानता कि इस समाधान सही है या गलत है, लेकिन यह मेरे लिए ठीक काम करता है। – Varundroid