Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/wso2/product-emm
Browse files Browse the repository at this point in the history
  • Loading branch information
dilanua committed May 2, 2016
2 parents d151ecd + 8f8a2b5 commit 8994844
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import android.provider.Browser;
import android.util.Base64;
import android.util.Log;
import android.widget.Toast;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
Expand Down Expand Up @@ -197,6 +198,7 @@ public String encodeImage(Drawable drawable) {
* @param url - APK Url should be passed in as a String.
*/
public void installApp(String url, String packageName) {
Toast.makeText(context, "Please wait, Application is being installed.", Toast.LENGTH_LONG).show();
Preference.putString(context, resources.getString(R.string.current_downloading_app), packageName);
if (isPackageInstalled(Constants.AGENT_PACKAGE_NAME)) {
CommonUtils.callAgentApp(context, Constants.Operation.INSTALL_APPLICATION,
Expand Down Expand Up @@ -230,6 +232,7 @@ public void startInstallerIntent(Uri fileUri) {
* @param packageName - Application package name should be passed in as a String.
*/
public void uninstallApplication(String packageName) {
Toast.makeText(context, "Please wait, Application is being uninstalled.", Toast.LENGTH_LONG).show();
if (packageName != null &&
!packageName.contains(resources.getString(R.string.application_package_prefix))) {
packageName = resources.getString(R.string.application_package_prefix) + packageName;
Expand All @@ -254,6 +257,7 @@ public void uninstallApplication(String packageName) {
*/
public void manageWebAppBookmark(String url, String title, String operationType)
throws AppCatalogException {
Toast.makeText(context, "Please wait, WebClip is being installed.", Toast.LENGTH_LONG).show();
final Intent bookmarkIntent = new Intent();
final Intent actionIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
long urlHash = url.hashCode();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@
android:layout_marginTop="5dip"
android:textSize="14sp"
android:textAllCaps="true"
android:paddingTop="5dip"
android:paddingBottom="5dip"
android:paddingLeft="10dip"
android:paddingRight="10dip"
android:layout_gravity="bottom|right"
android:textColor="@android:color/white"
android:text="@string/action_install"
Expand Down

0 comments on commit 8994844

Please sign in to comment.