geotag_issue

This commit is contained in:
CPM
2021-06-09 11:38:04 +05:30
parent b8f41ecf21
commit 8a98c09527
7 changed files with 49 additions and 55 deletions
Binary file not shown.
+10
View File
@@ -0,0 +1,10 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="ConstantConditions" enabled="true" level="WARNING" enabled_by_default="true">
<option name="SUGGEST_NULLABLE_ANNOTATIONS" value="false" />
<option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="false" />
</inspection_tool>
<inspection_tool class="Deprecation" enabled="false" level="WARNING" enabled_by_default="false" />
</profile>
</component>
+2 -2
View File
@@ -45,8 +45,8 @@ android {
//sa
/* versionCode 28
versionName "3.9"*/
/* versionCode 29
versionName "4.1"*/
//Kenya
/* versionCode 2
@@ -38,6 +38,7 @@ import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.core.content.FileProvider;
import com.google.android.gms.appindexing.Action;
import com.google.android.gms.appindexing.AppIndex;
import com.google.android.gms.appindexing.Thing;
import com.google.android.gms.common.ConnectionResult;
@@ -136,13 +137,16 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
Toolbar toolbar;
public GeoTagActivity() {
}
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_geo_tag);
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
preferences = PreferenceManager.getDefaultSharedPreferences(this);
context = this;
CommonFunctions.updateLangResources(context, preferences.getString(CommonString.KEY_LANGUAGE, ""));
username = preferences.getString(CommonString.KEY_USERNAME, null);
@@ -161,7 +165,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
db = new GSKOrangeDB(GeoTagActivity.this);
db.open();
context = this;
//storeid = getIntent().getStringExtra("Storeid");
str = CommonString.FILE_PATH;
@@ -266,31 +270,15 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
fabcarmabtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
/* List<ApplicationInfo> list = packageManager.getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES);
for (int n = 0; n < list.size(); n++) {
if ((list.get(n).flags & ApplicationInfo.FLAG_SYSTEM) == 1) {
Log.d("TAG", "Installed Applications : " + list.get(n).loadLabel(packageManager).toString());
Log.d("TAG", "package name : " + list.get(n).packageName);
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Camera")) {
defaultCameraPackage = list.get(n).packageName;
break;
}
}
}*/
_pathforcheck = storeid + "GeoTag" + visitData.replace("/", "") + CommonFunctions.getCurrentTimeWithLanguage(context).replace(":", "") + ".jpg";
_path = CommonString.FILE_PATH + _pathforcheck;
startCameraActivity();
}
});
// ATTENTION: This was auto-generated to implement the App Indexing API.
// See https://g.co/AppIndexing/AndroidStudio for more information.
client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
// client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
}
private boolean checkPlayServices() {
@@ -414,7 +402,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
protected void onStart() {
super.onStart();// ATTENTION: This was auto-generated to implement the App Indexing API.
// See https://g.co/AppIndexing/AndroidStudio for more information.
client.connect();
// client.connect();
if (mGoogleApiClient != null) {
mGoogleApiClient.connect();
}
@@ -443,17 +431,12 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
// See https://g.co/AppIndexing/AndroidStudio for more information.
//usk comment
/* if(client!=null && mGoogleApiClient!=null){
AppIndex.AppIndexApi.end(client, getIndexApiAction());
// AppIndex.AppIndexApi.end(client, getIndexApiAction());
if (mGoogleApiClient.isConnected()) {
mGoogleApiClient.disconnect();
}
// ATTENTION: This was auto-generated to implement the App Indexing API.
// See https://g.co/AppIndexing/AndroidStudio for more information.
client.disconnect();
}*/
// client.disconnect();
}
@@ -614,19 +597,6 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
* @return
*/
//usk comment
/* public com.google.android.gms.appindexing.Action getIndexApiAction() {
Thing object = new Thing.Builder()
.setName("GeoTag Page") // TODO: Define a title for the content shown.
// TODO: Make sure this auto-generated URL is correct.
.setUrl(Uri.parse("http://[ENTER-YOUR-URL-HERE]"))
.build();
return new Action.Builder(Action.TYPE_VIEW)
.setObject(object)
.setActionStatus(Action.STATUS_TYPE_COMPLETED)
.build();
}*/
public class GeoTagUpload extends AsyncTask<Void, Void, String> {
@@ -1148,4 +1118,17 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
return result.toString();
}
public Action getIndexApiAction() {
Thing object = new Thing.Builder()
.setName("GeoTag Page") // TODO: Define a title for the content shown.
// TODO: Make sure this auto-generated URL is correct.
.setUrl(Uri.parse("http://[ENTER-YOUR-URL-HERE]"))
.build();
return new Action.Builder(Action.TYPE_VIEW)
.setObject(object)
.setActionStatus(Action.STATUS_TYPE_COMPLETED)
.build();
}
}
@@ -778,15 +778,6 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
alert.show();
}
/*public String getCurrentTimeNotUsed() {
Calendar m_cal = Calendar.getInstance();
SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss");
String intime = formatter.format(m_cal.getTime());
return intime;
}*/
private static String arabicToenglish(String number) {
char[] chars = new char[number.length()];
@@ -1129,7 +1129,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
// find which radio button is selected
if (checkedId == R.id.yes) {
if (!GeotagStatus.equalsIgnoreCase("N")) {
if (!GeotagStatus.equalsIgnoreCase("Y")) {
boolean flag = true;
if (coverage.size() > 0) {
@@ -0,0 +1,10 @@
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.androidbuts.multispinnerfilter;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String LIBRARY_PACKAGE_NAME = "com.androidbuts.multispinnerfilter";
public static final String BUILD_TYPE = "debug";
}