Implement alert function at native side both iOS and android.