Skip to content

Commit

Permalink
Intermittend push
Browse files Browse the repository at this point in the history
  • Loading branch information
SebaMutuku committed Feb 9, 2023
1 parent 4dce939 commit d362d7d
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 26 deletions.
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
maven{ url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.2'
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'gradle.plugin.org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.12.0'
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.30.0"

Expand Down Expand Up @@ -40,11 +40,12 @@ task clean(type: Delete) {
ext {
group = GROUP
version = VERSION_NAME
ext.androidToolsBuildGradle = '30.0.3'

ext.androidToolsBuildGradle = '4.2.2'
ext.androidBuildToolsVersion = '30.0.3'
androidMinSdkVersion = 19
androidCompileSdkVersion = 31
androidTargetSdkVersion = 29
ext.androidMinSdkVersion = 19
ext.androidCompileSdkVersion = 31
ext.androidTargetSdkVersion = 31
}

ext {
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Jan 19 12:26:01 EAT 2023
#Thu Feb 02 12:10:28 EAT 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
2 changes: 1 addition & 1 deletion p2p-sync/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ dependencies {

implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
implementation 'com.google.android.gms:play-services-nearby:16.0.0'
implementation('com.google.android.gms:play-services-location:16.0.0') {
exclude group: 'com.android.support', module: 'support-v4'
Expand All @@ -70,6 +69,7 @@ dependencies {
implementation 'com.google.android.gms:play-services-vision:20.1.3'

implementation 'com.jakewharton.timber:timber:5.0.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

testImplementation 'junit:junit:4.13.2'
testImplementation project(path: ':p2p-sync')
Expand Down
4 changes: 2 additions & 2 deletions p2p-sync/src/main/res/layout/activity_p2p_mode_select.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_p2pModeSelectActivity_parentLayout"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
Expand All @@ -8,4 +8,4 @@
tools:context=".activity.P2pModeSelectActivity">


</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout >
6 changes: 3 additions & 3 deletions p2p-sync/src/main/res/layout/fragment_devices_connected.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">

<android.support.constraint.Guideline
<androidx.constraintlayout.widget.Guideline
android:id="@+id/imageViewGuideline"
android:layout_width="1dp"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -61,4 +61,4 @@
app:layout_constraintLeft_toLeftOf="@id/tv_devicesConnectedFragment_message"/>


</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout >
6 changes: 3 additions & 3 deletions p2p-sync/src/main/res/layout/fragment_error.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">

<android.support.constraint.Guideline
<androidx.constraintlayout.widget.Guideline
android:id="@+id/imageViewGuideline"
android:layout_width="1dp"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -60,4 +60,4 @@
app:layout_constraintLeft_toLeftOf="@id/tv_errorFragment_message"/>


</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
4 changes: 2 additions & 2 deletions p2p-sync/src/main/res/layout/fragment_mode_select.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
Expand Down Expand Up @@ -28,4 +28,4 @@
android:layout_marginBottom="20dp"
app:layout_constraintBottom_toTopOf="@id/btn_p2pModeSelectActivity_send"/>

</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
6 changes: 3 additions & 3 deletions p2p-sync/src/main/res/layout/fragment_successful_transfer.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">

<android.support.constraint.Guideline
<androidx.constraintlayout.widget.Guideline
android:id="@+id/imageViewGuideline"
android:layout_width="1dp"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -76,4 +76,4 @@
app:layout_constraintLeft_toLeftOf="@id/tv_successfulTransferFragment_transferSuccessText"/>


</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
2 changes: 1 addition & 1 deletion p2p-sync/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<string name="log_endpoint_lost">Endpoint lost %s</string>
<string name="connection_to_endpoint_broken">The connection to %s has broken</string>
<string name="connected">CONNECTED</string>
<string name="log_connection_initiated_endpoint_auth_code">Connection initiated by : %1$s Endpoint name(%2%s) auth code(%3$s)</string>
<string name="log_connection_initiated_endpoint_auth_code">Connection initiated by : %1$s Endpoint name(%2$s) auth code(%3$s)</string>
<string name="log_rejecting_connection_initiated_by_other_device">Rejecting connection initiated by the other device %1$s, %2$s, %3$s</string>
<string name="log_endpoint_found">Endpoint found : %1$s Endpoint info: (%2$s, %3$s)</string>
<string name="log_received_payload_from_endpoint">Received a payload from %s</string>
Expand Down
1 change: 1 addition & 0 deletions p2p-sync/src/test/resources/robolectric.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sdk=29
1 change: 1 addition & 0 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ dependencies {
implementation 'com.google.android.gms:play-services-vision:17.0.2'

implementation 'com.jakewharton.timber:timber:4.7.1'
implementation project(path: ':p2p-sync')

testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
Expand Down
4 changes: 2 additions & 2 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.smartregister.p2p">

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import androidx.appcompat.app.AppCompatActivity;

import org.smartregister.p2p.R;
import org.smartregister.p2p.activity.P2pModeSelectActivity;

public class MainActivity extends AppCompatActivity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import android.content.Context;
import android.content.SharedPreferences;

import androidx.annotation.NonNull;

import org.smartregister.p2p.contract.RecalledIdentifier;
import org.smartregister.p2p.util.Constants;
import org.smartregister.p2p.util.Device;

import java.util.UUID;
Expand All @@ -22,7 +22,7 @@ public String getUniqueID(Context context) {
if (uniqueAddress == null) {
// save a uuid in
SharedPreferences sharedPreferences =
context.getSharedPreferences(Constants.Prefs.NAME, Context.MODE_PRIVATE);
context.getSharedPreferences(Constants.NAMES, Context.MODE_PRIVATE);

uniqueAddress = sharedPreferences.getString(FAIL_SAFE_ID, null);

Expand Down

0 comments on commit d362d7d

Please sign in to comment.