Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Watomatic - Auto reply for WhatsApp so you can stop using it

Watomatic sends an automated reply to everyone contacting you on WhatsApp. This is especially useful if you are planning to migrate away from WhatsApp but can also be used as a vacation responder.

<a href='https://play.google.com/store/apps/details?id=com.parishod.watomatic&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png' height="60" /></a>
Expand Down
3 changes: 3 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ dependencies {
implementation "com.squareup.okhttp3:logging-interceptor:4.7.2"
implementation 'com.github.transferwise:sequence-layout:1.1.1'
implementation "androidx.browser:browser:1.3.0"

// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.0.1'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @aniket691,
I have never used this library, but without using this also we can get the required response.
Is it really needed? What are the advantages of this can you please explain.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove it.
It just helps give different names in model class. And we annotate and map
variable names with json object variable names.
#####################
But it helps to create response class fast.
https://www.jsonschema2pojo.org/
This tool requires this library.
And it helps to create a pojo class directly with json response in very
fast.
Just with one click.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @aniket691 we are already using Gson library in this project for JSON parsing. Can the same be used here instead of Jackson? Nothing against Jackson but just want to limit external dependencies.

But this is a great contribution. Thanks for that. We may want to improve the UI a little bit but can do in further iterations 😊

Copy link
Copy Markdown
Author

@aniket691 aniket691 Nov 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes
I have removed the library jackson
we are now only using gson

}
repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
package com.parishod.watomatic.activity.about;

Comment thread
adeekshith marked this conversation as resolved.
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

import com.parishod.watomatic.R;
import com.parishod.watomatic.model.githubUesrsResponse.GithubUsersResponse;
import com.parishod.watomatic.network.GetGitUserInterface;
import com.parishod.watomatic.network.RetrofitInstance;

import java.util.List;

import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;

public class AboutActivity extends AppCompatActivity implements View.OnClickListener {

private TextView text_view;
private String all_contributers = "";
private TextView privacy_policy;
private TextView developer_link;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);

text_view = findViewById(R.id.contributers);
privacy_policy = findViewById(R.id.privacyPolicyLabel);
developer_link = findViewById(R.id.developerLink);

privacy_policy.setOnClickListener(this);
developer_link.setOnClickListener(this);
Retrofit retrofit = RetrofitInstance.getRetrofitInstance();
GetGitUserInterface getGitUserInterface = retrofit.create(GetGitUserInterface.class);

Call<List<GithubUsersResponse>> call = getGitUserInterface.getContriUsers();
call.enqueue(new Callback<List<GithubUsersResponse>>() {
@Override
public void onResponse(Call<List<GithubUsersResponse>> call, Response<List<GithubUsersResponse>> response) {
if (response.isSuccessful()) {
List<GithubUsersResponse> list = response.body();
for (GithubUsersResponse i : list) {
all_contributers += i.getLogin() + ", ";
}
text_view.setText(all_contributers);
}
}

@Override
public void onFailure(Call<List<GithubUsersResponse>> call, Throwable t) {
Toast.makeText(getApplicationContext(), t.getMessage(), Toast.LENGTH_SHORT).show();

}
});

}

@Override
public void onClick(View view) {
if (view.getId() == R.id.privacyPolicyLabel) {
String url = "https://adeekshith.github.io/watomatic/#/privacy-policy.md";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
}

if (view.getId() == R.id.developerLink) {
String url = "https://twitter.com/adeekshith";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
}
}
}

This file was deleted.

Loading