Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contributors name added to about page #375

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
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
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ 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"

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

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.

Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
package com.parishod.watomatic.model.githubUesrsResponse;



import java.util.HashMap;
import java.util.Map;


public class GithubUsersResponse {

private String login;
private Integer id;
private String nodeId;
private String avatarUrl;
private String gravatarId;
private String url;
private String htmlUrl;
private String followersUrl;
private String followingUrl;
private String gistsUrl;
private String starredUrl;

private String subscriptionsUrl;

private String organizationsUrl;

private String reposUrl;

private String eventsUrl;

private String receivedEventsUrl;

private String type;

private Boolean siteAdmin;

private Integer contributions;

private Map<String, Object> additionalProperties = new HashMap<String, Object>();

public String getLogin() {
return login;
}

public void setLogin(String login) {
this.login = login;
}

public Integer getId() {
return id;
}

public void setId(Integer id) {
this.id = id;
}

public String getNodeId() {
return nodeId;
}

public void setNodeId(String nodeId) {
this.nodeId = nodeId;
}

public String getAvatarUrl() {
return avatarUrl;
}

public void setAvatarUrl(String avatarUrl) {
this.avatarUrl = avatarUrl;
}

public String getGravatarId() {
return gravatarId;
}

public void setGravatarId(String gravatarId) {
this.gravatarId = gravatarId;
}

public String getUrl() {
return url;
}

public void setUrl(String url) {
this.url = url;
}

public String getHtmlUrl() {
return htmlUrl;
}

public void setHtmlUrl(String htmlUrl) {
this.htmlUrl = htmlUrl;
}

public String getFollowersUrl() {
return followersUrl;
}

public void setFollowersUrl(String followersUrl) {
this.followersUrl = followersUrl;
}

public String getFollowingUrl() {
return followingUrl;
}

public void setFollowingUrl(String followingUrl) {
this.followingUrl = followingUrl;
}

public String getGistsUrl() {
return gistsUrl;
}

public void setGistsUrl(String gistsUrl) {
this.gistsUrl = gistsUrl;
}

public String getStarredUrl() {
return starredUrl;
}

public void setStarredUrl(String starredUrl) {
this.starredUrl = starredUrl;
}

public String getSubscriptionsUrl() {
return subscriptionsUrl;
}

public void setSubscriptionsUrl(String subscriptionsUrl) {
this.subscriptionsUrl = subscriptionsUrl;
}

public String getOrganizationsUrl() {
return organizationsUrl;
}

public void setOrganizationsUrl(String organizationsUrl) {
this.organizationsUrl = organizationsUrl;
}

public String getReposUrl() {
return reposUrl;
}

public void setReposUrl(String reposUrl) {
this.reposUrl = reposUrl;
}

public String getEventsUrl() {
return eventsUrl;
}

public void setEventsUrl(String eventsUrl) {
this.eventsUrl = eventsUrl;
}

public String getReceivedEventsUrl() {
return receivedEventsUrl;
}

public void setReceivedEventsUrl(String receivedEventsUrl) {
this.receivedEventsUrl = receivedEventsUrl;
}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public Boolean getSiteAdmin() {
return siteAdmin;
}

public void setSiteAdmin(Boolean siteAdmin) {
this.siteAdmin = siteAdmin;
}

public Integer getContributions() {
return contributions;
}

public void setContributions(Integer contributions) {
this.contributions = contributions;
}

public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}

public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.parishod.watomatic.network;

import com.parishod.watomatic.model.githubUesrsResponse.GithubUsersResponse;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.GET;

public interface GetGitUserInterface {
@GET("/repos/adeekshith/watomatic/contributors")
Call<List<GithubUsersResponse>> getContriUsers();

}
Loading