Skip to content

Commit

Permalink
v2.3.190408 (14)
Browse files Browse the repository at this point in the history
Added privacy policy in about us.
  • Loading branch information
ImaginativeShohag committed Apr 7, 2019
1 parent 230e0ed commit 14680a7
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 301 deletions.
197 changes: 117 additions & 80 deletions app/app.iml

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ android {
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "org.imaginativeworld.shadhinovidhan"
versionCode 13
versionName '2.2.181024'
versionCode 14
versionName '2.3.190408'
minSdkVersion 16
targetSdkVersion 28
}
Expand All @@ -29,12 +29,12 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'

implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.firebase:firebase-messaging:17.5.0'
implementation 'com.google.firebase:firebase-crash:16.2.1'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class ColorPickerActivity extends AppCompatActivity implements View.OnCli
Context mContext;
Button[] colorBtn = new Button[21];
Button btnOK;
// TextView colorPreview;

String color, colorStr;
int __id = 0;
int __margin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,15 @@

public class about_activity extends AppCompatActivity implements OnClickListener {

// String namedversion,
// changelogurl, downloadurl, productpageurl,
// releasedate;
// int versionmajor, versionminor, versionrevision;
// XmlPullParser parser;

Button btnClose;
// Button btnUpdate;
// View updateInfoView;
// TextView txtNewVersion, txtReleaseDate;
Button btnPrivacyPolicy;

Resources res;
// boolean ifUpdateAvailable = false;

TextView dev_url;
TextView txt_version;
// private String URL;


@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down Expand Up @@ -86,30 +81,22 @@ protected void onCreate(Bundle savedInstanceState) {
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.about_layout);

//=========================================================
btnClose = (Button) findViewById(R.id.btn_close);
btnClose.setOnClickListener(about_activity.this);

// btnUpdate = (Button) findViewById(R.id.btn_update);
// btnUpdate.setOnClickListener(about_activity.this);
//============================================================

// updateInfoView = findViewById(R.id.view_update);
// updateInfoView.setVisibility(View.GONE);
btnClose =findViewById(R.id.btn_close);
btnClose.setOnClickListener(about_activity.this);

// txtNewVersion = (TextView) findViewById(R.id.txtNewVersion);
// txtReleaseDate = (TextView) findViewById(R.id.txtReleaseDate);
btnPrivacyPolicy = findViewById(R.id.btn_privacy_policy);
btnPrivacyPolicy.setOnClickListener(about_activity.this);

dev_url = (TextView) findViewById(R.id.dev_url);
dev_url = findViewById(R.id.dev_url);
dev_url.setOnClickListener(about_activity.this);

res = getResources();

txt_version = findViewById(R.id.txt_version);
txt_version.setText(String.format("%s", BuildConfig.VERSION_NAME));

// URL = getString(R.string.update_check_url);


}

@Override
Expand All @@ -121,36 +108,13 @@ public void onClick(View v) {

break;

// case R.id.btn_update:
//
// if (ifUpdateAvailable) {
// String URL_market = getString(R.string.url_market);
// Intent browserIntent = new Intent(Intent.ACTION_VIEW,
// Uri.parse(URL_market));
// startActivity(browserIntent);
// } else {
//
// // Gets the URL from the UI's text field.
// ConnectivityManager connMgr = (ConnectivityManager)
// getSystemService(Context.CONNECTIVITY_SERVICE);
// NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
// if (networkInfo != null && networkInfo.isConnected()) {
// btnUpdate.setText(getString(R.string.wait));
// btnUpdate.setEnabled(false);
// new GetDataTask().execute(URL);
// } else {
// btnUpdate.setText(getString(R.string.update_error));
// btnUpdate.setEnabled(true);
//
// Toast t = Toast.makeText(about_activity.this,
// getString(R.string.internet_not_connected),
// Toast.LENGTH_LONG);
// t.show();
// }
//
// }
//
// break;

case R.id.btn_privacy_policy:

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://imaginativeworld.org/privacy-policy-shadhin-ovidhan/")));

break;


case R.id.dev_url:

Expand All @@ -164,159 +128,5 @@ public void onClick(View v) {

}

// void UpdateFound() {
// btnUpdate.setText(getString(R.string.update_now));
// txtNewVersion.setText(String.format(res.getString(R.string.new_update_info),
// versionmajor, versionminor, versionrevision));
//
// txtReleaseDate.setText(String.format(res.getString(R.string.update_release_date),
// releasedate));
//
// updateInfoView.setVisibility(View.VISIBLE);
//
// ifUpdateAvailable = true;
// btnUpdate.setEnabled(true);
//
// }

// void UpdateNotFound() {
// btnUpdate.setText(getString(R.string.update_not_found));
// btnUpdate.setEnabled(false);
// }

// public String GetData(String requestURL) throws IOException {
//
// java.net.URL url;
// String response = "";
// List ls = new ArrayList();
//
// try {
// url = new URL(requestURL);
//
// HttpURLConnection conn = (HttpURLConnection) url.openConnection();
// conn.setReadTimeout(15000);
// conn.setConnectTimeout(15000);
// conn.setRequestMethod("GET");
// conn.setDoInput(true);
// conn.setDoOutput(true);
//
// InputStream in = conn.getInputStream();
//
//
// try {
// parser = Xml.newPullParser();
// parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false);
// parser.setInput(in, null);
// parser.nextTag(); //versioninfo
// parser.nextTag(); //namedversion
//
// int eventType = parser.getEventType();
// while (eventType != XmlPullParser.END_DOCUMENT) {
//
// if (parser.getEventType() == XmlPullParser.START_TAG) {
// parser.next();
// ls.add(parser.getText());
// }
//
// eventType = parser.next();
//
// }
//
// namedversion = (String) ls.get(0);
// try {
// versionmajor = Integer.parseInt(ls.get(1).toString());
// } catch (NumberFormatException nfe) {
// //System.out.println("Could not parse " + nfe);
// }
//
// try {
// versionminor = Integer.parseInt(ls.get(2).toString());
// } catch (NumberFormatException nfe) {
// //System.out.println("Could not parse " + nfe);
// }
//
// try {
// versionrevision = Integer.parseInt(ls.get(3).toString());
// } catch (NumberFormatException nfe) {
// //System.out.println("Could not parse " + nfe);
// }
//
// changelogurl = (String) ls.get(4);
// downloadurl = (String) ls.get(5);
// productpageurl = (String) ls.get(6);
// releasedate = (String) ls.get(7);
//
//
// } finally {
// in.close();
// }
//
// } catch (Exception e) {
// //e.printStackTrace();
// response = "e";
// }
//
// return response;
// }

// Uses AsyncTask to create a task away from the main UI thread. This task takes a
// URL string and uses it to create an HttpUrlConnection. Once the connection
// has been established, the AsyncTask downloads the contents of the webpage as
// an InputStream. Finally, the InputStream is converted into a string, which is
// displayed in the UI by the AsyncTask's onPostExecute method.
// private class GetDataTask extends AsyncTask<String, Void, String> {
// @Override
// protected String doInBackground(String... urls) {
//
// // params comes from the execute() call: params[0] is the url.
// try {
// return GetData(urls[0]);
// } catch (IOException e) {
// return e.toString();
// }
// }
//
// // onPostExecute displays the results of the AsyncTask.
// @Override
// protected void onPostExecute(String result) {
//
// if (result.equals("")) {
//
// String version = getString(R.string.app_version);
// String[] v;
// v = version.split("\\.");
//
//// Toast tt = Toast.makeText(about_activity.this,
//// versionmajor + "." + versionminor+ "." + versionrevision + " " + namedversion,Toast.LENGTH_LONG );
//// tt.show();
//
// try {
//
// if (Integer.parseInt(v[0]) < versionmajor) {
// UpdateFound();
// } else if (Integer.parseInt(v[0]) == versionmajor) {
// if (Integer.parseInt(v[1]) < versionminor) {
// UpdateFound();
// } else if (Integer.parseInt(v[1]) == versionminor) {
// if (Integer.parseInt(v[2]) < versionrevision) {
// UpdateFound();
// } else
// UpdateNotFound();
// } else
// UpdateNotFound();
// } else
// UpdateNotFound();
//
// } catch (NumberFormatException nfe) {
// //System.out.println("Could not parse " + nfe);
// }
//
// } else {
// btnUpdate.setText(getString(R.string.update_error));
// btnUpdate.setEnabled(true);
// }
//
// }
// }

}
8 changes: 4 additions & 4 deletions app/src/main/res/layout/about_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@
android:gravity="end|center_vertical"
android:orientation="horizontal">

<!--<Button-->
<!--android:id="@+id/btn_update"-->
<!--style="@style/dialog_button"-->
<!--android:text="@string/check_update"/>-->
<Button
android:id="@+id/btn_privacy_policy"
style="@style/dialog_button"
android:text="Privacy Policy" />

<Button
android:id="@+id/btn_close"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.android.tools.build:gradle:3.3.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
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 @@
#Wed Sep 26 21:27:55 BDT 2018
#Mon Apr 08 00:17:25 BDT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

0 comments on commit 14680a7

Please sign in to comment.