This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const users: User[] = [ | |
| { id: 1, name: "John New" }, | |
| { id: 2, name: "Emauel joseph" }, | |
| { id: 3, name: "Nuwan Theek" }, | |
| { id: 4, name: "Rasik N" }, | |
| ]; | |
| export type User = { | |
| id: number; | |
| name:string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| src/ | |
| |--app/ | |
| | |--layout.tsx | |
| | |--page.tsx | |
| | |--api/ | |
| | | |--route.ts | |
| | | | |users/ | |
| | | | |--route.ts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Android | |
| adb shell am start -W -a android.intent.action.VIEW -d "linkingmobile://settings" mobileApplicationID | |
| adb shell am start -W -a android.intent.action.VIEW -d "https://yourDomain.com/Details" mobileApplicationID | |
| ## iOS | |
| xcrun simctl openurl booted "linkingmobile://Settings" | |
| xcrun simctl openurl booted "https://yourDomain.im/Settings" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Universal Links --> | |
| <intent-filter android:autoVerify='true'> | |
| <action android:name="android.intent.action.VIEW" /> | |
| <category android:name="android.intent.category.DEFAULT" /> | |
| <category android:name="android.intent.category.BROWSABLE" /> | |
| <data android:scheme='https' android:host='nextcodingjs.com' /> | |
| </intent-filter> | |
| <!-- Url Schemes --> | |
| <intent-filter android:label='filter_react_native'> | |
| <action android:name="android.intent.action.VIEW" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [{ | |
| "relation": ["delegate_permission/common.handle_all_urls"], | |
| "target": { | |
| "namespace": "android_app", | |
| "package_name": "com.myapp", | |
| "sha256_cert_fingerprints": | |
| ["7A:74:13:61:54:EB:6B:AD:AF:9A:8B:7A:1D:0A:E0:FD:92:CD:AF:CF:4E:2B:9A:9B:52:E5:8C:91:04:C9:F2:05"] | |
| } | |
| }] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //... | |
| useEffect(() => { | |
| // Get the deep link used to open the app | |
| const getUrl = async () => { | |
| const initialUrl = await Linking.getInitialURL(); | |
| if (initialUrl === null) { | |
| return; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .... | |
| // iOS 9.x or newer | |
| #import <React/RCTLinkingManager.h> | |
| - (BOOL)application:(UIApplication *)application | |
| openURL:(NSURL *)url | |
| options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options | |
| { | |
| return [RCTLinkingManager application:application openURL:url options:options]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "applinks": { | |
| "apps": [], | |
| "details": [ | |
| { | |
| "appID": "<TeamID>.<BundleId>", // AA4CAZ576V.com.example.myapp | |
| "paths": [ "*" ] // you can use wildcard to accept any route like ["*"] | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as React from 'react'; | |
| import {View, Text, TouchableOpacity, Linking} from 'react-native'; | |
| import {NavigationContainer, createNavigationContainerRef, useNavigation} from '@react-navigation/native'; | |
| import {createNativeStackNavigator} from '@react-navigation/native-stack'; | |
| import { useEffect } from 'react'; | |
| const Stack = createNativeStackNavigator(); | |
| const navigationRef = createNavigationContainerRef() | |
| function HomeScreen() { | |
| const navigation = useNavigation(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let array = [2, 5, 8, 5, 2, 3, 4, 5, 4, 3, 5, 2, 7, 11] | |
| let newArray = array.reduce((acc, curValue) => { | |
| if (acc.indexOf(curValue) === -1) { | |
| acc.push(curValue) | |
| } | |
| return acc | |
| }, []) |