hi am trying to allow the user to change the delay time after an action is performed on button click..i tried this where time is the Edit Text and used time instead of a number under the handler.
Long delay=time.getText().toString().trim();
but i am getting and error incompatible types if anyone have a solution for this please help i know it is simple but i am not getting it.
code
 b1.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Handler handler = new Handler();
            handler.postDelayed(new Runnable() {
                @Override
                public void run() {
            String tittle=ed1.getText().toString().trim();
            String subject=ed2.getText().toString().trim();
            String body=ed3.getText().toString().trim();
            NotificationManager notif=(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
            Notification notify=new Notification(R.drawable.noti,tittle,System.currentTimeMillis());
            PendingIntent pending= PendingIntent.getActivity(getApplicationContext(), 0, new Intent(), 0);
            notify.setLatestEventInfo(getApplicationContext(),subject,body,pending);
            notif.notify(0, notify);
                }
            }, 12000);
        }
    });
 
    