« first day    last day (22 days later) » 

3:44 AM
hi
 
4:13 AM
ok
 
I think my problem is on JobManager Library which i dont implemented DI on that
i cant resolve problem and i'm trying to know whats problem
can i post source code for you?
 
yeah
 
5:10 AM
could you know whats problem?
 
5:25 AM
your app doesn't request for permission programatically?
My device is 6.0
 
No sir, i change permission normally on Settings
only for read contacts i get request permission
 
i was able to run it perfectly on emulator
no errors
 
then you must get OK on log cat
i get this error:
App has crashed, executing CustomActivityOnCrash's UncaughtExceptionHandler
java.lang.NullPointerException: Attempt to invoke virtual method 'long com.birbit.android.jobqueue.Job.getDelayInMs()' on a null object reference
at com.birbit.android.jobqueue.JobManagerThread.handleAddJob(JobManagerThread.java:115)
at com.birbit.android.jobqueue.JobManagerThread.access$100(JobManagerThread.java:35)
at com.birbit.android.jobqueue.JobManagerThread$1.handleMessage(JobManagerThread.java:228)
at com.birbit.android.jobqueue.messaging.PriorityMessageQueue.consume(PriorityMessageQueue.java:39)
 
you commented out the block with the Log. OK
 
Oh noooooo
its work fine on Activity, but i'm trying to use commented code on GetLatestRepositories class
 
5:40 AM
4-10 01:39:54.099 5871-5871/ir.pishguy.cafealachiqpro I/JOB: OK
 
please see this code:
private void getRepositories() {
    jobManager.addJobInBackground(getLatestRepositories);
}
 
yes, i put a log inside and it gets printed:
private void getRepositories() {
jobManager.addJobInBackground(getLatestRepositories);
Log.i("JOB", "OK");
/*repositoryCall.enqueue(new Callback<List<GithubRepo>>() {
@Override
public void onResponse(Call<List<GithubRepo>> call, Response<List<GithubRepo>> response) {
List<GithubRepo> repoList = new ArrayList<>();
repoList.addAll(response.body());
Log.e("JOB ", "OK");
}

@Override
public void onFailure(Call<List<GithubRepo>> call, Throwable t) {
Log.e("JOB ", "NO!!");
}
});*/
}
log is printing with verbose in logcat
 
:|
GithubService on GetLatestRepositories work fine for you? i dont return NULL?
 
no
 
this part of code is my mean :
public class GetLatestRepositories extends Job {
@Inject
GithubService githubService;

private Call<List<GithubRepo>> repositoryCall;

public GetLatestRepositories() {
super(new Params(Priority.MID).requireNetwork().persist());
repositoryCall = githubService.getAllRepositories();
}
could you change Log.e("JOB ", "OK"); to Toast and send me APK?
 
5:46 AM
am adding these ifs to double check
  if(githubService==null){
        Log.i("GetLatestRepositories:", "null");
    }
    else {
        Log.i("GetLatestRepositories:", "no null");
        repositoryCall = githubService.getAllRepositories();
    }
it is working fine man
 
:|
I'm wondering why its not work for me
 
ActivityRegister:
repositoryCall = githubService.getAllRepositories();
getRepositories();
}

private void getRepositories() {
jobManager.addJobInBackground(getLatestRepositories);
//Log.i("JOB", "OK");
repositoryCall.enqueue(new Callback<List<GithubRepo>>() {
@Override
public void onResponse(Call<List<GithubRepo>> call, Response<List<GithubRepo>> response) {
List<GithubRepo> repoList = new ArrayList<>();
repoList.addAll(response.body());
Log.e("JOB ", "OK");
}

@Override
public void onFailure(Call<List<GithubRepo>> call, Throwable t) {
 
Oh you move repositoryCall = githubService.getAllRepositories(); to ActivityRegister ?
 
04-10 01:52:19.018 14051-14051/ir.pishguy.cafealachiqpro E/JOB: OK
if just uncommented it out because repositoryCall was null before
 
could you upload project for me? my project has been broken
 
5:58 AM
There are no errors in these lines now:
   component = DaggerGithubApplicationComponent.builder()
            .contextModule(new ContextModule(this))
            .build();
and a new class was generated called "DaggerGithubApplicationComponent
"
the githubservice object is being injected in both classes.
I guess we are done
 
i get other error and i cant test it
 
when do you get the error
 
java.lang.NullPointerException: Attempt to invoke virtual method 'long com.birbit.android.jobqueue.Job.getDelayInMs()' on a null object reference
at com.birbit.android.jobqueue.JobManagerThread.handleAddJob(JobManagerThread.java:115)
at com.birbit.android.jobqueue.JobManagerThread.access$100(JobManagerThread.java:35)
at com.birbit.android.jobqueue.JobManagerThread$1.handleMessage(JobManagerThread.java:228)
at com.birbit.android.jobqueue.messaging.PriorityMessageQueue.consume(PriorityMessageQueue.java:39)
 
am about to go sleep
 
ok, could you upload project ?
 
6:11 AM
It is loading. Please accept my answer if it helped and I would help tomorrow if you still have problem.
saving this link.
 
خن
ok
i accept your post
thanks
 
Wish I can help more but I got work tomorrow and my eyes need to be ok.
 
ok,if i get other problem can i message for you?
 
I will be available tomorrow at around 6:30PM Eastern Time(New York Time)
So you can also send me skype invitation
harser777
or message me to my number: +1 331 222 7118
 
ok, i have Skype, thanks, but unfortunately my english is not native,
 
6:16 AM
ok don't worry. see ya tomorrow.
 
ok thanks. by the way can i get uploaded link?
 
Thank you very much sir
 
no problem.
 

« first day    last day (22 days later) »