diff --git a/app/build.gradle b/app/build.gradle index 887f11de..ecedc2ad 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 25 - buildToolsVersion '27.0.3' + compileSdkVersion 27 + buildToolsVersion '28.0.2' defaultConfig { applicationId "com.m2049r.xmrwallet" minSdkVersion 21 - targetSdkVersion 25 + targetSdkVersion 27 versionCode 113 versionName "1.6.3 'Nano S'" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -70,11 +70,11 @@ android { } dependencies { - implementation 'com.android.support:appcompat-v7:25.4.0' - implementation 'com.android.support:design:25.4.0' - implementation 'com.android.support:support-v4:25.4.0' - implementation 'com.android.support:recyclerview-v7:25.4.0' - implementation 'com.android.support:cardview-v7:25.4.0' + implementation "com.android.support:appcompat-v7:$rootProject.ext.supportVersion" + implementation "com.android.support:design:$rootProject.ext.supportVersion" + implementation "com.android.support:support-v4:$rootProject.ext.supportVersion" + implementation "com.android.support:recyclerview-v7:$rootProject.ext.supportVersion" + implementation "com.android.support:cardview-v7:$rootProject.ext.supportVersion" implementation 'me.dm7.barcodescanner:zxing:1.9.8' implementation "com.squareup.okhttp3:okhttp:$rootProject.ext.okHttpVersion" diff --git a/app/src/main/java/com/m2049r/xmrwallet/service/WalletService.java b/app/src/main/java/com/m2049r/xmrwallet/service/WalletService.java index f5d67dfc..cfbcb9bf 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/service/WalletService.java +++ b/app/src/main/java/com/m2049r/xmrwallet/service/WalletService.java @@ -17,17 +17,22 @@ package com.m2049r.xmrwallet.service; import android.app.Notification; +import android.app.NotificationChannel; +import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; import android.content.Context; import android.content.Intent; import android.os.Binder; +import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.Message; import android.os.Process; +import android.support.annotation.RequiresApi; +import android.support.v4.app.NotificationCompat; import com.m2049r.xmrwallet.R; import com.m2049r.xmrwallet.WalletActivity; @@ -45,6 +50,7 @@ public class WalletService extends Service { public static boolean Running = false; final static int NOTIFICATION_ID = 2049; + final static String CHANNEL_ID = "m_service"; public static final String REQUEST_WALLET = "wallet"; public static final String REQUEST = "request"; @@ -566,11 +572,26 @@ public class WalletService extends Service { private void startNotfication() { Intent notificationIntent = new Intent(this, WalletActivity.class); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); - Notification notification = new Notification.Builder(this) + + String channelId = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O ? createNotificationChannel() : ""; + Notification notification = new NotificationCompat.Builder(this, channelId) .setContentTitle(getString(R.string.service_description)) + .setOngoing(true) .setSmallIcon(R.drawable.ic_monerujo) + .setPriority(NotificationCompat.PRIORITY_MIN) + .setCategory(NotificationCompat.CATEGORY_SERVICE) .setContentIntent(pendingIntent) .build(); startForeground(NOTIFICATION_ID, notification); } + + @RequiresApi(Build.VERSION_CODES.O) + private String createNotificationChannel() { + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channel = new NotificationChannel(CHANNEL_ID, getString(R.string.service_description), + NotificationManager.IMPORTANCE_LOW); + channel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE); + notificationManager.createNotificationChannel(channel); + return CHANNEL_ID; + } } diff --git a/app/src/main/res/values-fr/help.xml b/app/src/main/res/values-fr/help.xml index f147baad..d235b1e8 100644 --- a/app/src/main/res/values-fr/help.xml +++ b/app/src/main/res/values-fr/help.xml @@ -30,7 +30,7 @@ <p>Entrez votre phrase Mnémonique dans le champ \"Phrase Mnémonique\".<p> <p>Entrez le numéro du bloc de la première transaction utilisée pour cette adresse dans le champ \"Hauteur de restauration\". Vous pouvez également utiliser une date au format AAA-MM-JJ. - Si vous n'êtes pas sûr, entrer une date / hauteur de block approximative <em>avant</em> que vous + Si vous n\'êtes pas sûr, entrer une date / hauteur de block approximative <em>avant</em> que vous n’ayez utilisé cette adresse de portefeuille pour la première fois.</p> ]]></string> @@ -43,7 +43,7 @@ <p>Entrez votre adresse Monero dans le champ \"Adresse Publique\" et remplissez \"Clef d’Audit\" et \"Clef de dépense\".</p> <p>Entrez le numéro du bloc de la première transaction utilisée pour cette adresse dans le champ \"Hauteur de restauration\". Vous pouvez également utiliser une date au format AAA-MM-JJ. - Si vous n'êtes pas sûr, entrer une date / hauteur de block approximative <em>avant</em> que vous + Si vous n\'êtes pas sûr, entrer une date / hauteur de block approximative <em>avant</em> que vous n’ayez utilisé cette adresse de portefeuille pour la première fois.</p> ]]></string> @@ -56,7 +56,7 @@ <p>Entrez votre adresse Monero dans le champ \"Adresse Publique\" et remplissez la \"Clef d’Audit\".</p> <p>Entrez le numéro du bloc de la première transaction utilisée pour cette adresse dans le champ \"Hauteur de restauration\". Vous pouvez également utiliser une date au format AAA-MM-JJ. - Si vous n'êtes pas sûr, entrer une date / hauteur de block approximative <em>avant</em> que vous + Si vous n\'êtes pas sûr, entrer une date / hauteur de block approximative <em>avant</em> que vous n’ayez utilisé cette adresse de portefeuille pour la première fois.</p> ]]></string> @@ -257,7 +257,7 @@ fort, ou mieux, utilisez une phrase de sécurité.</p> <p>Entrez le numéro du bloc de la première transaction utilisée pour cette adresse dans le champ \"Hauteur de restauration\". Vous pouvez également utiliser une date au format AAA-MM-JJ. - Si vous n'êtes pas sûr, entrer une date / hauteur de block approximative <em>avant</em> que vous + Si vous n\'êtes pas sûr, entrer une date / hauteur de block approximative <em>avant</em> que vous n’ayez utilisé cette adresse de portefeuille pour la première fois.</p> ]]></string> </resources> diff --git a/app/src/main/res/values-it/about.xml b/app/src/main/res/values-it/about.xml index c3bc9e84..4f7db23c 100644 --- a/app/src/main/res/values-it/about.xml +++ b/app/src/main/res/values-it/about.xml @@ -27,8 +27,8 @@ <p>Altri dati personali non sono raccolti dall\'app.</p> <p>Se usi la funzionalità (opzionale) del cambio, monerujo recupera il tasso di cambio attraverso le API pubbliche di coinmarketcap.com. Controlla la loro politica per la privacy (in lingua inglese) su https://coinmarketcap.com/privacy per conoscere i dettagli su come vengono raccolti i dati nelle tue richieste.</p> - <p>Se utilizzi l'app per effettuare pagamenti ad indirizzi BTC, stai usando il servizio XMR.TO. - Controlla la loro politica per la privacy (in lingua inglese) su https://xmr.to/ per conoscere i dettagli. Monerujo invia a loro l'indirizzo di destinazione BTC e l'ammontare della transazione. Anche il tuo IP potrebbe essere raccolto.</p> + <p>Se utilizzi l\'app per effettuare pagamenti ad indirizzi BTC, stai usando il servizio XMR.TO. + Controlla la loro politica per la privacy (in lingua inglese) su https://xmr.to/ per conoscere i dettagli. Monerujo invia a loro l\'indirizzo di destinazione BTC e l\'ammontare della transazione. Anche il tuo IP potrebbe essere raccolto.</p> <h2>Permessi app</h2> <ul> <li>INTERNET : Connessione alla rete Monero attraverso un nodo </li> diff --git a/app/src/main/res/values-it/help.xml b/app/src/main/res/values-it/help.xml index 42af9886..52d540a5 100644 --- a/app/src/main/res/values-it/help.xml +++ b/app/src/main/res/values-it/help.xml @@ -58,24 +58,24 @@ E' molto importante mantenerlo privato e conservarlo in un luogo sicuro, poiché può concedere a <em>chiunque</em> pieno accesso ai tuoi Moneroj! Se non lo hai già fatto, annotati il Seed Mnemonico e conservalo in un luogo sicuro! <h2>Password di ripristino dei file del portafoglio</h2> - Assicurati di aver salvato questa password. Se resetti il tuo dispositivo o disinstalli l'app + Assicurati di aver salvato questa password. Se resetti il tuo dispositivo o disinstalli l\'app ne avrai bisogno per accedere di nuovo al tuo portafoglio.<br/> <h3>CrAzYpass</h3> Se la password visualizzata qui contiene 52 caratteri alfanumerici in gruppi di 4 - Congratulazioni! I file del tuo portafoglio sono criptati con una chiave a 256-bit generata dal tuo dispositivo - e basata sulla passphrase che hai scelto (alla creazione o quando l'hai modificata). Questo la rende estremamente + e basata sulla passphrase che hai scelto (alla creazione o quando l\'hai modificata). Questo la rende estremamente difficile da hackerare!<br/> Questa funzionalità è obbligatoria per tutti i nuovi portafogli. <h3>Password precedente</h3> Se vedi la tua passphrase qui, i file del tuo portaglio non sono così sicuri come quelli criptati da CrAzYpass. Per adeguare la tua password semplicemente seleziona \"Cambia Passphrase\" dal menu. - Dopo aver inserito una nuova passphrase (eventualmente la stessa usata in precedenza) l'applicazione genererà + Dopo aver inserito una nuova passphrase (eventualmente la stessa usata in precedenza) l\'applicazione genererà una CrAzYpass per te e la userà per mettere al sicuro i file del tuo wallet. Annotala! <h3>Portafogli CrAzYpass</h3> Se dovessi avere bisogno di reinstallare Monerujo (per esempio dopo aver resettato il tuo telefono o dopo averlo sostituito) o vuoi usare i file del tuo portafoglio su un diverso dispositivo o PC, devi usare questa password di recupero per poter accedere nuovamente al tuo portafoglio.<br/> - Selezionando \'Cambia Passphrase\' dal menu, potrai scegliere un'altra passphrase. Questa azione + Selezionando \'Cambia Passphrase\' dal menu, potrai scegliere un\'altra passphrase. Questa azione creerà una nuova password di recupero. Ricordati di annotarla! <h2>Chiave di Visualizzazione</h2> La tua chiave di visualizzazione può essere usata per monitorare le transazioni in ingresso al tuo portafoglio senza concedere il permesso di spendere i fondi. diff --git a/app/src/main/res/values/about.xml b/app/src/main/res/values/about.xml index 16f0cc2d..95eca976 100644 --- a/app/src/main/res/values/about.xml +++ b/app/src/main/res/values/about.xml @@ -392,7 +392,7 @@ included with this distribution is covered by the same copyright terms except that the holder is Tim Hudson (tjh@cryptsoft.com).<br/> <br/> - Copyright remains Eric Young's, and as such any Copyright notices in + Copyright remains Eric Young\'s, and as such any Copyright notices in the code are not to be removed. If this package is used in a product, Eric Young should be given attribution as the author of the parts of the library used. @@ -411,13 +411,13 @@ must display the following acknowledgement:<br/> \"This product includes cryptographic software written by Eric Young (eay@cryptsoft.com)\" - The word 'cryptographic' can be left out if the rouines from the library + The word \'cryptographic\' can be left out if the rouines from the library being used are not cryptographic related :-).<br/> 4. If you include any Windows specific code (or a derivative thereof) from the apps directory (application code) you must include an acknowledgement: \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"<br/> <br/> - THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + THIS SOFTWARE IS PROVIDED BY ERIC YOUNG "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE @@ -545,7 +545,7 @@ terms of any subsequent revision of the license.<br/> <br/> THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND ITS - CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + CONTRIBUTORS "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION, ITS CONTRIBUTORS, OR THE AUTHOR(S) @@ -595,7 +595,7 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - <h2>'Poppins' Font</h2> + <h2>\'Poppins\' Font</h2> <h3>SIL Open Font License</h3> <p>Copyright (c) 2014, Indian Type Foundry (info@indiantypefoundry.com).</p> <p>This Font Software is licensed under the SIL Open Font License, Version 1.1.<br /> diff --git a/build.gradle b/build.gradle index 71ff2494..28fb6c15 100644 --- a/build.gradle +++ b/build.gradle @@ -16,6 +16,7 @@ allprojects { maven { url "https://maven.google.com" } + google() } } @@ -29,4 +30,5 @@ ext { junitVersion = '4.12' mockitoVersion = '1.10.19' timberVersion = '4.7.0' + supportVersion = '27.1.1' }