Update to Android API 34 (Android 14) (#420)
## What changes were proposed in this pull request? * Update to Android API 34 (Android 14) * Remove Firebase Analytics ## How was this patch tested? Manually. Reviewed-on: #420 Co-authored-by: Amab <juanmi1982@gmail.com> Co-committed-by: Amab <juanmi1982@gmail.com>
This commit is contained in:
parent
f18a03c6cb
commit
8fd41782ad
|
@ -12,8 +12,8 @@ steps:
|
||||||
privileged: true
|
privileged: true
|
||||||
commands:
|
commands:
|
||||||
# Create and run emulator
|
# Create and run emulator
|
||||||
- echo "no" | avdmanager --verbose create avd --force --name "generic_33" --package "system-images;android-33;google_apis;x86_64" --tag "google_apis" --abi "x86_64"
|
- echo "no" | avdmanager --verbose create avd --force --name "generic_34" --package "system-images;android-34;google_apis;x86_64" --tag "google_apis" --abi "x86_64"
|
||||||
- emulator -avd "generic_33" -no-window -no-audio -no-boot-anim -netdelay none -no-snapshot -wipe-data -partition-size 1024 &
|
- emulator -avd "generic_34" -no-window -no-audio -no-boot-anim -netdelay none -no-snapshot -wipe-data -partition-size 1024 &
|
||||||
# Wait for emulator to be ready
|
# Wait for emulator to be ready
|
||||||
- android-wait-for-emulator.sh
|
- android-wait-for-emulator.sh
|
||||||
# Run tests
|
# Run tests
|
||||||
|
|
|
@ -2,7 +2,6 @@ plugins {
|
||||||
id 'com.gladed.androidgitversion' version '0.4.14'
|
id 'com.gladed.androidgitversion' version '0.4.14'
|
||||||
}
|
}
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'com.google.gms.google-services'
|
|
||||||
|
|
||||||
//return a BuildConfigField from a properties file.
|
//return a BuildConfigField from a properties file.
|
||||||
def static getBuildConfigField(String property){
|
def static getBuildConfigField(String property){
|
||||||
|
@ -40,8 +39,8 @@ if (build_param != "prod") {
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'es.ugr.swad.swadroid'
|
namespace 'es.ugr.swad.swadroid'
|
||||||
compileSdkVersion 33
|
compileSdkVersion 34
|
||||||
buildToolsVersion "33.0.2"
|
buildToolsVersion "34.0.0"
|
||||||
|
|
||||||
lint {
|
lint {
|
||||||
abortOnError false
|
abortOnError false
|
||||||
|
@ -58,7 +57,7 @@ android {
|
||||||
versionCode androidGitVersion.code()
|
versionCode androidGitVersion.code()
|
||||||
|
|
||||||
minSdkVersion 24
|
minSdkVersion 24
|
||||||
targetSdkVersion 33
|
targetSdkVersion 34
|
||||||
|
|
||||||
testApplicationId "es.ugr.swad.swadroid.test"
|
testApplicationId "es.ugr.swad.swadroid.test"
|
||||||
testInstrumentationRunner "android.test.InstrumentationTestRunner"
|
testInstrumentationRunner "android.test.InstrumentationTestRunner"
|
||||||
|
@ -85,6 +84,4 @@ dependencies {
|
||||||
implementation 'com.google.zxing:core:3.5.1'
|
implementation 'com.google.zxing:core:3.5.1'
|
||||||
implementation 'com.google.code.gson:gson:2.10.1'
|
implementation 'com.google.code.gson:gson:2.10.1'
|
||||||
implementation 'com.google.android.material:material:1.9.0'
|
implementation 'com.google.android.material:material:1.9.0'
|
||||||
implementation platform('com.google.firebase:firebase-bom:32.1.0')
|
|
||||||
implementation 'com.google.firebase:firebase-analytics'
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
{
|
|
||||||
"project_info": {
|
|
||||||
"project_number": "398995989132",
|
|
||||||
"firebase_url": "https://swadroid-1190.firebaseio.com",
|
|
||||||
"project_id": "swadroid-1190",
|
|
||||||
"storage_bucket": "swadroid-1190.appspot.com"
|
|
||||||
},
|
|
||||||
"client": [
|
|
||||||
{
|
|
||||||
"client_info": {
|
|
||||||
"mobilesdk_app_id": "1:398995989132:android:cf9fabf2a9cd64da",
|
|
||||||
"android_client_info": {
|
|
||||||
"package_name": "es.ugr.swad.swadroid"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"oauth_client": [
|
|
||||||
{
|
|
||||||
"client_id": "398995989132-23hrn3d7s4unrfftra30hekdtvrk1pdv.apps.googleusercontent.com",
|
|
||||||
"client_type": 1,
|
|
||||||
"android_info": {
|
|
||||||
"package_name": "es.ugr.swad.swadroid",
|
|
||||||
"certificate_hash": "11890c064b1d34fe0e6486e214439c9aa1083a70"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"client_id": "398995989132-olrnp4ilkdh8ggh54ruj65rocacs2pgc.apps.googleusercontent.com",
|
|
||||||
"client_type": 1,
|
|
||||||
"android_info": {
|
|
||||||
"package_name": "es.ugr.swad.swadroid",
|
|
||||||
"certificate_hash": "17c4f28f7db5404990ebfcf626b582cc8e8b54de"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"client_id": "398995989132-os2h8neftvc80bq785s4bqj4osmanc7l.apps.googleusercontent.com",
|
|
||||||
"client_type": 3
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"api_key": [
|
|
||||||
{
|
|
||||||
"current_key": "AIzaSyCyEiJ-L6CrIsiF99OUXi4UvQV2TzCVNMA"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"services": {
|
|
||||||
"appinvite_service": {
|
|
||||||
"other_platform_oauth_client": [
|
|
||||||
{
|
|
||||||
"client_id": "398995989132-os2h8neftvc80bq785s4bqj4osmanc7l.apps.googleusercontent.com",
|
|
||||||
"client_type": 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"configuration_version": "1"
|
|
||||||
}
|
|
|
@ -18,6 +18,7 @@
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||||
|
|
||||||
|
@ -47,8 +48,6 @@
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/Theme.AppCompat.Light"
|
android:theme="@style/Theme.AppCompat.Light"
|
||||||
android:hardwareAccelerated="true">
|
android:hardwareAccelerated="true">
|
||||||
<meta-data android:name="com.google.android.gms.version"
|
|
||||||
android:value="@integer/google_play_services_version" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name="es.ugr.swad.swadroid.SWADMain"
|
android:name="es.ugr.swad.swadroid.SWADMain"
|
||||||
android:icon="@drawable/ic_launcher_swadroid"
|
android:icon="@drawable/ic_launcher_swadroid"
|
||||||
|
@ -358,7 +357,8 @@
|
||||||
</service>
|
</service>
|
||||||
<service
|
<service
|
||||||
android:name="es.ugr.swad.swadroid.modules.notifications.NotificationsSyncAdapterService"
|
android:name="es.ugr.swad.swadroid.modules.notifications.NotificationsSyncAdapterService"
|
||||||
android:exported="false" >
|
android:exported="false"
|
||||||
|
android:foregroundServiceType="dataSync" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.content.SyncAdapter" />
|
<action android:name="android.content.SyncAdapter" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
|
@ -29,8 +29,6 @@ import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
|
||||||
|
|
||||||
import org.ksoap2.SoapFault;
|
import org.ksoap2.SoapFault;
|
||||||
import org.ksoap2.transport.HttpResponseException;
|
import org.ksoap2.transport.HttpResponseException;
|
||||||
import org.kxml2.kdom.Element;
|
import org.kxml2.kdom.Element;
|
||||||
|
@ -65,10 +63,6 @@ public abstract class Module extends MenuActivity {
|
||||||
* Class Module's tag name for Logcat
|
* Class Module's tag name for Logcat
|
||||||
*/
|
*/
|
||||||
private static final String TAG = Constants.APP_TAG + " Module";
|
private static final String TAG = Constants.APP_TAG + " Module";
|
||||||
/**
|
|
||||||
* Obtain Firebase Analytics instance
|
|
||||||
*/
|
|
||||||
protected FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
|
|
||||||
/**
|
/**
|
||||||
* Async Task for background jobs
|
* Async Task for background jobs
|
||||||
*/
|
*/
|
||||||
|
@ -207,6 +201,8 @@ public abstract class Module extends MenuActivity {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
|
||||||
if (resultCode == Activity.RESULT_OK) {
|
if (resultCode == Activity.RESULT_OK) {
|
||||||
switch (requestCode) {
|
switch (requestCode) {
|
||||||
case Constants.LOGIN_REQUEST_CODE:
|
case Constants.LOGIN_REQUEST_CODE:
|
||||||
|
|
|
@ -21,8 +21,6 @@ package es.ugr.swad.swadroid.modules.account;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
|
||||||
|
|
||||||
import org.ksoap2.SoapFault;
|
import org.ksoap2.SoapFault;
|
||||||
import org.ksoap2.serialization.SoapObject;
|
import org.ksoap2.serialization.SoapObject;
|
||||||
|
|
||||||
|
@ -124,10 +122,6 @@ public class CreateAccount extends Module {
|
||||||
|
|
||||||
//Request finalized without errors
|
//Request finalized without errors
|
||||||
setResult(RESULT_OK);
|
setResult(RESULT_OK);
|
||||||
|
|
||||||
Bundle bundle = new Bundle();
|
|
||||||
bundle.putString(FirebaseAnalytics.Param.METHOD, "requestService");
|
|
||||||
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SIGN_UP, bundle);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -22,8 +22,6 @@ package es.ugr.swad.swadroid.modules.login;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
|
||||||
|
|
||||||
import org.ksoap2.SoapFault;
|
import org.ksoap2.SoapFault;
|
||||||
import org.ksoap2.serialization.SoapObject;
|
import org.ksoap2.serialization.SoapObject;
|
||||||
|
|
||||||
|
@ -175,10 +173,6 @@ public class Login extends Module {
|
||||||
|
|
||||||
//Request finalized without errors
|
//Request finalized without errors
|
||||||
setResult(RESULT_OK);
|
setResult(RESULT_OK);
|
||||||
|
|
||||||
Bundle bundle = new Bundle();
|
|
||||||
bundle.putString(FirebaseAnalytics.Param.METHOD, "requestService");
|
|
||||||
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.LOGIN, bundle);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -39,6 +39,7 @@ import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||||
|
|
||||||
import org.ksoap2.serialization.SoapObject;
|
import org.ksoap2.serialization.SoapObject;
|
||||||
|
@ -279,8 +280,8 @@ public class Notifications extends Module implements
|
||||||
mBirthdayLayout = (LinearLayout) findViewById(R.id.notify_layout);
|
mBirthdayLayout = (LinearLayout) findViewById(R.id.notify_layout);
|
||||||
mBirthdayTextView = findViewById(R.id.notifyTextView);
|
mBirthdayTextView = findViewById(R.id.notifyTextView);
|
||||||
|
|
||||||
groupItem = new ArrayList<>();
|
groupItem = new ArrayList<>();
|
||||||
childItem = new ArrayList<>();
|
childItem = new ArrayList<>();
|
||||||
|
|
||||||
//Init ExpandableListView
|
//Init ExpandableListView
|
||||||
initSwipeOptions();
|
initSwipeOptions();
|
||||||
|
@ -340,7 +341,7 @@ public class Notifications extends Module implements
|
||||||
intentFilter.addAction(NotificationsSyncAdapterService.START_SYNC);
|
intentFilter.addAction(NotificationsSyncAdapterService.START_SYNC);
|
||||||
intentFilter.addAction(NotificationsSyncAdapterService.STOP_SYNC);
|
intentFilter.addAction(NotificationsSyncAdapterService.STOP_SYNC);
|
||||||
intentFilter.addAction(Intent.CATEGORY_DEFAULT);
|
intentFilter.addAction(Intent.CATEGORY_DEFAULT);
|
||||||
registerReceiver(receiver, intentFilter);
|
ContextCompat.registerReceiver(this, receiver, intentFilter, ContextCompat.RECEIVER_NOT_EXPORTED);
|
||||||
|
|
||||||
Log.i(TAG, "Registered receiver for automatic synchronization");
|
Log.i(TAG, "Registered receiver for automatic synchronization");
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,6 @@ import android.preference.PreferenceScreen;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
|
||||||
|
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -62,10 +60,6 @@ public class PreferencesActivity extends PreferenceActivity implements OnPrefere
|
||||||
* PreferencesActivity tag name for Logcat
|
* PreferencesActivity tag name for Logcat
|
||||||
*/
|
*/
|
||||||
private static final String TAG = Constants.APP_TAG + " PreferencesActivity";
|
private static final String TAG = Constants.APP_TAG + " PreferencesActivity";
|
||||||
/**
|
|
||||||
* Obtain Firebase Analytics instance
|
|
||||||
*/
|
|
||||||
protected FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
|
|
||||||
/**
|
/**
|
||||||
* Application context
|
* Application context
|
||||||
*/
|
*/
|
||||||
|
@ -217,11 +211,6 @@ public class PreferencesActivity extends PreferenceActivity implements OnPrefere
|
||||||
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, getString(R.string.shareBodyMsg));
|
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, getString(R.string.shareBodyMsg));
|
||||||
startActivity(Intent.createChooser(sharingIntent, getString(R.string.shareTitle_menu)));
|
startActivity(Intent.createChooser(sharingIntent, getString(R.string.shareTitle_menu)));
|
||||||
|
|
||||||
Bundle bundle = new Bundle();
|
|
||||||
bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "1");
|
|
||||||
bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "text");
|
|
||||||
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SHARE, bundle);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -43,7 +43,7 @@ public final class PeriodicSyncReceiver extends BroadcastReceiver {
|
||||||
public static PendingIntent createPendingIntent(Context context, String authority, Bundle extras) {
|
public static PendingIntent createPendingIntent(Context context, String authority, Bundle extras) {
|
||||||
int requestCode = 0;
|
int requestCode = 0;
|
||||||
Intent intent = createIntent(context, authority);
|
Intent intent = createIntent(context, authority);
|
||||||
int flags = 0;
|
int flags = PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE;
|
||||||
return PendingIntent.getBroadcast(context, requestCode, intent, flags);
|
return PendingIntent.getBroadcast(context, requestCode, intent, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ buildscript {
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:8.0.2'
|
classpath 'com.android.tools.build:gradle:8.0.2'
|
||||||
classpath 'com.google.gms:google-services:4.3.15'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user