3
我正在開發一個使用phonegap和移動jquery的應用程序。android:從後臺到前臺獲取singleTask活動
我的應用程序中有一點在後臺運行,如果事件由js觸發,我想讓我的應用程序進入前臺。
如何讓我的應用程序從後臺進入前臺。我有以下屬性的單一活動:
android:configChanges="orientation|keyboardHidden|screenLayout"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan"
android:launchMode="singleTask"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar"
什麼,我試圖讓我的應用前景是:
Intent intent = new Intent(mContext , MainActivity.class);
intent.setAction(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
mContext.startActivity(intent);
而且
mContext.startActivity(((Activity)mContext).getIntent());
(MainActivity是唯一的活動我應用程序),但它不工作。我正在使用android 4.0。
更新:在Android 2.3的它工作正常,但它不是在Android 4.0的
我有一個類似的問題。有沒有人找到解決方案? –
你找到了解決辦法嗎? – Priyank
我發佈瞭解決方案...請參閱 –