Skip to content

Commit 9893cf0

Browse files
authored
Update README.md
1 parent bbc69b7 commit 9893cf0

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Do you want to see this package in action? Check these awesome projects, yay!
4242
- [VibePay](https://vibepay.com) - A simple, smarter, better way to get paid.
4343
- [Opinio](https://opinio.media) - Allows the population to be surveyed on social issues.
4444
- [medpex: Online Apotheke](https://www.medpex.de) - Online pharmacy for medicines & cosmetics with over 5 million customers.
45+
- [CONTACT Software](https://www.contact-software.com/) - Energizing your digital business.
4546

4647
Share your awesome project [here](https://github.com/proyecto26/react-native-inappbrowser/issues/164)! ❤️
4748

@@ -186,9 +187,12 @@ import { Linking, Alert } from 'react-native'
186187
import { InAppBrowser } from 'react-native-inappbrowser-reborn'
187188
188189
...
190+
async sleep(timeout) {
191+
return new Promise(resolve => setTimeout(resolve, timeout))
192+
}
189193
async openLink() {
190194
try {
191-
const url = 'https://www.proyecto26.com'
195+
const url = 'https://github.com/proyecto26'
192196
if (await InAppBrowser.isAvailable()) {
193197
const result = await InAppBrowser.open(url, {
194198
// iOS Properties
@@ -222,6 +226,7 @@ import { InAppBrowser } from 'react-native-inappbrowser-reborn'
222226
'my-custom-header': 'my custom header value'
223227
}
224228
})
229+
await this.sleep(800);
225230
Alert.alert(JSON.stringify(result))
226231
}
227232
else Linking.openURL(url)
@@ -244,7 +249,7 @@ public class MainActivity extends ReactActivity {
244249
@Override
245250
protected void onStart() {
246251
super.onStart();
247-
RNInAppBrowserModule.onStart(this);
252+
RNInAppBrowserModule.onStart(this);
248253
}
249254

250255
}
@@ -298,7 +303,7 @@ define your app scheme and replace `my-scheme` and `my-host` with your info.
298303
- utilities.js
299304
```javascript
300305
import { Platform } from 'react-native'
301-
export const getDeepLink = (path = "") => {
306+
export const getDeepLink = (path = '') => {
302307
const scheme = 'my-scheme'
303308
const prefix = Platform.OS == 'android' ? `${scheme}://my-host/` : `${scheme}://`
304309
return prefix + path
@@ -344,7 +349,7 @@ import { InAppBrowser } from 'react-native-inappbrowser-reborn'
344349
import { getDeepLink } from './utilities'
345350
...
346351
async onLogin() {
347-
const deepLink = getDeepLink("callback")
352+
const deepLink = getDeepLink('callback)
348353
const url = `https://my-auth-login-page.com?redirect_uri=${deepLink}`
349354
try {
350355
if (await InAppBrowser.isAvailable()) {

0 commit comments

Comments
 (0)