0

I want to move from action in notification to other activity

.addAction(R.drawable.ic_action_stat_share,
           res.getString(R.string.action_share),
startService(new Intent(NewMessageNotification.this,FloatingService.class)))
ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97
mahmoud
  • 13
  • 5
  • Is `startService` a static method? Could you share the code for this class? – Darshan Mehta Mar 19 '17 at 12:40
  • @DarshanMehta error not in (startService) ,error in (NewMessageNotification.this) – mahmoud Mar 19 '17 at 13:10
  • You cannot refer to an object with `this` out of a `static` context. `static` means that there is no instance of this class (an object), yet `this` refers to the current instance of the class. Calling `this` from a `static` context is a logical error. (You can't call something that you don't have) – showp1984 Mar 19 '17 at 13:48

0 Answers0