Skip to content

Commit

Permalink
Merge pull request #403 from Alfresco/1.6.3
Browse files Browse the repository at this point in the history
Prepare 1.7
  • Loading branch information
JM.PASCAL committed May 26, 2016
2 parents c5ce690 + f35ccd7 commit 77729aa
Show file tree
Hide file tree
Showing 110 changed files with 3,574 additions and 819 deletions.
5 changes: 3 additions & 2 deletions alfresco-mobile-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ android {
applicationId APPLICATION_ID

minSdkVersion 15
targetSdkVersion 22
versionCode 61
targetSdkVersion 23
versionCode 70

versionName VERSION_NAME

manifestPlaceholders = [PROVIDER_AUTHORITY: PROVIDER_AUTHORITY]
Expand Down
23 changes: 22 additions & 1 deletion alfresco-mobile-android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
<!-- Create AlfrescoAccount & retrieve AlfrescoAccount informations -->
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission
android:name="android.permission.GET_ACCOUNTS"
android:maxSdkVersion="22" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />

<!-- Responsible for sync operations -->
Expand Down Expand Up @@ -117,6 +119,15 @@
<data
android:scheme="alfresco"
android:host="file" />
<data
android:scheme="alfresco"
android:host="site" />
<data
android:scheme="alfresco"
android:host="user" />
<data
android:scheme="alfresco"
android:host="tasks" />
<data />
</intent-filter>
<intent-filter>
Expand Down Expand Up @@ -212,6 +223,16 @@

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>

<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="alfresco" />
</intent-filter>

</activity>

<!-- Internal : Activity As a Dialog -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,165 @@
"default": true,
"label-id": "profile.default.title",
"description-id": "profile.default.summary",
"root-view-id": "views-menu-default"
"root-view-id": "views-menu-default",
"root-action-id": "actions-default"
}
},
"features": [
{
"id": "feature-analytics-default",
"type": "org.alfresco.client.feature.analytics",
"enable": false
},
{
"id": "feature-sync-cellular-default",
"type": "org.alfresco.client.feature.sync.cellular",
"enable": true
},
{
"id": "feature-data_protection-default",
"type": "org.alfresco.client.feature.data.protection",
"enable": false
},
{
"id": "feature-passcode-default",
"type": "org.alfresco.client.feature.passcode",
"enable": false
}
],
"action-groups": [
{
"id": "actions-default",
"items": [
{
"item-type": "action-id",
"view-id": "action-favorite-default"
},
{
"item-type": "action-id",
"view-id": "action-like-default"
},
{
"item-type": "action-id",
"view-id": "action-workflow-default"
},
{
"item-type": "action-id",
"view-id": "action-comment-default"
},
{
"item-type": "action-id",
"view-id": "action-edit-with-alfresco-default"
},
{
"item-type": "action-id",
"view-id": "action-edit-default"
},
{
"item-type": "action-id",
"view-id": "action-update-default"
},
{
"item-type": "action-id",
"view-id": "action-download-default"
},
{
"item-type": "action-id",
"view-id": "action-create-default"
},
{
"item-type": "action-id",
"view-id": "action-sync-default"
},
{
"item-type": "action-id",
"view-id": "action-open-default"
},
{
"item-type": "action-id",
"view-id": "action-share-default"
},
{
"item-type": "action-id",
"view-id": "action-delete-default"
},
{
"item-type": "action-id",
"view-id": "action-upload-doc-default"
},
{
"item-type": "action-id",
"view-id": "action-create-doc-default"
},
{
"item-type": "action-id",
"view-id": "action-create-folder-default"
}
]
}
],
"actions": {
"action-favorite-default": {
"type": "org.alfresco.client.action.node.favorite",
"enable": true
},
"action-like-default": {
"type": "org.alfresco.client.action.node.like",
"enable": true
},
"action-workflow-default": {
"type": "org.alfresco.client.action.workflow.start",
"enable": true
},
"action-comment-default": {
"type": "org.alfresco.client.action.node.comment",
"enable": true
},
"action-edit-with-alfresco-default": {
"type": "org.alfresco.client.action.node.edit-with-alfresco",
"enable": true
},
"action-edit-default": {
"type": "org.alfresco.client.action.node.edit",
"enable": true
},
"action-update-default": {
"type": "org.alfresco.client.action.document.update",
"enable": true
},
"action-download-default": {
"type": "org.alfresco.client.action.document.download",
"enable": true
},
"action-sync-default": {
"type": "org.alfresco.client.action.node.sync",
"enable": true
},
"action-open-default": {
"type": "org.alfresco.client.action.document.open",
"enable": true
},
"action-share-default": {
"type": "org.alfresco.client.action.node.share",
"enable": true
},
"action-delete-default": {
"type": "org.alfresco.client.action.node.delete",
"enable": true
},
"action-upload-doc-default": {
"type": "org.alfresco.client.action.document.upload",
"enable": true
},
"action-create-doc-default": {
"type": "org.alfresco.client.action.document.create",
"enable": true
},
"action-create-folder-default": {
"type": "org.alfresco.client.action.folder.create",
"enable": true
}
},
"view-groups": [
{
"id": "views-menu-default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,14 @@ public interface VersionNumber
/** Release 19 Nov 2015. */
int VERSION_1_6_0 = 50;

/** Release 11 March 2015. */
/** Release 11 March 2016. */
int VERSION_1_6_1 = 60;

/** Release April 2015. */
/** Release April 2016. */
int VERSION_1_6_2 = 61;

int LATEST_VERSION = VERSION_1_6_2;
/** Release XXX 2016. */
int VERSION_1_7_0 = 70;

int LATEST_VERSION = VERSION_1_7_0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,22 @@
package org.alfresco.mobile.android.application.activity;

import org.alfresco.mobile.android.application.R;
import org.alfresco.mobile.android.application.fragments.fileexplorer.FileExplorerFragment;
import org.alfresco.mobile.android.application.fragments.preferences.PasscodePreferences;
import org.alfresco.mobile.android.application.security.PassCodeActivity;
import org.alfresco.mobile.android.platform.SessionManager;
import org.alfresco.mobile.android.platform.accounts.AlfrescoAccountManager;
import org.alfresco.mobile.android.platform.extensions.AnalyticsHelper;
import org.alfresco.mobile.android.platform.extensions.AnalyticsManager;
import org.alfresco.mobile.android.platform.intent.AlfrescoIntentAPI;
import org.alfresco.mobile.android.platform.intent.PrivateIntent;
import org.alfresco.mobile.android.ui.activity.AlfrescoActivity;
import org.alfresco.mobile.android.ui.utils.UIUtils;

import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.Environment;
import android.util.TypedValue;
import android.view.ActionMode;
import android.view.View;
Expand All @@ -44,6 +49,10 @@ public abstract class BaseActivity extends AlfrescoActivity
{
protected boolean activateCheckPasscode = false;

public final static int REQUEST_PERMISSION_SD = 70;

public final static int REQUEST_PERMISSION_DL = 80;

// ///////////////////////////////////////////////////////////////////////////
// LIFECYCLE
// ///////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -185,4 +194,35 @@ protected void displayAsDialogActivity()
{
displayAsDialogActivity(0.90f, 0.9);
}

@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults)
{
switch (requestCode)
{
case REQUEST_PERMISSION_SD:
case REQUEST_PERMISSION_DL:
if (grantResults[0] == PackageManager.PERMISSION_GRANTED)
{
FileExplorerFragment.with(this)
.file(requestCode == REQUEST_PERMISSION_DL ? Environment.getExternalStorageDirectory()
: Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS))
.display();

// Permission Granted
AnalyticsHelper.reportOperationEvent(this, AnalyticsManager.CATEGORY_SETTINGS,
AnalyticsManager.ACTION_GRANT_PERMISSION, AnalyticsManager.LABEL_STORAGE, 1, false);
}
else
{
// Permission Denied
AnalyticsHelper.reportOperationEvent(this, AnalyticsManager.CATEGORY_SETTINGS,
AnalyticsManager.ACTION_DENY_PERMISSION, AnalyticsManager.LABEL_STORAGE, 1, false);
}
break;
default:
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
}
}

}
Loading

0 comments on commit 77729aa

Please sign in to comment.