File tree 1 file changed +60
-0
lines changed
1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ # Hookr (Kotlin)
3
+ I use this in my applications and I thought I just make it into a library.<br >
4
+ Simple Utility that hook up your app to this various external applications:
5
+
6
+ 1 . Inbox (SMS)
7
+ 1 . Phone
8
+ 1 . Facebook Messenger
9
+ 1 . Viber
10
+ 1 . Whatsapp
11
+
12
+ This is usually used in Help/Support section where you link your app to external apps.
13
+
14
+ ## Usage
15
+
16
+ ``` kotlin
17
+ var sampleNumber = " +639123456780"
18
+ var facebookId = " 1231232131"
19
+ ```
20
+ ### Inbox (SMS)
21
+
22
+ ``` kotlin
23
+ Hook .up(context).withSMS(sampleNumber)
24
+ ```
25
+
26
+ ### Phone
27
+
28
+ ``` kotlin
29
+ Hook .up(context).withPhoneCall(sampleNumber)
30
+ ```
31
+
32
+ ### Facebook Messenger
33
+
34
+ ``` kotlin
35
+ Hook .up(context).withMessenger(facebookId)
36
+ ```
37
+ Can't find your facebook ID? use this: https://findmyfbid.com/
38
+
39
+ ### Viber
40
+
41
+ ``` kotlin
42
+ Hook .up(context).withViber(facebookId)
43
+ ```
44
+
45
+ ### Whatsapp
46
+
47
+ ``` kotlin
48
+ Hook .up(context).withWhatsApp(facebookId)
49
+ ```
50
+
51
+ ### Error Callback
52
+
53
+ In case something went wrong you can set a callback,
54
+ <br >just call the lambda and ` it ` will be the error message.
55
+ ``` kotlin
56
+ Hook .up(context).withSMS(sampleNumber) {
57
+ .. .
58
+ Log .e(" Hookr" , " error: $it " )
59
+ }
60
+ ```
You can’t perform that action at this time.
0 commit comments