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

Feature enroll #91

Merged
merged 130 commits into from
Jul 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
b5d1bb9
delete duplicate file
rafaelje Jul 6, 2017
b4f430e
implement improve to location library
rafaelje Jul 6, 2017
dfa36bd
add location library on MQTT service
rafaelje Jul 6, 2017
84b2f30
remove old GPS library
rafaelje Jul 6, 2017
8228d58
add request from MQTT
rafaelje Jul 6, 2017
333cc70
chore: add empty functions
rafaelje Jul 6, 2017
858b00e
feat: add suscribe to new channels on MQTT
rafaelje Jul 6, 2017
07e211f
* feat Add possibility to subscribe multiples topics on MQTT
rafaelje Jul 6, 2017
4cf3983
remove duplicate receiver
rafaelje Jul 6, 2017
37fc6be
getter and setter connectivity wifi on cache
rafaelje Jul 6, 2017
8b42109
add control wifi to Receiver class
rafaelje Jul 6, 2017
303964f
add change on connectivity to work with wifi and bluetooth
rafaelje Jul 7, 2017
e33d7e9
add uuid to payload on register
rafaelje Jul 7, 2017
28e7fac
fix bug when disable wifi
rafaelje Jul 7, 2017
d58e47e
add comments to location provider to review later and implement the s…
rafaelje Jul 7, 2017
f652cfd
create space on cache to store GPS disable data
rafaelje Jul 7, 2017
203765a
add lock functions
rafaelje Jul 7, 2017
7d03a54
add encrypt functions
rafaelje Jul 7, 2017
fb85757
add lock function waiting for dashboard
rafaelje Jul 7, 2017
c647ec6
reorder functions on MQTT Services
rafaelje Jul 7, 2017
921347c
fix(Copyright) add new year
rafaelje Jul 7, 2017
c48abfb
add password policies to Admin Receiver
rafaelje Jul 7, 2017
5f60059
add password policies on MQTT Service
rafaelje Jul 7, 2017
5d0bb76
solved problem with certificate x509 on real devices
rafaelje Jul 7, 2017
5054d17
formating errors
rafaelje Jul 7, 2017
732f2a7
add loading for X509 certificate
rafaelje Jul 7, 2017
1b3e0b5
refactor intent service
rafaelje Jul 9, 2017
96de7ab
change agent name on inventory task
rafaelje Jul 10, 2017
520c716
application manage chore
rafaelje Jul 10, 2017
9e8d92a
files manage chore
rafaelje Jul 10, 2017
6672110
refactor file helper to download
rafaelje Jul 11, 2017
7eade6c
change session token sync
rafaelje Jul 11, 2017
23e79b0
download file ready
rafaelje Jul 11, 2017
f4a1f4f
add remove and install apk functions
rafaelje Jul 11, 2017
c8db877
download the apk waiting for install
rafaelje Jul 11, 2017
2317747
add flag to open outside activity installapk function
rafaelje Jul 11, 2017
20e64ab
add uninstall app feature
rafaelje Jul 11, 2017
eb91eb9
add remove files and uninstall apps :tada:
rafaelje Jul 11, 2017
6150d76
add colors :art:
rafaelje Jul 11, 2017
b9983a8
add logo
rafaelje Jul 11, 2017
1ce0a4a
resize logo
rafaelje Jul 11, 2017
2c4ad25
change api target to work with fonts on style
rafaelje Jul 11, 2017
bd86656
splash design
rafaelje Jul 11, 2017
ec86d17
add new enrollment screen
rafaelje Jul 12, 2017
3308ad1
remove session token from FilesHelpers
rafaelje Jul 12, 2017
1bb65f5
add material design support
rafaelje Jul 12, 2017
f75b792
add android-22 to travis
rafaelje Jul 12, 2017
d79776c
fix gradle support problems
rafaelje Jul 12, 2017
c5a01dd
update material design style and colors
rafaelje Jul 12, 2017
dc365f7
toolbar added
rafaelje Jul 12, 2017
62d0a84
add design and validation on register
rafaelje Jul 13, 2017
5b27040
Merge branch 'feature/design' into develop
rafaelje Jul 13, 2017
741d601
solved merge problems
rafaelje Jul 13, 2017
ebeb17f
new logo
rafaelje Jul 13, 2017
c313190
change name register for enrollment
rafaelje Jul 13, 2017
261ab8f
refactor names
rafaelje Jul 13, 2017
76e95ae
add inputtype to enrollment
rafaelje Jul 13, 2017
b5dffd7
refactor enrollment
rafaelje Jul 13, 2017
c85443f
add progress bar
rafaelje Jul 13, 2017
de96644
move certified X509 to Helper
rafaelje Jul 13, 2017
9d4a133
validating deeplink format
rafaelje Jul 13, 2017
eafcfed
launch to url from splash
rafaelje Jul 13, 2017
c6e59c9
manage error from backend
rafaelje Jul 13, 2017
ecdb01c
change app name to MDM Agent
rafaelje Jul 13, 2017
cb275fc
add new icons and scroll on Enrollment
rafaelje Jul 13, 2017
3466a22
get port from cache
rafaelje Jul 13, 2017
95107fa
refactor log on MQTTService
rafaelje Jul 13, 2017
1c9a6fa
refactor log
rafaelje Jul 13, 2017
39c4ce8
Merge branch 'feature/design' into develop
rafaelje Jul 13, 2017
52ef395
solved instance problem
rafaelje Jul 13, 2017
91bdad5
add fastlane script
rafaelje Jul 13, 2017
b42742f
fastlane script ready
rafaelje Jul 14, 2017
c7646b7
update gitignore with some fastlane files
rafaelje Jul 14, 2017
545315d
change deploy script
rafaelje Jul 14, 2017
55fc4f3
remove gem install to check if preinstalled on android
rafaelje Jul 14, 2017
aaade1c
print branch on script
rafaelje Jul 14, 2017
0c77de6
execute script
rafaelje Jul 14, 2017
c1397ce
install fastlane with sudo
rafaelje Jul 14, 2017
775fc40
add preinstalled ruby on travis
rafaelje Jul 14, 2017
039a65d
change ruby version
rafaelje Jul 14, 2017
3a7adc5
add secure vars on travis and deploy.sh
rafaelje Jul 14, 2017
637324c
add supply script to deploy on store
rafaelje Jul 14, 2017
2cde91b
remove local zipalign route
rafaelje Jul 14, 2017
3b4ff94
move script on travis
rafaelje Jul 14, 2017
3fc206a
locate zipalign on built tool
rafaelje Jul 14, 2017
7174605
move script
rafaelje Jul 14, 2017
e01b655
remove gradle from fastlane
rafaelje Jul 14, 2017
e226ee8
Prepare space on Google Play change flavor to alpha
rafaelje Jul 14, 2017
1136fb2
autoincrement versionName and versionCode
rafaelje Jul 14, 2017
72f3756
just working on develop
rafaelje Jul 14, 2017
cbf92ba
add logo teclib and flyve big
rafaelje Jul 14, 2017
a28a15f
Merge branch 'feature/travis' into develop
rafaelje Jul 14, 2017
f863cc6
Merge branch 'develop' into feature/travis
rafaelje Jul 14, 2017
8453377
encrypt release and google play json
rafaelje Jul 14, 2017
04d2b1c
add script to test on this branch
rafaelje Jul 14, 2017
2943684
change version format
rafaelje Jul 14, 2017
b72f7b1
Merge branch 'feature/travis' of github.com:flyve-mdm/flyve-mdm-andro…
rafaelje Jul 14, 2017
fc585da
script
rafaelje Jul 14, 2017
1758643
reencrypt files
rafaelje Jul 14, 2017
addd35c
compress json on tar file
rafaelje Jul 14, 2017
91389c0
remove one encrypt
rafaelje Jul 14, 2017
08b1dea
untar file
rafaelje Jul 14, 2017
2f1877a
add branch
rafaelje Jul 14, 2017
200ee51
add new numbers
rafaelje Jul 14, 2017
5ff62a1
update versioncode
rafaelje Jul 14, 2017
de4dafa
ready for deploy
rafaelje Jul 14, 2017
94c4b40
Merge branch 'feature/travis' into develop
rafaelje Jul 17, 2017
0b6f821
fix(deploy): deploy to beta channel instead alpha
rafaelje Jul 17, 2017
e54aa34
fix(log): rename activity from main to log
rafaelje Jul 18, 2017
72a1226
feat(design): new splash screen if user is enrolled
rafaelje Jul 18, 2017
f8e983a
feat(screen): add new mainscreen with tablayout
rafaelje Jul 18, 2017
6f1a02f
feat(screen): add Log to main screen
rafaelje Jul 18, 2017
747ade1
feat(screen): add information fragment
rafaelje Jul 18, 2017
8052336
feat(MQTT): move service to main screen
rafaelje Jul 18, 2017
b6f7035
feat(design): show user information
rafaelje Jul 18, 2017
a7aa28b
Merge branch 'feature/screens' into develop
rafaelje Jul 18, 2017
7baa91f
feat(fastlane): change name tags from alpha to beta channel
rafaelje Jul 18, 2017
a44c61e
fix(refactor): Rename application class to MDMAgent
rafaelje Jul 18, 2017
d10b8d2
Merge branch 'feature/screens' into develop
rafaelje Jul 18, 2017
a3ef82d
fix(git): conflict
rafaelje Jul 18, 2017
2c8b250
fix(travis): fix travis script
rafaelje Jul 18, 2017
1505bad
docs(license): add license to main activity
rafaelje Jul 18, 2017
b78f178
ci(fastlane): fix fastlane script
rafaelje Jul 18, 2017
c57945c
Merge branch 'feature/screens' into develop
rafaelje Jul 19, 2017
ebd558e
fix(enroll): change profile id to switch to guest profile
rafaelje Jul 19, 2017
70e170c
chore(log): add logs to Routes file
rafaelje Jul 19, 2017
975f594
fix(error): show correct error when send payload fail
rafaelje Jul 19, 2017
d59d78c
fix(enroll): change the request from activeprofile to profiles_id
rafaelje Jul 19, 2017
ff97790
fix(enroll): Use POST method with change active profile endpoint
rafaelje Jul 19, 2017
b52c057
Merge branch 'develop' into feature/enroll
rafaelje Jul 19, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.flyve.mdm.agent"
android:versionCode="40"
android:versionName="1.0.42">
android:versionCode="50"
android:versionName="1.0.52">

<!-- For writing logfiles -->
<uses-permission android:name="android.permisson.READ_EXTERNAL_STORAGE" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ public static String getSyncWebData(String url, String method, Map<String, Strin
conn.setConnectTimeout(timeout);
conn.setReadTimeout(readtimeout);
conn.setInstanceFollowRedirects(true);
conn.setRequestMethod(method);

if(header != null) {
for (Map.Entry<String, String> entry : header.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ public void run() {

JSONObject jsonFullSession = new JSONObject(dataFullSession);
jsonSession = jsonFullSession.getJSONObject("session");
JSONObject jsonActiveProfile = jsonSession.getJSONObject("glpiactiveprofile");
String profileId = jsonActiveProfile.getString("id");
String profileId = jsonSession.getString("plugin_flyvemdm_guest_profiles_id");

cache.setProfileId( profileId );

// STEP 3 Activated the profile
final String dataActiveProfile = getSyncWebData(routes.changeActiveProfile(cache.getProfileId()), "GET", header);
final String dataActiveProfile = getSyncWebData(routes.changeActiveProfile(cache.getProfileId()), "POST", header);
final String errorActiveProfile = manageError(dataActiveProfile);
if(!errorActiveProfile.equals("")) {
EnrollmentHelper.runOnUI(new Runnable() {
Expand Down Expand Up @@ -253,7 +253,7 @@ public void run() {
FlyveLog.e(error);
EnrollmentHelper.runOnUI(new Runnable() {
public void run() {
callback.onError(error);
callback.onError(context.getResources().getString(R.string.ERROR_INTERNAL));
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/flyve/mdm/agent/utils/Helpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static String base64encode(String text) {
public static String getDeviceSerial() {
String serial;
if(Build.SERIAL.equalsIgnoreCase("unknown")) {
serial = "ABCDEFGHIJ123456";
serial = "ABCDEFGHIJ1234568";
} else {
serial = Build.SERIAL;
}
Expand Down
31 changes: 23 additions & 8 deletions app/src/main/java/org/flyve/mdm/agent/utils/Routes.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
public class Routes {

private String url;
DataStorage cache;
private DataStorage cache;

/**
* Constructor
Expand All @@ -54,15 +54,20 @@ public Routes(Context context) {
* @return String with the url
*/
public String initSession(String userToken) {
return url + "/initSession?user_token=" + userToken;
String str = url + "/initSession?user_token=" + userToken;
FlyveLog.d("initSession URL: ", str);
return str;
}

/**
* getFullSession url
* @return String with the url
*/
public String getFullSession() {
return url + "/getFullSession";
String str = url + "/getFullSession";
FlyveLog.d("getFullSession: ", str);
return str;

}

/**
Expand All @@ -71,15 +76,19 @@ public String getFullSession() {
* @return String with the url
*/
public String changeActiveProfile(String profileId) {
return url + "/changeActiveProfile?profile_id=" + profileId;
String str = url + "/changeActiveProfile?profiles_id=" + profileId;
FlyveLog.d("changeActiveProfile: ", str);
return str;
}

/**
* PluginFlyvemdmAgent url
* @return String with the url
*/
public String pluginFlyvemdmAgent() {
return url + "/PluginFlyvemdmAgent";
String str = url + "/PluginFlyvemdmAgent";
FlyveLog.d("pluginFlyvemdmAgent: ", str);
return str;
}

/**
Expand All @@ -88,7 +97,9 @@ public String pluginFlyvemdmAgent() {
* @return String with the url
*/
public String pluginFlyvemdmAgent(String agentId) {
return url + "/PluginFlyvemdmAgent/" + agentId;
String str = url + "/PluginFlyvemdmAgent/" + agentId;
FlyveLog.d("pluginFlyvemdmAgent: ", str);
return str;
}

/**
Expand All @@ -97,7 +108,9 @@ public String pluginFlyvemdmAgent(String agentId) {
* @return String url
*/
public String PluginFlyvemdmFile(String fileId, String sessionToken) {
return url + "/PluginFlyvemdmFile/" + fileId + "?session_token=" + sessionToken;
String str = url + "/PluginFlyvemdmFile/" + fileId + "?session_token=" + sessionToken;
FlyveLog.d("PluginFlyvemdmFile: ", str);
return str;
}

/**
Expand All @@ -106,7 +119,9 @@ public String PluginFlyvemdmFile(String fileId, String sessionToken) {
* @return String url
*/
public String PluginFlyvemdmPackage(String fileId, String sessionToken) {
return url + "/PluginFlyvemdmPackage/" + fileId + "?session_token=" + sessionToken;
String str = url + "/PluginFlyvemdmPackage/" + fileId + "?session_token=" + sessionToken;
FlyveLog.d("PluginFlyvemdmPackage: ", str);
return str;
}


Expand Down