I Have a class that extends DialogFragment
. I want to make my app do a Notification
and when the user selects the notification, opens the DialogFragment
with its layout and some data.
Is there are any source code to do this?
Hope anyone helps me. Thanks in advance.
To answer, you can't open a dialog via onclick of a notfication, there is no way in android, what you can do is,
to Start activity themed as Dialog
<activity android:theme="@android:style/Theme.Dialog">
now when startActivity() is called, its displayed like dialog, so moove everything you want to display here and call this activity by pending intent.
Also to add further, to make sure your activity wont appear in recent task list you can add the following excludeFromRecents=true