feeddo-react-native 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +401 -2
- package/android/build.gradle +39 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/java/dev/feeddo/reactnative/FeeddoReactNativeModule.java +380 -0
- package/android/src/main/java/dev/feeddo/reactnative/FeeddoReactNativePackage.java +25 -0
- package/dist/Feeddo.d.ts +131 -0
- package/dist/Feeddo.d.ts.map +1 -0
- package/dist/Feeddo.js +176 -0
- package/dist/Feeddo.js.map +1 -0
- package/dist/FeeddoClient.d.ts +151 -0
- package/dist/FeeddoClient.d.ts.map +1 -0
- package/dist/FeeddoClient.js +690 -0
- package/dist/FeeddoClient.js.map +1 -0
- package/dist/FeeddoProvider.d.ts +23 -0
- package/dist/FeeddoProvider.d.ts.map +1 -0
- package/dist/FeeddoProvider.js +76 -0
- package/dist/FeeddoProvider.js.map +1 -0
- package/dist/config/FeeddoConfig.d.ts +10 -0
- package/dist/config/FeeddoConfig.d.ts.map +1 -0
- package/dist/config/FeeddoConfig.js +10 -0
- package/dist/config/FeeddoConfig.js.map +1 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/models/Conversation.d.ts +27 -0
- package/dist/models/Conversation.d.ts.map +1 -0
- package/dist/models/Conversation.js +24 -0
- package/dist/models/Conversation.js.map +1 -0
- package/dist/models/EndUser.d.ts +49 -0
- package/dist/models/EndUser.d.ts.map +1 -0
- package/dist/models/EndUser.js +2 -0
- package/dist/models/EndUser.js.map +1 -0
- package/dist/models/FeeddoNotification.d.ts +15 -0
- package/dist/models/FeeddoNotification.d.ts.map +1 -0
- package/dist/models/FeeddoNotification.js +15 -0
- package/dist/models/FeeddoNotification.js.map +1 -0
- package/dist/models/HomeData.d.ts +16 -0
- package/dist/models/HomeData.d.ts.map +1 -0
- package/dist/models/HomeData.js +19 -0
- package/dist/models/HomeData.js.map +1 -0
- package/dist/models/Message.d.ts +12 -0
- package/dist/models/Message.d.ts.map +1 -0
- package/dist/models/Message.js +25 -0
- package/dist/models/Message.js.map +1 -0
- package/dist/models/PushProvider.d.ts +14 -0
- package/dist/models/PushProvider.d.ts.map +1 -0
- package/dist/models/PushProvider.js +9 -0
- package/dist/models/PushProvider.js.map +1 -0
- package/dist/models/Task.d.ts +17 -0
- package/dist/models/Task.d.ts.map +1 -0
- package/dist/models/Task.js +22 -0
- package/dist/models/Task.js.map +1 -0
- package/dist/models/TaskComment.d.ts +11 -0
- package/dist/models/TaskComment.d.ts.map +1 -0
- package/dist/models/TaskComment.js +27 -0
- package/dist/models/TaskComment.js.map +1 -0
- package/dist/models/Ticket.d.ts +13 -0
- package/dist/models/Ticket.d.ts.map +1 -0
- package/dist/models/Ticket.js +14 -0
- package/dist/models/Ticket.js.map +1 -0
- package/dist/native/FeeddoNative.d.ts +58 -0
- package/dist/native/FeeddoNative.d.ts.map +1 -0
- package/dist/native/FeeddoNative.js +22 -0
- package/dist/native/FeeddoNative.js.map +1 -0
- package/dist/push/FeeddoPushNotificationApns.d.ts +73 -0
- package/dist/push/FeeddoPushNotificationApns.d.ts.map +1 -0
- package/dist/push/FeeddoPushNotificationApns.js +301 -0
- package/dist/push/FeeddoPushNotificationApns.js.map +1 -0
- package/dist/services/ApiService.d.ts +64 -0
- package/dist/services/ApiService.d.ts.map +1 -0
- package/dist/services/ApiService.js +406 -0
- package/dist/services/ApiService.js.map +1 -0
- package/dist/services/ConversationService.d.ts +45 -0
- package/dist/services/ConversationService.d.ts.map +1 -0
- package/dist/services/ConversationService.js +259 -0
- package/dist/services/ConversationService.js.map +1 -0
- package/dist/services/WebSocketService.d.ts +26 -0
- package/dist/services/WebSocketService.d.ts.map +1 -0
- package/dist/services/WebSocketService.js +157 -0
- package/dist/services/WebSocketService.js.map +1 -0
- package/dist/theme/FeeddoTheme.d.ts +31 -0
- package/dist/theme/FeeddoTheme.d.ts.map +1 -0
- package/dist/theme/FeeddoTheme.js +60 -0
- package/dist/theme/FeeddoTheme.js.map +1 -0
- package/dist/ui/FeeddoFeedbackCard.d.ts +15 -0
- package/dist/ui/FeeddoFeedbackCard.d.ts.map +1 -0
- package/dist/ui/FeeddoFeedbackCard.js +188 -0
- package/dist/ui/FeeddoFeedbackCard.js.map +1 -0
- package/dist/ui/FeeddoModal.d.ts +20 -0
- package/dist/ui/FeeddoModal.d.ts.map +1 -0
- package/dist/ui/FeeddoModal.js +180 -0
- package/dist/ui/FeeddoModal.js.map +1 -0
- package/dist/ui/components/AttachmentPreview.d.ts +10 -0
- package/dist/ui/components/AttachmentPreview.d.ts.map +1 -0
- package/dist/ui/components/AttachmentPreview.js +143 -0
- package/dist/ui/components/AttachmentPreview.js.map +1 -0
- package/dist/ui/components/ChatInputArea.d.ts +16 -0
- package/dist/ui/components/ChatInputArea.d.ts.map +1 -0
- package/dist/ui/components/ChatInputArea.js +85 -0
- package/dist/ui/components/ChatInputArea.js.map +1 -0
- package/dist/ui/components/FeeddoIcon.d.ts +10 -0
- package/dist/ui/components/FeeddoIcon.d.ts.map +1 -0
- package/dist/ui/components/FeeddoIcon.js +690 -0
- package/dist/ui/components/FeeddoIcon.js.map +1 -0
- package/dist/ui/components/FeeddoNotificationBadge.d.ts +14 -0
- package/dist/ui/components/FeeddoNotificationBadge.d.ts.map +1 -0
- package/dist/ui/components/FeeddoNotificationBadge.js +171 -0
- package/dist/ui/components/FeeddoNotificationBadge.js.map +1 -0
- package/dist/ui/components/MessageBubble.d.ts +13 -0
- package/dist/ui/components/MessageBubble.d.ts.map +1 -0
- package/dist/ui/components/MessageBubble.js +163 -0
- package/dist/ui/components/MessageBubble.js.map +1 -0
- package/dist/ui/components/NotificationsSheet.d.ts +10 -0
- package/dist/ui/components/NotificationsSheet.d.ts.map +1 -0
- package/dist/ui/components/NotificationsSheet.js +252 -0
- package/dist/ui/components/NotificationsSheet.js.map +1 -0
- package/dist/ui/components/RatingWidget.d.ts +11 -0
- package/dist/ui/components/RatingWidget.d.ts.map +1 -0
- package/dist/ui/components/RatingWidget.js +34 -0
- package/dist/ui/components/RatingWidget.js.map +1 -0
- package/dist/ui/components/TaskCard.d.ts +12 -0
- package/dist/ui/components/TaskCard.d.ts.map +1 -0
- package/dist/ui/components/TaskCard.js +210 -0
- package/dist/ui/components/TaskCard.js.map +1 -0
- package/dist/ui/components/TaskDetailsSheet.d.ts +15 -0
- package/dist/ui/components/TaskDetailsSheet.d.ts.map +1 -0
- package/dist/ui/components/TaskDetailsSheet.js +577 -0
- package/dist/ui/components/TaskDetailsSheet.js.map +1 -0
- package/dist/ui/components/TicketCard.d.ts +11 -0
- package/dist/ui/components/TicketCard.d.ts.map +1 -0
- package/dist/ui/components/TicketCard.js +100 -0
- package/dist/ui/components/TicketCard.js.map +1 -0
- package/dist/ui/components/TicketDetailsSheet.d.ts +14 -0
- package/dist/ui/components/TicketDetailsSheet.d.ts.map +1 -0
- package/dist/ui/components/TicketDetailsSheet.js +254 -0
- package/dist/ui/components/TicketDetailsSheet.js.map +1 -0
- package/dist/ui/components/TypingIndicator.d.ts +10 -0
- package/dist/ui/components/TypingIndicator.d.ts.map +1 -0
- package/dist/ui/components/TypingIndicator.js +77 -0
- package/dist/ui/components/TypingIndicator.js.map +1 -0
- package/dist/ui/screens/FeeddoChatScreen.d.ts +13 -0
- package/dist/ui/screens/FeeddoChatScreen.d.ts.map +1 -0
- package/dist/ui/screens/FeeddoChatScreen.js +681 -0
- package/dist/ui/screens/FeeddoChatScreen.js.map +1 -0
- package/dist/ui/screens/FeeddoHomeScreen.d.ts +15 -0
- package/dist/ui/screens/FeeddoHomeScreen.d.ts.map +1 -0
- package/dist/ui/screens/FeeddoHomeScreen.js +653 -0
- package/dist/ui/screens/FeeddoHomeScreen.js.map +1 -0
- package/dist/ui/screens/FeeddoMessagesScreen.d.ts +12 -0
- package/dist/ui/screens/FeeddoMessagesScreen.d.ts.map +1 -0
- package/dist/ui/screens/FeeddoMessagesScreen.js +326 -0
- package/dist/ui/screens/FeeddoMessagesScreen.js.map +1 -0
- package/dist/ui/screens/FeeddoTasksScreen.d.ts +13 -0
- package/dist/ui/screens/FeeddoTasksScreen.d.ts.map +1 -0
- package/dist/ui/screens/FeeddoTasksScreen.js +517 -0
- package/dist/ui/screens/FeeddoTasksScreen.js.map +1 -0
- package/dist/ui/screens/FeeddoTicketsScreen.d.ts +10 -0
- package/dist/ui/screens/FeeddoTicketsScreen.d.ts.map +1 -0
- package/dist/ui/screens/FeeddoTicketsScreen.js +112 -0
- package/dist/ui/screens/FeeddoTicketsScreen.js.map +1 -0
- package/dist/utils/DeviceInfoHelper.d.ts +29 -0
- package/dist/utils/DeviceInfoHelper.d.ts.map +1 -0
- package/dist/utils/DeviceInfoHelper.js +190 -0
- package/dist/utils/DeviceInfoHelper.js.map +1 -0
- package/dist/utils/MediaHelper.d.ts +20 -0
- package/dist/utils/MediaHelper.d.ts.map +1 -0
- package/dist/utils/MediaHelper.js +92 -0
- package/dist/utils/MediaHelper.js.map +1 -0
- package/dist/utils/NotificationSupport.d.ts +22 -0
- package/dist/utils/NotificationSupport.d.ts.map +1 -0
- package/dist/utils/NotificationSupport.js +211 -0
- package/dist/utils/NotificationSupport.js.map +1 -0
- package/dist/utils/StorageHelper.d.ts +65 -0
- package/dist/utils/StorageHelper.d.ts.map +1 -0
- package/dist/utils/StorageHelper.js +273 -0
- package/dist/utils/StorageHelper.js.map +1 -0
- package/feeddo-react-native.podspec +26 -0
- package/ios/FeeddoReactNativeModule.h +8 -0
- package/ios/FeeddoReactNativeModule.m +831 -0
- package/package.json +56 -4
- package/src/Feeddo.ts +247 -0
- package/src/FeeddoClient.ts +895 -0
- package/src/FeeddoProvider.tsx +139 -0
- package/src/config/FeeddoConfig.ts +9 -0
- package/src/index.ts +67 -0
- package/src/models/Conversation.ts +50 -0
- package/src/models/EndUser.ts +65 -0
- package/src/models/FeeddoNotification.ts +29 -0
- package/src/models/HomeData.ts +33 -0
- package/src/models/Message.ts +36 -0
- package/src/models/PushProvider.ts +15 -0
- package/src/models/Task.ts +40 -0
- package/src/models/TaskComment.ts +36 -0
- package/src/models/Ticket.ts +25 -0
- package/src/native/FeeddoNative.ts +80 -0
- package/src/push/FeeddoPushNotificationApns.ts +362 -0
- package/src/services/ApiService.ts +456 -0
- package/src/services/ConversationService.ts +305 -0
- package/src/services/WebSocketService.ts +185 -0
- package/src/theme/FeeddoTheme.ts +85 -0
- package/src/ui/FeeddoFeedbackCard.tsx +245 -0
- package/src/ui/FeeddoModal.tsx +309 -0
- package/src/ui/components/AttachmentPreview.tsx +192 -0
- package/src/ui/components/ChatInputArea.tsx +154 -0
- package/src/ui/components/FeeddoIcon.tsx +903 -0
- package/src/ui/components/FeeddoNotificationBadge.tsx +234 -0
- package/src/ui/components/MessageBubble.tsx +223 -0
- package/src/ui/components/NotificationsSheet.tsx +324 -0
- package/src/ui/components/RatingWidget.tsx +64 -0
- package/src/ui/components/TaskCard.tsx +259 -0
- package/src/ui/components/TaskDetailsSheet.tsx +747 -0
- package/src/ui/components/TicketCard.tsx +128 -0
- package/src/ui/components/TicketDetailsSheet.tsx +324 -0
- package/src/ui/components/TypingIndicator.tsx +104 -0
- package/src/ui/screens/FeeddoChatScreen.tsx +877 -0
- package/src/ui/screens/FeeddoHomeScreen.tsx +824 -0
- package/src/ui/screens/FeeddoMessagesScreen.tsx +414 -0
- package/src/ui/screens/FeeddoTasksScreen.tsx +671 -0
- package/src/ui/screens/FeeddoTicketsScreen.tsx +164 -0
- package/src/utils/DeviceInfoHelper.ts +209 -0
- package/src/utils/MediaHelper.ts +105 -0
- package/src/utils/NotificationSupport.ts +233 -0
- package/src/utils/StorageHelper.ts +305 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Feeddo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,402 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Feeddo React Native SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Drop a live AI support chat into your React Native (iOS & Android) app with just a few lines of code.
|
|
4
|
+
|
|
5
|
+
## What is Feeddo?
|
|
6
|
+
|
|
7
|
+
Feeddo is an AI-powered customer support widget for your React Native app. Being the premier **Intercom alternative for React Native**, Feeddo provides a native, lightweight, and AI-first experience:
|
|
8
|
+
|
|
9
|
+
- 🤖 **AI Agent** - Handles simple questions instantly by reading your docs and FAQs
|
|
10
|
+
- 🎫 **Auto-creates support tickets** - Gracefully escalates to tickets when the AI cannot resolve the issue
|
|
11
|
+
- 💬 **Live chat** - Real-time WebSocket messaging with image & video attachment support
|
|
12
|
+
- 🐛 **Smart bug tracking** - Auto-detects and structures bug reports directly into actionable issues
|
|
13
|
+
- 💡 **Feature requests** - Captures, organizes, and prioritizes feature requests from users
|
|
14
|
+
- 🗳️ **Community board** - Users can browse, upvote, and comment (with attachments) on feature requests and reported bugs
|
|
15
|
+
- 🔔 **Push Notifications** - Direct iOS APNs (built-in, zero AppDelegate boilerplate) and Firebase Cloud Messaging (FCM) support with interactive in-app banners and deep-linking
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Screenshots
|
|
20
|
+
|
|
21
|
+
### 1. Simple & Clean Home
|
|
22
|
+
Your users get a clean dashboard to manage their conversations and tickets.
|
|
23
|
+
|
|
24
|
+
<p align="center">
|
|
25
|
+
<img src="https://raw.githubusercontent.com/feeddo-support/feeddo_flutter/341da25d67f3a9a7d0d845ceab7145942859746e/screenshots/Home.png" height="500" alt="Home Screen" />
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
### 2. AI Support Agent
|
|
29
|
+
If a user asks how to do something, the AI agent searches your docs and answers instantly.
|
|
30
|
+
|
|
31
|
+
<p align="center">
|
|
32
|
+
<img src="https://raw.githubusercontent.com/feeddo-support/feeddo_flutter/341da25d67f3a9a7d0d845ceab7145942859746e/screenshots/chat_example1.png" height="500" alt="AI Chat Answer" />
|
|
33
|
+
</p>
|
|
34
|
+
|
|
35
|
+
### 3. Smart Bug Reporting
|
|
36
|
+
If a user reports a bug, the agent automatically gathers details and creates a bug report for you.
|
|
37
|
+
|
|
38
|
+
<p align="center">
|
|
39
|
+
<img src="https://raw.githubusercontent.com/feeddo-support/feeddo_flutter/341da25d67f3a9a7d0d845ceab7145942859746e/screenshots/chatexample2.png" height="500" alt="Bug Report Conversation" />
|
|
40
|
+
|
|
41
|
+
<img src="https://raw.githubusercontent.com/feeddo-support/feeddo_flutter/341da25d67f3a9a7d0d845ceab7145942859746e/screenshots/chat_example3.png" height="500" alt="Bug Ticket Created" />
|
|
42
|
+
</p>
|
|
43
|
+
|
|
44
|
+
### 4. Community Board
|
|
45
|
+
Other users can see feature requests and reported bugs, upvote them, and add comments.
|
|
46
|
+
|
|
47
|
+
<p align="center">
|
|
48
|
+
<img src="https://raw.githubusercontent.com/feeddo-support/feeddo_flutter/341da25d67f3a9a7d0d845ceab7145942859746e/screenshots/community_board.png" height="500" alt="Community Board" />
|
|
49
|
+
</p>
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Installation
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Using npm
|
|
57
|
+
npm install feeddo-react-native @react-native-async-storage/async-storage
|
|
58
|
+
|
|
59
|
+
# Using yarn
|
|
60
|
+
yarn add feeddo-react-native @react-native-async-storage/async-storage
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Platform Setup (iOS & Android)
|
|
64
|
+
|
|
65
|
+
#### iOS Setup
|
|
66
|
+
|
|
67
|
+
1. Install iOS pods (autolinks native device info, image picker, video player, and APNs bridge):
|
|
68
|
+
```bash
|
|
69
|
+
cd ios && pod install && cd ..
|
|
70
|
+
```
|
|
71
|
+
2. Ensure your minimum deployment target in `ios/Podfile` is **iOS 13.4** or higher (iOS 15.0 recommended).
|
|
72
|
+
3. If your app uses image attachments from the photo library, add `NSPhotoLibraryUsageDescription` to `ios/YourApp/Info.plist`:
|
|
73
|
+
```xml
|
|
74
|
+
<key>NSPhotoLibraryUsageDescription</key>
|
|
75
|
+
<string>We allow you to attach screenshots and photos to support messages.</string>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
#### Android Setup
|
|
79
|
+
|
|
80
|
+
1. Ensure `minSdkVersion` is `21` or higher in `android/build.gradle`.
|
|
81
|
+
2. Ensure the Internet permission is present in `android/app/src/main/AndroidManifest.xml`:
|
|
82
|
+
```xml
|
|
83
|
+
<uses-permission android:name="android.permission.INTERNET" />
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Quick Start
|
|
89
|
+
|
|
90
|
+
### 1. Get Your API Key
|
|
91
|
+
|
|
92
|
+
Sign up at [feeddo.dev](https://feeddo.dev) and grab your API key from the dashboard.
|
|
93
|
+
|
|
94
|
+
### 2. Wrap Your App in `FeeddoProvider`
|
|
95
|
+
|
|
96
|
+
Place `FeeddoProvider` at the root of your React Native component tree. This hosts the Feeddo modal navigation stack and queued in-app slide notifications:
|
|
97
|
+
|
|
98
|
+
```tsx
|
|
99
|
+
import React from 'react';
|
|
100
|
+
import { FeeddoProvider } from 'feeddo-react-native';
|
|
101
|
+
import AppNavigation from './AppNavigation';
|
|
102
|
+
|
|
103
|
+
export default function App() {
|
|
104
|
+
return (
|
|
105
|
+
<FeeddoProvider>
|
|
106
|
+
<AppNavigation />
|
|
107
|
+
</FeeddoProvider>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 3. Initialize Feeddo
|
|
113
|
+
|
|
114
|
+
Call `Feeddo.init()` when your app starts (or after user authentication):
|
|
115
|
+
|
|
116
|
+
```tsx
|
|
117
|
+
import { useEffect } from 'react';
|
|
118
|
+
import { Feeddo } from 'feeddo-react-native';
|
|
119
|
+
|
|
120
|
+
export function HomeScreen() {
|
|
121
|
+
useEffect(() => {
|
|
122
|
+
Feeddo.init({
|
|
123
|
+
apiKey: 'your-api-key-here',
|
|
124
|
+
externalUserId: 'user_12345', // Optional: link to your own user DB
|
|
125
|
+
userName: 'Jane Doe',
|
|
126
|
+
email: 'jane@example.com',
|
|
127
|
+
});
|
|
128
|
+
}, []);
|
|
129
|
+
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 4. Open Support or Community Board
|
|
135
|
+
|
|
136
|
+
```tsx
|
|
137
|
+
import { TouchableOpacity, Text } from 'react-native';
|
|
138
|
+
import { Feeddo } from 'feeddo-react-native';
|
|
139
|
+
|
|
140
|
+
<TouchableOpacity onPress={() => Feeddo.show()}>
|
|
141
|
+
<Text>Get Help & Support</Text>
|
|
142
|
+
</TouchableOpacity>
|
|
143
|
+
|
|
144
|
+
<TouchableOpacity onPress={() => Feeddo.showCommunityBoard()}>
|
|
145
|
+
<Text>Request a feature</Text>
|
|
146
|
+
</TouchableOpacity>
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Drop-in Feedback Card
|
|
152
|
+
|
|
153
|
+
Embed feedback or feature voting directly into your Settings or Profile screen using `FeeddoFeedbackCard`:
|
|
154
|
+
|
|
155
|
+
```tsx
|
|
156
|
+
import { Feeddo, FeeddoFeedbackCard } from 'feeddo-react-native';
|
|
157
|
+
|
|
158
|
+
<FeeddoFeedbackCard
|
|
159
|
+
title="Need help or have an idea?"
|
|
160
|
+
description="Chat with our AI agent, report an issue, or request new features."
|
|
161
|
+
onChatPress={() => Feeddo.show()}
|
|
162
|
+
onBoardPress={() => Feeddo.showCommunityBoard()}
|
|
163
|
+
/>
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Understanding `Feeddo.init()`
|
|
169
|
+
|
|
170
|
+
```tsx
|
|
171
|
+
const userId = await Feeddo.init({
|
|
172
|
+
// Required: Your API key from feeddo.dev
|
|
173
|
+
apiKey: 'fdo_your_api_key_here',
|
|
174
|
+
|
|
175
|
+
// Optional: Your app's user ID (links Feeddo to your system)
|
|
176
|
+
externalUserId: 'user_12345',
|
|
177
|
+
|
|
178
|
+
// Optional: User's display name (used in chats and comments)
|
|
179
|
+
userName: 'Jane Doe',
|
|
180
|
+
|
|
181
|
+
// Optional: User's email
|
|
182
|
+
email: 'jane@example.com',
|
|
183
|
+
|
|
184
|
+
// Optional: Segment your users (e.g., 'free', 'trial', 'enterprise')
|
|
185
|
+
userSegment: 'enterprise',
|
|
186
|
+
|
|
187
|
+
// Optional: Track subscription status
|
|
188
|
+
subscriptionStatus: 'active',
|
|
189
|
+
|
|
190
|
+
// Optional: Any arbitrary metadata to track
|
|
191
|
+
customAttributes: {
|
|
192
|
+
plan: 'pro',
|
|
193
|
+
signupDate: '2026-01-01',
|
|
194
|
+
teamSize: 12,
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
// Optional: Enable/disable in-app banner notifications (default: true)
|
|
198
|
+
isInAppNotificationOn: true,
|
|
199
|
+
|
|
200
|
+
// Optional: Theme for notifications
|
|
201
|
+
theme: FeeddoTheme.dark(),
|
|
202
|
+
|
|
203
|
+
// Optional: Duration in ms for in-app banner (default: 10000)
|
|
204
|
+
notificationDuration: 10000,
|
|
205
|
+
|
|
206
|
+
// Optional: Remote push token (APNs or FCM)
|
|
207
|
+
pushToken: 'device-push-token',
|
|
208
|
+
|
|
209
|
+
// Optional: Push provider ('fcm' | 'apns' | 'onesignal')
|
|
210
|
+
pushProvider: FeeddoPushProvider.fcm,
|
|
211
|
+
});
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Returns:** The `userId` managed by Feeddo for this user.
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Push Notifications Setup (iOS & Android)
|
|
219
|
+
|
|
220
|
+
Push notifications ensure users receive developer replies, task progress, comments, and release announcements even when your app is backgrounded or closed.
|
|
221
|
+
|
|
222
|
+
### Option A: iOS Direct APNs (`FeeddoPushNotificationApns` — Zero `AppDelegate` Code)
|
|
223
|
+
|
|
224
|
+
If your app targets iOS (or you want direct Apple APNs on iOS without Firebase), use the built-in `FeeddoPushNotificationApns` bridge:
|
|
225
|
+
|
|
226
|
+
1. **Xcode Setup:** Enable **Push Notifications** in **Signing & Capabilities** (adds `aps-environment` to your `.entitlements`), and add `NSUserNotificationsUsageDescription` to `Info.plist`.
|
|
227
|
+
2. **Initialize & Wire to Feeddo:**
|
|
228
|
+
```tsx
|
|
229
|
+
import { useEffect } from 'react';
|
|
230
|
+
import {
|
|
231
|
+
Feeddo,
|
|
232
|
+
FeeddoPushProvider,
|
|
233
|
+
FeeddoPushNotificationApns,
|
|
234
|
+
} from 'feeddo-react-native';
|
|
235
|
+
|
|
236
|
+
useEffect(() => {
|
|
237
|
+
let sub: { cancel(): void } | undefined;
|
|
238
|
+
|
|
239
|
+
(async () => {
|
|
240
|
+
await FeeddoPushNotificationApns.instance.initialize();
|
|
241
|
+
|
|
242
|
+
await Feeddo.init({
|
|
243
|
+
apiKey: '<YOUR_FEEDDO_API_KEY>',
|
|
244
|
+
pushToken: FeeddoPushNotificationApns.instance.token ?? undefined,
|
|
245
|
+
pushProvider: FeeddoPushProvider.apns,
|
|
246
|
+
isInAppNotificationOn: true,
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
sub = FeeddoPushNotificationApns.instance.attachToFeeddo({
|
|
250
|
+
onToken: (token) =>
|
|
251
|
+
Feeddo.registerPushToken({
|
|
252
|
+
pushToken: token,
|
|
253
|
+
pushProvider: FeeddoPushProvider.apns,
|
|
254
|
+
}),
|
|
255
|
+
onNotificationTap: (payload) => Feeddo.handleNotificationTap(payload),
|
|
256
|
+
onForegroundNotification: (payload) =>
|
|
257
|
+
Feeddo.handleForegroundNotification(payload),
|
|
258
|
+
});
|
|
259
|
+
})();
|
|
260
|
+
|
|
261
|
+
return () => sub?.cancel();
|
|
262
|
+
}, []);
|
|
263
|
+
```
|
|
264
|
+
3. **Request Permission Contextually** (in Settings, Onboarding, or right when opening Support):
|
|
265
|
+
```tsx
|
|
266
|
+
await FeeddoPushNotificationApns.instance.requestNotificationPermissions();
|
|
267
|
+
```
|
|
268
|
+
4. **Feeddo Server Setup:** In [feeddo.dev](https://feeddo.dev) → **Settings → Notifications → Apple (APNs)**, enter your Team ID, Key ID, Bundle ID (Topic), Environment (**Sandbox** for Debug/Simulator, **Production** for TestFlight/App Store), and upload your `.p8` key.
|
|
269
|
+
|
|
270
|
+
### Option B: Cross-Platform iOS + Android (`@react-native-firebase/messaging`)
|
|
271
|
+
|
|
272
|
+
1. In [Firebase Console](https://console.firebase.google.com/) → **Project Settings → Service accounts**, generate a private key (JSON) and upload it in [feeddo.dev](https://feeddo.dev) → **Settings → Notifications → Google (FCM)**.
|
|
273
|
+
2. Wire Firebase Messaging handlers into Feeddo:
|
|
274
|
+
|
|
275
|
+
```tsx
|
|
276
|
+
import messaging from '@react-native-firebase/messaging';
|
|
277
|
+
import { Feeddo, FeeddoPushProvider } from 'feeddo-react-native';
|
|
278
|
+
|
|
279
|
+
// 1. Request permission & register token
|
|
280
|
+
await messaging().requestPermission();
|
|
281
|
+
const token = await messaging().getToken();
|
|
282
|
+
|
|
283
|
+
await Feeddo.init({
|
|
284
|
+
apiKey: '<YOUR_FEEDDO_API_KEY>',
|
|
285
|
+
pushToken: token,
|
|
286
|
+
pushProvider: FeeddoPushProvider.fcm,
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
// 2. Token refresh listener
|
|
290
|
+
messaging().onTokenRefresh((newToken) => {
|
|
291
|
+
Feeddo.registerPushToken({
|
|
292
|
+
pushToken: newToken,
|
|
293
|
+
pushProvider: FeeddoPushProvider.fcm,
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
// 3. Notification opened from background
|
|
298
|
+
messaging().onNotificationOpenedApp((remoteMessage) => {
|
|
299
|
+
if (remoteMessage.data) {
|
|
300
|
+
Feeddo.handleNotificationTap(remoteMessage.data);
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
// 4. Notification opened from terminated state
|
|
305
|
+
messaging()
|
|
306
|
+
.getInitialNotification()
|
|
307
|
+
.then((remoteMessage) => {
|
|
308
|
+
if (remoteMessage?.data) {
|
|
309
|
+
Feeddo.handleNotificationTap(remoteMessage.data);
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
// 5. In-app banner for foreground notifications
|
|
314
|
+
messaging().onMessage(async (remoteMessage) => {
|
|
315
|
+
Feeddo.handleForegroundNotification(remoteMessage.data ?? {}, {
|
|
316
|
+
title: remoteMessage.notification?.title,
|
|
317
|
+
message: remoteMessage.notification?.body,
|
|
318
|
+
});
|
|
319
|
+
});
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## Customizing Themes & Colors
|
|
325
|
+
|
|
326
|
+
Feeddo includes Dark and Light themes, plus custom color overrides:
|
|
327
|
+
|
|
328
|
+
```tsx
|
|
329
|
+
import { Feeddo, FeeddoTheme } from 'feeddo-react-native';
|
|
330
|
+
|
|
331
|
+
// Default Dark theme
|
|
332
|
+
Feeddo.show({ theme: FeeddoTheme.dark() });
|
|
333
|
+
|
|
334
|
+
// Light theme
|
|
335
|
+
Feeddo.show({ theme: FeeddoTheme.light() });
|
|
336
|
+
|
|
337
|
+
// Custom Brand Colors
|
|
338
|
+
const myTheme = new FeeddoTheme({
|
|
339
|
+
isDark: true,
|
|
340
|
+
colors: {
|
|
341
|
+
background: '#1A1A2E',
|
|
342
|
+
textPrimary: '#FFFFFF',
|
|
343
|
+
textSecondary: '#B0B0B0',
|
|
344
|
+
primary: '#00D9FF',
|
|
345
|
+
cardBackground: '#252540',
|
|
346
|
+
surface: '#252540',
|
|
347
|
+
appBarBackground: '#1A1A2E',
|
|
348
|
+
success: '#4CAF50',
|
|
349
|
+
error: '#FF5252',
|
|
350
|
+
border: '#3A3A5C',
|
|
351
|
+
divider: '#2A2A3E',
|
|
352
|
+
},
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
Feeddo.show({ theme: myTheme });
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## Unread Message Badge
|
|
361
|
+
|
|
362
|
+
```tsx
|
|
363
|
+
import { useState, useEffect } from 'react';
|
|
364
|
+
import { View, Text } from 'react-native';
|
|
365
|
+
import { Feeddo } from 'feeddo-react-native';
|
|
366
|
+
|
|
367
|
+
export function SupportTabIcon() {
|
|
368
|
+
const [unread, setUnread] = useState(Feeddo.unreadMessageCount);
|
|
369
|
+
|
|
370
|
+
useEffect(() => {
|
|
371
|
+
return Feeddo.subscribeUnreadCount((count) => {
|
|
372
|
+
setUnread(count);
|
|
373
|
+
});
|
|
374
|
+
}, []);
|
|
375
|
+
|
|
376
|
+
return (
|
|
377
|
+
<View>
|
|
378
|
+
{unread > 0 && (
|
|
379
|
+
<View style={{ backgroundColor: '#EF4444', borderRadius: 10, paddingHorizontal: 6 }}>
|
|
380
|
+
<Text style={{ color: '#fff', fontSize: 12 }}>{unread}</Text>
|
|
381
|
+
</View>
|
|
382
|
+
)}
|
|
383
|
+
</View>
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
## User Logout & Cleanup
|
|
391
|
+
|
|
392
|
+
When a user logs out of your app, call `Feeddo.dispose()` to reset SDK state, disconnect WebSockets, and clear active notifications:
|
|
393
|
+
|
|
394
|
+
```tsx
|
|
395
|
+
Feeddo.dispose();
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
---
|
|
399
|
+
|
|
400
|
+
## License
|
|
401
|
+
|
|
402
|
+
MIT License - see [LICENSE](./LICENSE) for details.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
buildscript {
|
|
2
|
+
repositories {
|
|
3
|
+
google()
|
|
4
|
+
mavenCentral()
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
def safeExtGet(prop, fallback) {
|
|
9
|
+
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
apply plugin: 'com.android.library'
|
|
13
|
+
|
|
14
|
+
android {
|
|
15
|
+
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
|
|
16
|
+
if (agpVersion.tokenize('.')[0].toInteger() >= 7) {
|
|
17
|
+
namespace "dev.feeddo.reactnative"
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
compileSdkVersion safeExtGet('compileSdkVersion', 34)
|
|
21
|
+
|
|
22
|
+
defaultConfig {
|
|
23
|
+
minSdkVersion safeExtGet('minSdkVersion', 21)
|
|
24
|
+
targetSdkVersion safeExtGet('targetSdkVersion', 34)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
lintOptions {
|
|
28
|
+
abortOnError false
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
repositories {
|
|
33
|
+
google()
|
|
34
|
+
mavenCentral()
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
dependencies {
|
|
38
|
+
implementation 'com.facebook.react:react-native:+'
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<manifest />
|