Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions mifosng-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ android {
lintOptions {
abortOnError false
disable 'InvalidPackage'
disable 'MissingTranslation'
}


Expand Down Expand Up @@ -196,7 +197,7 @@ dependencies {
kapt 'androidx.lifecycle:lifecycle-compiler:2.0.0'

//Square dependencies
implementation('com.squareup.retrofit2:retrofit:$rootProject.retrofitVersionLatest') {
implementation("com.squareup.retrofit2:retrofit:$rootProject.retrofitVersionLatest") {
// exclude Retrofit’s OkHttp peer-dependency module and define your own module import
exclude module: 'okhttp'
}
Expand All @@ -217,7 +218,7 @@ dependencies {


implementation "com.joanzapata.iconify:android-iconify-material:2.1.1" // (v2.0.0)
implementation('com.crashlytics.sdk.android:crashlytics:2.6.6@aar') {
implementation('com.crashlytics.sdk.android:crashlytics:17.2.2@aar') {
transitive = true
}
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,22 @@

package com.mifos.mifosxdroid.activity.pathtracking;

import android.Manifest;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.location.Location;
import android.os.Bundle;
import android.os.IBinder;

import androidx.core.app.ActivityCompat;
import androidx.core.app.NotificationCompat;

import android.util.Log;
import android.widget.Toast;

Expand Down Expand Up @@ -102,6 +107,26 @@ protected void createLocationRequest() {
}

protected void startLocationUpdates() {
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
// public void onRequestPermissionsResult(int requestCode, String[] permissions,
// int[] grantResults)
// to handle the case where the user grants the permission. See the documentation
// for ActivityCompat#requestPermissions for more details.
return;
}
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
// public void onRequestPermissionsResult(int requestCode, String[] permissions,
// int[] grantResults)
// to handle the case where the user grants the permission. See the documentation
// for ActivityCompat#requestPermissions for more details.
return;
}
LocationServices.FusedLocationApi.requestLocationUpdates(
googleApiClient, locationRequest, this);
}
Expand All @@ -124,6 +149,26 @@ public int onStartCommand(Intent intent, int flags, int startId) {
@Override
public void onConnected(Bundle bundle) {
if (currentLocation == null) {
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
// public void onRequestPermissionsResult(int requestCode, String[] permissions,
// int[] grantResults)
// to handle the case where the user grants the permission. See the documentation
// for ActivityCompat#requestPermissions for more details.
return;
}
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
// public void onRequestPermissionsResult(int requestCode, String[] permissions,
// int[] grantResults)
// to handle the case where the user grants the permission. See the documentation
// for ActivityCompat#requestPermissions for more details.
return;
}
currentLocation = LocationServices.FusedLocationApi.getLastLocation(googleApiClient);
latLngs.add(new UserLatLng(currentLocation.getLatitude(),
currentLocation.getLongitude()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public static CollectionSheetDialogFragment newInstance(String date, int members

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
((MifosBaseActivity) getActivity()).getActivityComponent().inject(this);
date = getArguments().getString(Constants.REPAYMENT_DATE);
members = getArguments().getInt(Constants.MEMBERS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand Down Expand Up @@ -43,7 +44,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:src="@drawable/ic_error_black_24dp"/>
app:srcCompat="@drawable/ic_error_black_24dp"/>

<TextView
android:id="@+id/tv_no_location"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
Expand Down Expand Up @@ -43,7 +44,7 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:src="@drawable/ic_add_white_24dp"/>
app:srcCompat="@drawable/ic_add_white_24dp"/>

<include
layout="@layout/layout_sweet_exception_handler"
Expand Down
3 changes: 2 additions & 1 deletion mifosng-android/src/main/res/layout/fragment_charge_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand Down Expand Up @@ -37,7 +38,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:src="@drawable/ic_error_black_24dp"/>
app:srcCompat="@drawable/ic_error_black_24dp"/>

<TextView
android:id="@+id/noChargesText"
Expand Down
3 changes: 2 additions & 1 deletion mifosng-android/src/main/res/layout/fragment_client.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
-->
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
Expand Down Expand Up @@ -40,7 +41,7 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:src="@drawable/ic_add_white_24dp"/>
app:srcCompat="@drawable/ic_add_white_24dp"/>

<include
layout="@layout/layout_sweet_exception_handler"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand Down Expand Up @@ -38,7 +39,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:src="@drawable/ic_error_black_24dp"/>
app:srcCompat="@drawable/ic_error_black_24dp"/>

<TextView
android:id="@+id/noIdentifierText"
Expand Down
3 changes: 2 additions & 1 deletion mifosng-android/src/main/res/layout/fragment_datatable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
Expand Down Expand Up @@ -50,7 +51,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:src="@drawable/ic_error_black_24dp"/>
app:srcCompat="@drawable/ic_error_black_24dp"/>

<TextView
android:id="@+id/tv_error"
Expand Down
3 changes: 2 additions & 1 deletion mifosng-android/src/main/res/layout/fragment_datatables.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
Expand Down Expand Up @@ -46,7 +47,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:src="@drawable/ic_error_black_24dp"/>
app:srcCompat="@drawable/ic_error_black_24dp"/>

<TextView
android:id="@+id/tv_error"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down Expand Up @@ -77,7 +78,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:src="@drawable/ic_error_black_24dp"/>
app:srcCompat="@drawable/ic_error_black_24dp"/>

<TextView
android:id="@+id/noDocumentText"
Expand Down
3 changes: 2 additions & 1 deletion mifosng-android/src/main/res/layout/fragment_group_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
-->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down Expand Up @@ -42,7 +43,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:src="@drawable/ic_error_black_24dp" />
app:srcCompat="@drawable/ic_error_black_24dp" />

<TextView
android:id="@+id/noGroupsText"
Expand Down
3 changes: 2 additions & 1 deletion mifosng-android/src/main/res/layout/fragment_groups.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
Expand Down Expand Up @@ -44,7 +45,7 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:src="@drawable/ic_add_white_24dp"/>
app:srcCompat="@drawable/ic_add_white_24dp"/>

<include
layout="@layout/layout_sweet_exception_handler"
Expand Down
3 changes: 2 additions & 1 deletion mifosng-android/src/main/res/layout/fragment_notes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
-->

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
Expand Down Expand Up @@ -37,7 +38,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:src="@drawable/ic_error_black_24dp" />
app:srcCompat="@drawable/ic_error_black_24dp" />

<TextView
android:id="@+id/tv_error"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp">
Expand Down Expand Up @@ -38,7 +39,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:src="@drawable/ic_error_black_24dp"/>
app:srcCompat="@drawable/ic_error_black_24dp"/>

<TextView
android:id="@+id/noPayloadText"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@
android:layout_alignParentStart="true"
android:layout_below="@+id/tbl_transaction_details"
android:layout_marginTop="8dp"
android:text="@string/cancel" />
android:text="@string/cancel"
android:layout_alignParentLeft="true" />

<Button
android:id="@+id/bt_reviewTransaction"
Expand All @@ -188,7 +189,8 @@
android:layout_alignParentEnd="true"
android:layout_below="@+id/tbl_transaction_details"
android:layout_marginTop="8dp"
android:text="@string/review_transaction" />
android:text="@string/review_transaction"
android:layout_alignParentRight="true" />

</RelativeLayout>
</ViewFlipper>
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
android:layout_height="wrap_content"
android:text="@string/submit_survey"
android:gravity="center"
android:onClick="submitScore"
android:layout_marginTop="81dp"
android:layout_marginRight="20dp"
android:layout_marginLeft="20dp"
Expand Down
3 changes: 2 additions & 1 deletion mifosng-android/src/main/res/layout/fragment_syncpayload.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand Down Expand Up @@ -38,7 +39,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:src="@drawable/ic_error_black_24dp"/>
app:srcCompat="@drawable/ic_error_black_24dp"/>

<TextView
android:id="@+id/noPayloadText"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="match_parent"
Expand All @@ -17,7 +18,7 @@
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_report_item"
app:srcCompat="@drawable/ic_report_item"
android:id="@+id/iv_image"/>
</LinearLayout>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:gravity="center"
android:src="@drawable/ic_done_all_black_24dp"
app:srcCompat="@drawable/ic_done_all_black_24dp"
/>
</LinearLayout>
</androidx.cardview.widget.CardView>
2 changes: 1 addition & 1 deletion mifosng-android/src/main/res/layout/row_client_name.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:gravity="center"
android:src="@drawable/ic_done_all_black_24dp"
app:srcCompat="@drawable/ic_done_all_black_24dp"
/>

</LinearLayout>
Expand Down
Loading