Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *NotificationHelper
- Todo todo;
- new Thread(new Runnable() {
- @Override
- public void run() {
- long string = System.currentTimeMillis();
- test(string);
- }
- }).start();
- NotificationCompat.Action send_wa=
- new NotificationCompat.Action.Builder(
- 0, "Send WhatApps", DismisPendingIntent
- ).build();
- return new NotificationCompat.Builder(getApplicationContext(), channelID)
- .setContentTitle(todo.clock)//get_Clock_from_Room
- .setContentText("get_Detail_from_Room")
- .addAction(send_wa)
- .setSmallIcon(R.drawable.ic_logo);
- @SuppressLint("StaticFieldLeak")
- private void test(Long clock){
- new AsyncTask<Long, Void, List<Todo>>(){
- @Override
- protected List<Todo> doInBackground(Long... params) {
- return myDatabase.daoAccess().fetchTodoListByClock(params[0]);
- }
- }.execute(clock);
- }
- *DaoAccess
- @Query("SELECT * FROM " + MyDatabase.TABLE_NAME_TODO + " WHERE clock = :clock")
- List<Todo> fetchTodoListByClock(Long Clock);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement