Skip to content

Commit

Permalink
Latest SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
Usercef committed Dec 3, 2021
1 parent 5e42d18 commit 9e47f6a
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 15 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file modified .gradle/7.0.2/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/7.0.2/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/7.0.2/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/7.0.2/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/7.0.2/javaCompile/classAnalysis.bin
Binary file not shown.
Binary file modified .gradle/7.0.2/javaCompile/javaCompile.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified app/.DS_Store
Binary file not shown.
3 changes: 1 addition & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
implementation 'androidx.navigation:navigation-fragment:2.3.5'
implementation 'androidx.navigation:navigation-ui:2.3.5'

implementation files('/YourDirectory/BehavidenceSdk.aar')
implementation files('/YourDirectory/BehavidenceSdk-release.aar')
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

import java.util.List;

import behavidence.android.sdk.Networks.Responses.ApiCallBack;
import behavidence.android.sdk.SdkFunctions.Researches.ResearchCodeClient;
import behavidence.android.sdk.SdkFunctions.Researches.ResearchQuestion;
import behavidence.android.sdk.SdkFunctions.Researches.ResearchQuestions;
import behavidence.android.sdk.Utils.ApiResponse;

public class GetRQuestions extends AppCompatActivity {
String txt = "";
Expand All @@ -24,7 +24,7 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.fragment_second);
results = (TextView) findViewById(R.id.textview_second);
ResearchCodeClient researchCodeClient = ResearchCodeClient.getInstance(this);
researchCodeClient.getResearchQuestions("GAD212").executeAsync(new ApiResponse<ResearchQuestions>() {
researchCodeClient.getResearchQuestions("GAD212").executeAsync(new ApiCallBack<ResearchQuestions>() {
@Override
public void success(@Nullable ResearchQuestions researchQuestions) {
List<ResearchQuestion> questions = researchQuestions.getResearchQuestions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.util.List;
import behavidence.android.sdk.SdkFunctions.SimilarityScores.ScoresClient;
import behavidence.android.sdk.SdkFunctions.SimilarityScores.SimilarityScore;
import behavidence.android.sdk.Utils.ApiResponse;
import behavidence.android.sdk.Networks.Responses.ApiCallBack;

public class GetSimilarity extends AppCompatActivity {

Expand All @@ -24,7 +24,7 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.fragment_first);
results = (TextView) findViewById(R.id.similarityResults);
ScoresClient scoresClient = ScoresClient.getInstance(this);
scoresClient.getSimilarityScores().executeAsync(new ApiResponse<List<SimilarityScore>>() {
scoresClient.getSimilarityScores().executeAsync(new ApiCallBack<List<SimilarityScore>>() {
@Override
public void success(@Nullable List<SimilarityScore> similarityScores) {
String txt = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
import behavidence.android.sdk.Auth.AnonymousAuth;
import behavidence.android.sdk.Auth.AuthClient;
import behavidence.android.sdk.BehavidenceSDK;
import behavidence.android.sdk.Networks.Responses.ApiCallBack;
import behavidence.android.sdk.SdkFunctions.Events.EventsClient;
import behavidence.android.sdk.SdkFunctions.Journals.JournalClient;
import behavidence.android.sdk.SdkFunctions.Researches.ResearchCodeClient;
import behavidence.android.sdk.SdkFunctions.Researches.ResearchQuestion;
import behavidence.android.sdk.SdkFunctions.Researches.ResearchQuestions;
import behavidence.android.sdk.SdkFunctions.SimilarityScores.ScoresClient;
import behavidence.android.sdk.SdkFunctions.SimilarityScores.SimilarityScore;
import behavidence.android.sdk.Utils.ApiResponse;


public class MainActivity extends AppCompatActivity {
Expand Down Expand Up @@ -74,7 +74,7 @@ protected void onCreate(Bundle savedInstanceState) {

SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);

BehavidenceSDK.refreshState(this).executeAsync(new ApiResponse<Void>() {
BehavidenceSDK.refreshState(this).executeAsync(new ApiCallBack<Void>() {
@Override
public void success(@Nullable Void unused) {

Expand All @@ -90,6 +90,7 @@ public void onFailure(@NonNull RuntimeException e) {




BehavidenceSDK.init(this,"Put your api key that provided by Behavidence");
authClient = AuthClient.getInstance(this);

Expand All @@ -99,7 +100,7 @@ public void onFailure(@NonNull RuntimeException e) {
editor.putString("FirstTime","no");
editor.commit();

authClient.anonymousSignUp().executeAsync(new ApiResponse<AnonymousAuth>() {
authClient.anonymousSignUp().executeAsync(new ApiCallBack<AnonymousAuth>() {
@Override
public void success(@Nullable AnonymousAuth anonymousAuth) {
if (anonymousAuth != null)
Expand All @@ -120,7 +121,7 @@ public void onFailure(@NonNull RuntimeException e) {


ResearchCodeClient researchCodeClient = ResearchCodeClient.getInstance(this);
researchCodeClient.getResearchQuestions("GAD212").executeAsync(new ApiResponse<ResearchQuestions>() {
researchCodeClient.getResearchQuestions("GAD212").executeAsync(new ApiCallBack<ResearchQuestions>() {
@Override
public void success(@Nullable ResearchQuestions researchQuestions) {
List<ResearchQuestion> questions = researchQuestions.getResearchQuestions();
Expand All @@ -140,7 +141,7 @@ public void onFailure(@NonNull RuntimeException e) {
JournalClient journalClient = JournalClient.getInstance(this);
//journalClient.saveJournal(new Journal("I fell good", Calendar.getInstance().getTimeInMillis()));
//Journal journal = journalClient.loadJournals().get(0);
journalClient.uploadJournals().executeAsync(new ApiResponse<Void>() {
journalClient.uploadJournals().executeAsync(new ApiCallBack<Void>() {
@Override
public void success(@Nullable Void unused) {

Expand Down Expand Up @@ -172,7 +173,7 @@ public void onClick(View v) {


ScoresClient scoresClient = ScoresClient.getInstance(this);
scoresClient.getSimilarityScores().executeAsync(new ApiResponse<List<SimilarityScore>>() {
scoresClient.getSimilarityScores().executeAsync(new ApiCallBack<List<SimilarityScore>>() {
@Override
public void success(@Nullable List<SimilarityScore> similarityScores) {
String txt = "";
Expand Down

0 comments on commit 9e47f6a

Please sign in to comment.