mirror of
https://github.com/QuasarApp/QtAndroidTools.git
synced 2025-04-27 05:24:31 +00:00
Updated project to androidx package support
This commit is contained in:
parent
783e2be3ea
commit
70a8fbf7be
@ -643,7 +643,7 @@ for(var i = 0; i < filesList.length; i++)
|
||||
<data android:mimeType="image/*"/>
|
||||
</intent-filter></pre>
|
||||
<p>Regarding the file sharing provider the code is the following:</p>
|
||||
<pre><provider android:name="android.support.v4.content.FileProvider"
|
||||
<pre><provider android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.qtandroidtoolsfileprovider"
|
||||
android:grantUriPermissions="true"
|
||||
android:exported="false">
|
||||
|
@ -163,10 +163,9 @@ const QString& QAndroidNotification::getSmallIconName() const
|
||||
void QAndroidNotification::setSmallIconName(const QString &smallIconName)
|
||||
{
|
||||
const QAndroidJniObject activity = QtAndroid::androidActivity();
|
||||
QAndroidJniObject packageName, packageManager, resources;
|
||||
QAndroidJniObject packageName, resources;
|
||||
int smallIconResourceId;
|
||||
|
||||
packageManager = activity.callObjectMethod("getPackageManager", "()Landroid/content/pm/PackageManager;");
|
||||
packageName = activity.callObjectMethod("getPackageName", "()Ljava/lang/String;");
|
||||
resources = activity.callObjectMethod("getResources", "()Landroid/content/res/Resources;");
|
||||
|
||||
|
@ -35,7 +35,7 @@ import android.os.AsyncTask;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.content.ComponentName;
|
||||
import android.support.annotation.NonNull;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.google.android.gms.auth.api.signin.GoogleSignIn;
|
||||
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
|
||||
import com.google.android.gms.auth.api.signin.GoogleSignInClient;
|
||||
|
@ -33,8 +33,8 @@ import android.content.Intent;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.support.v4.app.NotificationManagerCompat;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
import androidx.core.app.NotificationCompat;
|
||||
|
||||
public class AndroidNotification
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ import android.os.Bundle;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.content.ComponentName;
|
||||
import android.support.v4.content.FileProvider;
|
||||
import androidx.core.content.FileProvider;
|
||||
import android.content.ContentResolver;
|
||||
import android.database.Cursor;
|
||||
import android.provider.OpenableColumns;
|
||||
|
@ -22,7 +22,7 @@ import android.os.Build;
|
||||
import android.os.Environment;
|
||||
import android.os.StatFs;
|
||||
import android.os.SystemClock;
|
||||
import android.support.annotation.StringRes;
|
||||
import androidx.annotation.StringRes;
|
||||
import android.util.Log;
|
||||
|
||||
//import com.android.vending.expansion.downloader.R;
|
||||
|
@ -4,7 +4,7 @@ import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
import com.google.android.vending.expansion.downloader.DownloadProgressInfo;
|
||||
import com.google.android.vending.expansion.downloader.IDownloaderClient;
|
||||
import com.google.android.vending.expansion.downloader.IDownloaderService;
|
||||
|
@ -3,7 +3,7 @@ package com.google.android.vending.expansion.downloader.impl;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
import com.google.android.vending.expansion.downloader.DownloadProgressInfo;
|
||||
import com.google.android.vending.expansion.downloader.IDownloaderClient;
|
||||
|
||||
|
@ -19,8 +19,8 @@ package com.google.android.vending.expansion.downloader.impl;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.core.app.NotificationCompat;
|
||||
|
||||
//import com.android.vending.expansion.downloader.R;
|
||||
import com.falsinsoft.qtandroidtools.AndroidApkExpansionFiles;
|
||||
|
@ -17,7 +17,8 @@ RESOURCES += \
|
||||
|
||||
OTHER_FILES += \
|
||||
android/AndroidManifest.xml \
|
||||
android/build.gradle
|
||||
android/build.gradle \
|
||||
android/gradle.properties
|
||||
|
||||
android {
|
||||
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<manifest package="com.falsinsoft.QtAndroidToolsDemo" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
|
||||
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --" android:extractNativeLibs="true" android:icon="@drawable/icon">
|
||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="unspecified" android:launchMode="singleTop" android:theme="@android:style/Theme.Translucent.NoTitleBar">
|
||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="portrait" android:launchMode="singleTop" android:theme="@android:style/Theme.Translucent.NoTitleBar">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
@ -81,11 +81,14 @@
|
||||
<meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/>
|
||||
</service>
|
||||
<receiver android:name="com.google.android.vending.expansion.downloader.impl.DownloaderService$AlarmReceiver" android:enabled="true"/>
|
||||
<provider android:name="android.support.v4.content.FileProvider" android:authorities="${applicationId}.qtandroidtoolsfileprovider" android:grantUriPermissions="true" android:exported="false">
|
||||
<provider android:name="androidx.core.content.FileProvider" android:authorities="${applicationId}.qtandroidtoolsfileprovider" android:grantUriPermissions="true" android:exported="false">
|
||||
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/sharedfilepaths"/>
|
||||
</provider>
|
||||
</provider>
|
||||
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-3940256099942544~3347511713"/>
|
||||
<meta-data android:name="com.google.android.gms.ads.AD_MANAGER_APP" android:value="true"/>
|
||||
</application>
|
||||
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28"/>
|
||||
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
|
||||
|
||||
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
|
||||
|
@ -18,9 +18,8 @@ apply plugin: 'com.android.application'
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
||||
implementation 'com.android.support:support-v4:26.+'
|
||||
implementation 'com.google.android.gms:play-services-ads:16.+'
|
||||
implementation 'com.google.android.gms:play-services-auth:16.+'
|
||||
implementation 'com.google.android.gms:play-services-ads:19.+'
|
||||
implementation 'com.google.android.gms:play-services-auth:18.+'
|
||||
implementation 'com.google.http-client:google-http-client-gson:1.26.0'
|
||||
implementation('com.google.api-client:google-api-client-android:1.26.0') {
|
||||
exclude group: 'org.apache.httpcomponents'
|
||||
|
2
QtAndroidToolsDemo/android/gradle.properties
Normal file
2
QtAndroidToolsDemo/android/gradle.properties
Normal file
@ -0,0 +1,2 @@
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
Loading…
x
Reference in New Issue
Block a user