react-native-dropdownalert icon indicating copy to clipboard operation
react-native-dropdownalert copied to clipboard

Add support for iOS and Android like notifications

Open testshallpass opened this issue 8 years ago • 11 comments

Thinking about adding alert types that are styled similar to the built in ones provided by Android and iOS. (👍 if you agree) Here are some screenshots of them:

iOS iosnotification

android androidnotification

testshallpass avatar Oct 28 '16 03:10 testshallpass

I have been experimenting and prototyping and have reached an ideal solution to add this feature in. I will be adding a branch and I will continue to finalize it. It is a major change so will be for 3.0.0.

testshallpass avatar Dec 10 '16 20:12 testshallpass

A change in implementation would be needed :

    const values = {
      bigImage: 'https://facebook.github.io/react/img/logo_og.png',
      smallImage: 'https://facebook.github.io/react/img/logo_og.png',
      cancelImage: 'https://facebook.github.io/react/img/logo_og.png',
      image: 'https://facebook.github.io/react/img/logo_og.png',
      header: 'Messenger',
      timestamp: '59m ago',
      title: 'Capitalize on low hanging fruit',
      username: '[email protected]',
      message: 'Podcasting operational change management inside of workflows to establish a framework.',
      actions: [{text: 'Reply', callback: this.onAction}, {text: 'Archive', callback: this.onAction}]
    }
    this.dropdown.alertWithData(values, (alertData) =>{
      console.log(alertData);
    })

testshallpass avatar Dec 10 '16 20:12 testshallpass

any news on this? i am exited about this feature.

ma-pe avatar Feb 02 '18 10:02 ma-pe

I am going to revisit this. Which notification would be priority for you? iOS or Android @ma-pe

testshallpass avatar Feb 02 '18 13:02 testshallpass

I have no priority since I am interested in both :)

ma-pe avatar Feb 02 '18 13:02 ma-pe

Any updates? I simply need a callback when calling alertWithType

tandat2209 avatar Dec 04 '18 11:12 tandat2209

@tandat2209 Checkout the open PR #150 this is attempt at it and I have some feedback I am waiting on.

testshallpass avatar Dec 04 '18 12:12 testshallpass

Also, as far as this feature, it's next in line after 3 other features + 1 enhancement are complete.

testshallpass avatar Dec 04 '18 12:12 testshallpass

@testshallpass Thanks, I will check it out 👍

tandat2209 avatar Dec 04 '18 23:12 tandat2209

@testshallpass Is this feature added?

saadmutahar avatar Feb 21 '19 10:02 saadmutahar

It would also be great to have renderContainer() where it allows us to design our own custom alert type.

azhararmar avatar Feb 12 '20 07:02 azhararmar

Closing as will not support this internally as the notification UI/UX can update from time to time hence is too much to manage in this library. However, can take advantage of new children prop in latest release (v5.0.0) to build your own alert (BYOA). I have done this myself in the example project to recreate these notifications. Check out: NotificationAndroid and NotificationIOS

testshallpass avatar Jul 31 '23 23:07 testshallpass