kandi background
Explore Kits

android-times-square | Standalone Android widget for picking a single date | Widget library

 by   square Java Version: Current License: Apache-2.0

 by   square Java Version: Current License: Apache-2.0

Download this library from

kandi X-RAY | android-times-square Summary

android-times-square is a Java library typically used in User Interface, Widget applications.,roid-times-square has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub, Maven.
Standalone Android widget for picking a single date from a calendar view.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • android-times-square has a medium active ecosystem.
  • It has 4449 star(s) with 1210 fork(s). There are 238 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 35 open issues and 310 have been closed. On average issues are closed in 120 days. There are no pull requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of android-times-square is current.
android-times-square Support
Best in #Widget
Average in #Widget
android-times-square Support
Best in #Widget
Average in #Widget

quality kandi Quality

  • android-times-square has 0 bugs and 0 code smells.
android-times-square Quality
Best in #Widget
Average in #Widget
android-times-square Quality
Best in #Widget
Average in #Widget

securitySecurity

  • android-times-square has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • android-times-square code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
android-times-square Security
Best in #Widget
Average in #Widget
android-times-square Security
Best in #Widget
Average in #Widget

license License

  • android-times-square is licensed under the Apache-2.0 License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
android-times-square License
Best in #Widget
Average in #Widget
android-times-square License
Best in #Widget
Average in #Widget

buildReuse

  • android-times-square releases are not available. You will need to build from source code and install.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • android-times-square saves you 1326 person hours of effort in developing the same functionality from scratch.
  • It has 2993 lines of code, 212 functions and 59 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
android-times-square Reuse
Best in #Widget
Average in #Widget
android-times-square Reuse
Best in #Widget
Average in #Widget
Top functions reviewed by kandi - BETA

kandi has reviewed android-times-square and discovered the below as its top functions. This is intended to give you an instant insight into android-times-square implemented functionality, and help decide if they suit your requirements.

  • Initialize the button listeners .
  • Select a date .
  • Factory method for creating month view .
  • Perform a measure .
  • Rewrite the state of the drawable .
  • Returns a string representation of this month descriptor .
  • Sets the color of the cell s colors .
  • Make a cell view for the calendar .
  • Decorate the day of month .
  • Clears the index .

android-times-square Key Features

Standalone Android widget for picking a single date from a calendar view.

default

copy iconCopydownload iconDownload
Include `CalendarPickerView` in your layout XML.

```xml
<com.squareup.timessquare.CalendarPickerView
    android:id="@+id/calendar_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    />
```

This is a fairly large control so it is wise to give it ample space in your layout. On small
devices it is recommended to use a dialog, full-screen fragment, or dedicated activity. On larger
devices like tablets, displaying full-screen is not recommended. A fragment occupying part of the
layout or a dialog is a better choice.

In the `onCreate` of your activity/dialog or the `onCreateView` of your fragment, initialize the
view with a range of valid dates as well as the currently selected date.

```java
Calendar nextYear = Calendar.getInstance();
nextYear.add(Calendar.YEAR, 1);

CalendarPickerView calendar = (CalendarPickerView) findViewById(R.id.calendar_view);
Date today = new Date();
calendar.init(today, nextYear.getTime())
    .withSelectedDate(today);
```

The default mode of the view is to have one selectable date.  If you want the user to be able to
select multiple dates or a date range, use the inMode() method:

```java
calendar.init(today, nextYear.getTime())
    .inMode(RANGE);
```


Download
--------

The latest version can be downloaded in [zip][zip] and referenced by your application as a library
project.

You can also depend on the library through Maven:
```xml
<dependency>
  <groupId>com.squareup</groupId>
  <artifactId>android-times-square</artifactId>
  <version>1.6.5</version>
  <type>apklib</type>
</dependency>
```
or Gradle:
```groovy
compile 'com.squareup:android-times-square:1.6.5@aar'
```

Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap].


License
-------

    Copyright 2012 Square, Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.



 [zip]: https://github.com/square/android-times-square/archive/master.zip
 [snap]: https://oss.sonatype.org/content/repositories/snapshots/

How to change the text color of month in GitHub square calendar android

copy iconCopydownload iconDownload
<resources xmlns:tools="http://schemas.android.com/tools">
.
.
.
<style name="CustomCalendarTitle">
<item name="android:textSize">@dimen/calendar_text_medium</item>
<item name="android:gravity">center</item>
<item name="android:paddingBottom">@dimen/calendar_month_title_bottommargin</item>
<item name="android:paddingTop">@dimen/calendar_month_topmargin</item>
<item name="android:color">@color/custom_calendar_text_selector</item>
 <item name="android:textColor">@color/colorAccent</item>

</style>
</resources>
 <com.squareup.timessquare.CalendarPickerView
            android:id="@+id/calendar"
            android:layout_width="match_parent"
            android:layout_height="370dp"
            android:background="@color/calendar_bg">

        </com.squareup.timessquare.CalendarPickerView>
<com.squareup.timessquare.CalendarPickerView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/calendar_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/custom_background"
android:clipToPadding="false"
android:paddingBottom="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:scrollbarStyle="outsideOverlay"
app:tsquare_dayBackground="@drawable/custom_calendar_bg_selector"
app:tsquare_dayTextColor="@color/custom_calendar_text_selector"
app:tsquare_displayDayNamesHeaderRow="false"
app:tsquare_dividerColor="@color/transparent"
app:tsquare_headerTextColor="@color/custom_header_text"
app:tsquare_titleTextStyle="@style/CustomCalendarTitle"
/>
-----------------------
<resources xmlns:tools="http://schemas.android.com/tools">
.
.
.
<style name="CustomCalendarTitle">
<item name="android:textSize">@dimen/calendar_text_medium</item>
<item name="android:gravity">center</item>
<item name="android:paddingBottom">@dimen/calendar_month_title_bottommargin</item>
<item name="android:paddingTop">@dimen/calendar_month_topmargin</item>
<item name="android:color">@color/custom_calendar_text_selector</item>
 <item name="android:textColor">@color/colorAccent</item>

</style>
</resources>
 <com.squareup.timessquare.CalendarPickerView
            android:id="@+id/calendar"
            android:layout_width="match_parent"
            android:layout_height="370dp"
            android:background="@color/calendar_bg">

        </com.squareup.timessquare.CalendarPickerView>
<com.squareup.timessquare.CalendarPickerView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/calendar_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/custom_background"
android:clipToPadding="false"
android:paddingBottom="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:scrollbarStyle="outsideOverlay"
app:tsquare_dayBackground="@drawable/custom_calendar_bg_selector"
app:tsquare_dayTextColor="@color/custom_calendar_text_selector"
app:tsquare_displayDayNamesHeaderRow="false"
app:tsquare_dividerColor="@color/transparent"
app:tsquare_headerTextColor="@color/custom_header_text"
app:tsquare_titleTextStyle="@style/CustomCalendarTitle"
/>
-----------------------
<resources xmlns:tools="http://schemas.android.com/tools">
.
.
.
<style name="CustomCalendarTitle">
<item name="android:textSize">@dimen/calendar_text_medium</item>
<item name="android:gravity">center</item>
<item name="android:paddingBottom">@dimen/calendar_month_title_bottommargin</item>
<item name="android:paddingTop">@dimen/calendar_month_topmargin</item>
<item name="android:color">@color/custom_calendar_text_selector</item>
 <item name="android:textColor">@color/colorAccent</item>

</style>
</resources>
 <com.squareup.timessquare.CalendarPickerView
            android:id="@+id/calendar"
            android:layout_width="match_parent"
            android:layout_height="370dp"
            android:background="@color/calendar_bg">

        </com.squareup.timessquare.CalendarPickerView>
<com.squareup.timessquare.CalendarPickerView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/calendar_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/custom_background"
android:clipToPadding="false"
android:paddingBottom="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:scrollbarStyle="outsideOverlay"
app:tsquare_dayBackground="@drawable/custom_calendar_bg_selector"
app:tsquare_dayTextColor="@color/custom_calendar_text_selector"
app:tsquare_displayDayNamesHeaderRow="false"
app:tsquare_dividerColor="@color/transparent"
app:tsquare_headerTextColor="@color/custom_header_text"
app:tsquare_titleTextStyle="@style/CustomCalendarTitle"
/>

Community Discussions

Trending Discussions on android-times-square
  • Could not find com.huawei.hms:hwid:5.3.0.301 &amp; push kit when adding HMS alongside GMS using HMS Toolkit
  • How to change the text color of month in GitHub square calendar android
Trending Discussions on android-times-square

QUESTION

Could not find com.huawei.hms:hwid:5.3.0.301 &amp; push kit when adding HMS alongside GMS using HMS Toolkit

Asked 2021-Aug-26 at 11:48

I'm trying to add the HMS into our GMS first app. This is a massive application so we decided to try the HMS Toolkit conversion software. The toolkit added the necessary dependencies and modules and made the appropriate replacements where needed but when I try to build our application, I get the following errors regarding the generated module's dependencies:

Execution failed for task ':xmsadapter:generateDebugRFile'.
> Could not resolve all files for configuration ':xmsadapter:debugCompileClasspath'.
   > Could not find com.huawei.hms:hwid:5.3.0.301.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/com/huawei/hms/hwid/5.3.0.301/hwid-5.3.0.301.pom
       - https://jcenter.bintray.com/com/huawei/hms/hwid/5.3.0.301/hwid-5.3.0.301.pom
       - https://dl.google.com/dl/android/maven2/com/huawei/hms/hwid/5.3.0.301/hwid-5.3.0.301.pom
       - https://developer.huawei.com/repo/com/huawei/hms/hwid/5.3.0.301/hwid-5.3.0.301.pom
     Required by:
         project :xmsadapter
   > Could not find com.huawei.hms:push:5.3.0.300.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/com/huawei/hms/push/5.3.0.300/push-5.3.0.300.pom
       - https://jcenter.bintray.com/com/huawei/hms/push/5.3.0.300/push-5.3.0.300.pom
       - https://dl.google.com/dl/android/maven2/com/huawei/hms/push/5.3.0.300/push-5.3.0.300.pom
       - https://developer.huawei.com/repo/com/huawei/hms/push/5.3.0.300/push-5.3.0.300.pom
     Required by:
         project :xmsadapter

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':xmsadapter:xmsaux:xh:processDebugResources'.
> Could not resolve all files for configuration ':xmsadapter:xmsaux:xh:debugCompileClasspath'.
   > Could not find com.huawei.hms:push:5.3.0.300.
     Required by:
         project :xmsadapter:xmsaux:xh

Why can't gradle find the push and hwid kits in huawei's repos?

xmsadapter build.gradle:

apply plugin: 'com.android.library'
apply plugin: 'com.huawei.agconnect'
apply from: 'scripts/productFlavor.gradle'

android {
    compileSdkVersion 29
    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 29
    }

    compileOptions {
        sourceCompatibility = 1.8
        targetCompatibility = 1.8
    }

}

dependencies {
    //Account
    compileOnly 'com.google.android.gms:play-services-base:17.1.0'
    compileOnly 'com.google.android.gms:play-services-auth-base:17.1.0'
    compileOnly 'com.google.android.gms:play-services-basement:17.1.0'
    compileOnly 'com.google.android.gms:play-services-auth-api-phone:17.4.0'
    compileOnly 'com.huawei.hms:hwid:5.3.0.301'
    compileOnly 'com.google.android.gms:play-services-auth:18.0.0'
    //Basement
    compileOnly 'com.huawei.hms:base:6.0.1.302'
    compileOnly 'com.google.android.gms:play-services-tasks:17.0.0'
    //Push
    compileOnly 'com.google.android.gms:play-services-gcm:17.0.0'
    compileOnly 'com.google.firebase:firebase-messaging:20.2.0'
    compileOnly 'com.huawei.hms:hianalytics:6.1.0.300'
    compileOnly 'com.google.firebase:firebase-core:17.0.0'
    compileOnly 'com.huawei.hms:push:5.3.0.300'
    //Crashlytics
    compileOnly 'com.google.firebase:firebase-crashlytics:17.0.0-beta02'
    compileOnly 'com.huawei.agconnect:agconnect-crash:1.5.0.300'
    //Analytics
    compileOnly 'com.google.firebase:firebase-analytics:18.0.0'
    compileOnly 'com.google.android.gms:play-services-analytics:17.0.0'
}

xmsaux build.gradle:

apply plugin: 'com.android.library'
apply from: '../scripts/productFlavor.gradle'
apply from: 'scripts/copy-dex.gradle'

android {
    compileSdkVersion 29
    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 29

        consumerProguardFiles 'proguard.txt'
    }

    buildTypes {
        debug {
            buildConfigField("String", "XG_BIN_NAME", "\"xg.apk\"")
            buildConfigField("String", "XH_BIN_NAME", "\"xh.apk\"")
        }
        release {
            buildConfigField("String", "XG_BIN_NAME", "\"xg.apk\"")
            buildConfigField("String", "XH_BIN_NAME", "\"xh.apk\"")
        }
    }

    compileOptions {
        sourceCompatibility = 1.8
        targetCompatibility = 1.8
    }
}

dependencies {
    compileOnly project(':xmsadapter')

    //Account
    compileOnly 'com.google.android.gms:play-services-base:17.1.0'
    compileOnly 'com.google.android.gms:play-services-auth-base:17.1.0'
    compileOnly 'com.google.android.gms:play-services-basement:17.1.0'
    compileOnly 'com.google.android.gms:play-services-auth-api-phone:17.4.0'
    compileOnly 'com.huawei.hms:hwid:5.3.0.301'
    compileOnly 'com.google.android.gms:play-services-auth:18.0.0'
    //Basement
    compileOnly 'com.huawei.hms:base:6.0.1.302'
    compileOnly 'com.google.android.gms:play-services-tasks:17.0.0'
    //Push
    compileOnly 'com.google.android.gms:play-services-gcm:17.0.0'
    compileOnly 'com.google.firebase:firebase-messaging:20.2.0'
    compileOnly 'com.huawei.hms:hianalytics:6.1.0.300'
    compileOnly 'com.google.firebase:firebase-core:17.0.0'
    compileOnly 'com.huawei.hms:push:5.3.0.300'
    //Crashlytics
    compileOnly 'com.google.firebase:firebase-crashlytics:17.0.0-beta02'
    compileOnly 'com.huawei.agconnect:agconnect-crash:1.5.0.300'
    //Analytics
    compileOnly 'com.google.firebase:firebase-analytics:18.0.0'
    compileOnly 'com.google.android.gms:play-services-analytics:17.0.0'

}


afterEvaluate {
    Project project ->
        def cleanTask = project.tasks.getByName('clean')
        cleanTask.doLast {
            File assetsPath = new File(project.android.sourceSets.main.assets.srcDirs[0].path);
            assetsPath.deleteDir();
        }
}

project-level build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.4.0'
    ext.gson_version = '2.8.6'

    repositories {
        mavenCentral()
        jcenter()
        google()
        maven {
            url 'https://developer.huawei.com/repo/'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.2'
        classpath 'com.google.gms:google-services:4.3.5' // google-services plugin
        classpath 'com.google.firebase:perf-plugin:1.3.4'  // Performance Monitoring plugin

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"

        classpath 'com.huawei.agconnect:agconnect-apms-plugin:1.4.1.305'
        classpath 'com.huawei.agconnect:agcp:1.4.2.300'

        // Add the Crashlytics Gradle plugin
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
        // Add the App Distribution Gradle plugin
        classpath 'com.google.firebase:firebase-appdistribution-gradle:2.1.3'
    }
}

allprojects {
    repositories {
        mavenCentral()
        jcenter()
        google()
        maven {
            url 'https://developer.huawei.com/repo/'
        }
    }

    buildscript {
        repositories {
            mavenCentral()
            jcenter()
            google()
        }
    }
}

app module build.gradle:

apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.google.firebase.appdistribution'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'jacoco'
apply plugin: 'de.undercouch.download'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlinx-serialization'
apply plugin: 'com.google.gms.google-services'
apply from: '../xmsadapter/scripts/productFlavor.gradle'

////////////////////////////////////////////////////////////////////////
// The app's version name. Increment this before you make a new release!
////////////////////////////////////////////////////////////////////////
def getVersionName = { ->
    return "6.2.1"
}

/////////////////////////////////////////////////////////////////////////////////
// The whatsNewScreen version name. Increment this before you make a new release!
/////////////////////////////////////////////////////////////////////////////////
def getWhatsNewVersion = { ->
    return "6.2.1"
}

def getVersionCode = { ->
    int FALLBACK_NUMBER = 1
    int buildNumber = System.getenv("BUILD_NUMBER") as Integer ?: FALLBACK_NUMBER
    if (buildNumber == FALLBACK_NUMBER) {
        println "Environment variable BUILD_NUMBER is not set."
    }
    println "VersionCode is set to $buildNumber"
    return buildNumber
}

/////////////////////////////////////////////////////////
// update string res from locolise.biz
// run: gradlew updateTranslations
////////////////////////////////////////////////////////

task downloadTranslationsZipFile(type: Download) {
    src 'https://localise.biz/api/export/archive/xml.zip?filter={redacted}'
    dest new File(buildDir, 'translations.zip')
}

task openTranslations(dependsOn: downloadTranslationsZipFile, type: Copy) {
    from zipTree(downloadTranslationsZipFile.dest)
    into buildDir
    include "{redacted}"
}

task updateTranslations(dependsOn: openTranslations, type: Copy) {
    from new File(buildDir, '{redacted}-mobile-xml-archive/res')
    into 'src/main/res'
}

android {
    compileSdkVersion 29

    dexOptions {
        preDexLibraries = false
    }

    signingConfigs {
        release {
            storeFile file(keyStoreFile)
            keyAlias keyStoreAlias
            keyPassword keyPw
            storePassword storePw
        }
        development {
            storeFile file("dev.keystore")
            keyAlias "androiddebugkey"
            keyPassword "android"
            storePassword "android"
        }
    }

    defaultConfig {
        applicationId "{redacted}"
        manifestPlaceholders = [hostNameProd: "{redacted}",
                                hostNameStaging: "{redacted}",
                                fbScheme: "{redacted}"]
        minSdkVersion 21
        targetSdkVersion 29
        versionCode getVersionCode()
        versionName getVersionName()
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
        // limit which language resources are taken into apk
        resConfigs "en", "fr", "el", "de", "it", "es", "ru"
        vectorDrawables.useSupportLibrary = true
        buildConfigField "boolean", "RELEASE_BACKEND", "false"
    }

    packagingOptions {
        exclude 'LICENSE.txt' // needed for tests
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/LICENSE.txt'

        exclude('org/apache/commons/codec/language/bm/*.txt')
        //  124 files (uncompressed 215kb) with unused language specific rules
    }

    lintOptions {
        abortOnError false
    }

    buildTypes {
        debug {
            resValue "string", "app_name", "DEBUG {redacted}"
            applicationIdSuffix ".debug" // will override ACPT version
            versionNameSuffix "-debug"
            debuggable true
            minifyEnabled false
            shrinkResources false
            buildConfigField "boolean", "ENABLE_DIAGNOSTICS", "false"
            ext.enableCrashlytics = false

            pseudoLocalesEnabled true
            buildConfigField "String", "WHATS_NEW_VERSION", "\"${getWhatsNewVersion()}\""

            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            matchingFallbacks = ['release']
            lintOptions {
                disable 'MissingTranslation'
            }
        }

        development {
            resValue "string", "app_name", "DEV {redacted}"
            applicationIdSuffix ".development" // will override ACPT version
            versionNameSuffix "-development"
            debuggable true
            minifyEnabled false
            shrinkResources false
            buildConfigField "boolean", "ENABLE_DIAGNOSTICS", "true"
            ext.enableCrashlytics = false

            pseudoLocalesEnabled true
            buildConfigField "String", "WHATS_NEW_VERSION", "\"${getWhatsNewVersion()}\""

            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            matchingFallbacks = ['release']
            firebaseAppDistribution {
                serviceCredentialsFile = firebaseDistributionFile
                groups = '{redacted}-internal, lit-testers'
            }
        }

        snapshot {
            resValue "string", "app_name", "SNAP {redacted}"
            applicationIdSuffix ".snapshot"
            versionNameSuffix "-snapshot"
            debuggable true
            minifyEnabled false
            shrinkResources false
            buildConfigField "boolean", "ENABLE_DIAGNOSTICS", "false"
            ext.enableCrashlytics = true

            pseudoLocalesEnabled true
            buildConfigField "String", "WHATS_NEW_VERSION", "\"${getWhatsNewVersion()}\""

            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            matchingFallbacks = ['release']
            firebaseAppDistribution {
                serviceCredentialsFile = firebaseDistributionFile
                groups = '{redacted}-internal, lit-testers'
            }
        }

        acceptance {
            resValue "string", "app_name", "ACPT {redacted}"
            applicationIdSuffix ".acceptance"
            versionNameSuffix "-acceptance"
            debuggable true
            minifyEnabled true
            shrinkResources true
            buildConfigField "boolean", "ENABLE_DIAGNOSTICS", "true"
            ext.enableCrashlytics = true

            buildConfigField "String", "WHATS_NEW_VERSION", "\"${getWhatsNewVersion()}\""

            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            matchingFallbacks = ['release']
            firebaseAppDistribution {
                serviceCredentialsFile = firebaseDistributionFile
                groups = '{redacted}-internal, lit-testers'
            }
        }

        release {
            resValue "string", "app_name", "{redacted}"
            minifyEnabled true
            shrinkResources true
            buildConfigField "boolean", "ENABLE_DIAGNOSTICS", "true"
            ext.enableCrashlytics = true

            buildConfigField "String", "WHATS_NEW_VERSION", "\"${getWhatsNewVersion()}\""
            buildConfigField "boolean", "RELEASE_BACKEND", "true"
            manifestPlaceholders = [hostName: "{redacted}",
                                    fbScheme: "{redacted}"]

            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            firebaseAppDistribution {
                serviceCredentialsFile = firebaseDistributionFile
                groups = '{redacted}-internal, lit-testers'
            }
        }

        debugProd {
            initWith(debug)
            ext.enableCrashlytics = false
            buildConfigField "boolean", "RELEASE_BACKEND", "true"
            matchingFallbacks = ['release']
        }

        unitTest {
            testCoverageEnabled = true

            // same as debug!
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            applicationIdSuffix ".debug"
            versionNameSuffix "-debug"
            // disable crashlytics and gtm for developer builds
            buildConfigField "boolean", "ENABLE_DIAGNOSTICS", "false"
            ext.enableCrashlytics = false

            resValue "string", "app_name", "DEBUG {redacted}"

            // adds version name for whatsNew feature
            buildConfigField "String", "WHATS_NEW_VERSION", "\"${getWhatsNewVersion()}\""

            matchingFallbacks = ['release']
        }
    }

    sourceSets {

        development {
            java.srcDirs = ['src/debug/java']
            res.srcDirs = ['src/debug/res']
            assets.srcDirs = ['src/debug/assets']
        }

        snapshot {
            java.srcDirs = ['src/debug/java']
            res.srcDirs = ['src/debug/res']
            assets.srcDirs = ['src/debug/assets']
        }

        acceptance {
            java.srcDirs = ['src/debug/java']
            res.srcDirs = ['src/acceptance/res', 'src/debug/res']
            assets.srcDirs = ['src/debug/assets']
        }

        release {
            java.srcDirs = ['src/release/java']
        }

        debugProd {
            java.srcDirs = ['src/debug/java']
            res.srcDirs = ['src/debug/res']
            assets.srcDirs = ['src/debug/assets']
        }
    }

    project.archivesBaseName = "${new Date().format("yyMMdd")}{redacted}${getVersionName()}_${getVersionCode()}"

    compileOptions {
        sourceCompatibility = 1.8
        targetCompatibility = 1.8
    }
    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8.toString()
    }

    android.applicationVariants.all { variant ->

        variant.buildConfigField "String", "LANGUAGES", "\"${variant.mergedFlavor.resourceConfigurations.join(',')}\""

        if (variant.buildType.pseudoLocalesEnabled) {
            variant.mergedFlavor.resourceConfigurations.add("en-rXA")
            variant.mergedFlavor.resourceConfigurations.add("ar-rXB")
        }
    }
}

dependencies {
    implementation project(':xmsadapter')
    implementation project(':xmsadapter:xmsaux')
    compileOnly project(':xmsadapter:xmsaux:xapi')
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    // Modules
    implementation project(':backends')
    implementation project(':pdflib')

    // Kotlin
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"

    // KotlinX
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.1"
    implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:1.0-M1-1.4.0-rc"

    // AndroidX
    implementation "androidx.lifecycle:lifecycle-runtime:2.3.1"
    implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.3.1"
    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1"
    implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
    implementation 'androidx.viewpager2:viewpager2:1.0.0'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.browser:browser:1.3.0'
    implementation 'androidx.recyclerview:recyclerview:1.2.0'
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
    implementation 'androidx.core:core-ktx:1.3.2'
    implementation 'androidx.preference:preference:1.1.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
    implementation "androidx.webkit:webkit:1.4.0"

    // Google
    implementation platform('com.google.firebase:firebase-bom:26.1.0')
    implementation 'com.google.firebase:firebase-analytics'
    implementation "com.google.firebase:firebase-messaging"
    implementation 'com.google.firebase:firebase-crashlytics'
    implementation 'com.google.android.gms:play-services-analytics:17.0.0' // needed for tag manager
    implementation 'com.google.android.gms:play-services-tagmanager:17.0.0'
    implementation 'com.google.android.material:material:1.3.0'
    implementation "com.google.code.gson:gson:$gson_version"
    implementation 'com.google.android.gms:play-services-auth:19.0.0'
    implementation 'com.google.android.gms:play-services-base:17.1.0'
    implementation 'com.google.android.gms:play-services-auth-base:17.1.0'
    implementation 'com.google.android.gms:play-services-basement:17.1.0'
    implementation 'com.google.android.gms:play-services-auth-api-phone:17.4.0'
    implementation 'com.huawei.hms:hwid:5.3.0.301'
    // Firebase Performance
    implementation 'com.google.firebase:firebase-perf-ktx'



    // Jumio document scanner
    implementation "com.jumio.android:core:3.6.2@aar"
    implementation "com.jumio.android:nv:3.6.2@aar"
    implementation "com.jumio.android:nv-barcode:3.6.2@aar"
    implementation "com.jumio.android:nv-mrz:3.6.2@aar"
    implementation "com.jumio.android:nv-ocr:3.6.2@aar"
    implementation 'androidx.room:room-runtime:2.3.0' // required by Jumio

    // Misc
    implementation 'com.facebook.android:facebook-login:9.1.1'
    implementation 'com.jakewharton.threetenabp:threetenabp:1.3.1'
    implementation 'com.github.siyamed:android-shape-imageview:0.9.3'
    implementation 'org.apache.commons:commons-lang3:3.12.0'
    // ion
    implementation 'com.koushikdutta.ion:ion:3.1.0'
    implementation 'me.relex:circleindicator:2.1.6'
    implementation 'com.scottyab:rootbeer-lib:0.0.8' // Root detection
    implementation 'com.squareup:android-times-square:1.7.10@aar'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'// Date Picker

    // Unit Tests
    testImplementation 'junit:junit:4.13.2'
    testImplementation 'org.hamcrest:hamcrest-core:2.2'
    testImplementation 'org.hamcrest:hamcrest-library:2.2'
    testImplementation 'org.hamcrest:hamcrest-integration:1.3'

    //leakcanary
    // debugImplementation because LeakCanary should only run in debug builds.
    debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'


    // Android JUnit Tests
    androidTestImplementation 'junit:junit:4.13.2'
    implementation 'androidx.annotation:annotation:1.2.0'
    androidTestImplementation 'androidx.annotation:annotation:1.2.0'
    androidTestImplementation 'androidx.test:core:1.3.0'
    androidTestImplementation 'androidx.test:runner:1.3.0'
    androidTestImplementation 'androidx.test:rules:1.3.0'
    androidTestImplementation 'org.hamcrest:hamcrest-library:2.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.3.0'
    androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
    implementation 'com.huawei.hms:push:5.0.4.302'
    implementation 'com.huawei.hms:hwid:5.0.5.301'
    implementation 'com.huawei.hms:hianalytics:5.0.5.301'
    implementation 'com.huawei.hms:identity:4.0.4.300'
    implementation 'com.huawei.agconnect:agconnect-core:1.5.2.300'
}
apply plugin: 'com.huawei.agconnect'

ANSWER

Answered 2021-Aug-25 at 23:41

Try updating your dependencies to the latest available versions.

'com.huawei.hms:hwid:5.3.0.301' --> 'com.huawei.hms:hwid:6.0.1.300' 'com.huawei.hms:push:5.3.0.300' --> 'com.huawei.hms:push:5.3.0.304'

Here's a link to a list of the latest SDK versions. https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/hmssdk-kit-0000001050042513

Source https://stackoverflow.com/questions/68921399

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install android-times-square

You can download it from GitHub, Maven.
You can use android-times-square like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the android-times-square component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

Support

For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.