Currently i was being able to display a push notification in my android application. And i want to add and Action to the push notification which can help me to save the notification as message.
How can i do this.
Currently i was being able to display a push notification in my android application. And i want to add and Action to the push notification which can help me to save the notification as message.
How can i do this.
By implementing an interface in your parent activity you can pass the image url (or object) back to your activity on image click.
public interface FragmentListener{
void onImageClicked(String uri);
}
Implement that interface in your activity and pass it to your fragment. When you receive the onClick from the image view you can then just call ((DetailActivity)getActivity()).onImageClicked(url);
or something along those lines.
You have two options
if its a bitmap drawable, get the bitmap from it and save it on a disk (or internal storage)and then pass the directory location. You can also choose to pass the bitmap directly in intent but it may result in and exception as intents size should not exceed 512kb, i wouldn't take this risk
if its not a bitmap, take a screen shot and then follow option 1 with the bitmap