Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
pushkarydv authored Jul 15, 2022
2 parents f531023 + 9c243e6 commit 5a12b06
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 2 deletions.
32 changes: 31 additions & 1 deletion docs/new-architecture-library-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id: new-architecture-library-android
title: Enabling in Android Library
---

import NewArchitectureWarning from './\_markdown-new-architecture-warning.mdx';
import NewArchitectureWarning from './\_markdown-new-architecture-warning.mdx'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';

<NewArchitectureWarning/>

Expand Down Expand Up @@ -88,6 +88,10 @@ Update your native module or component to ensure it **extends the abstract class

Following the example set forth in the previous section, your library might import `NativeAwesomeManagerSpec`, implement the relevant native interface and the necessary methods for it:

<Tabs groupId="android-language" defaultValue={constants.defaultAndroidLanguage} values={constants.androidLanguages}>

<TabItem value="java">

```java
import androidx.annotation.NonNull;

Expand Down Expand Up @@ -116,4 +120,30 @@ public class NativeAwesomeManager extends NativeAwesomeManagerSpec {
}
```

</TabItem>

<TabItem value="kotlin">

```kotlin
import com.example.samplelibrary.NativeAwesomeManagerSpec
import com.facebook.react.bridge.Promise
import com.facebook.react.bridge.ReactApplicationContext

class NativeAwesomeManager(reactContext: ReactApplicationContext) :
NativeAwesomeManagerSpec(reactContext) {
override fun getString(id: String, promise: Promise) {
// Implement this method
}

override fun getName() = NAME

companion object {
val NAME = "NativeAwesomeManager"
}
}
```

</TabItem>
</Tabs>

Please note that the **generated abstract class** that you’re now extending (`MyAwesomeSpec` in this example), is itself extending `ReactContextBaseJavaModule`. Therefore you should not use access to any of the method/fields you were previously using (e.g. the `ReactApplicationContext` and so on). Moreover the generated class will now also implement the `TurboModule` interface for you.
38 changes: 37 additions & 1 deletion website/showcase.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,42 @@
"infoTitle": "",
"pinned": true
},
{
"name": "Microsoft Office",
"icon": "officemobile.png",
"linkAppStore": "https://apps.apple.com/gb/app/microsoft-office/id541164041",
"linkPlayStore": "https://play.google.com/store/apps/details?id=com.microsoft.office.officehubrow",
"infoLink": "",
"infoTitle": "",
"pinned": true
},
{
"name": "Microsoft Outlook",
"icon": "outlookmobile.png",
"linkAppStore": "https://apps.apple.com/us/app/microsoft-outlook/id951937596",
"linkPlayStore": "https://play.google.com/store/apps/details?id=com.microsoft.office.outlook",
"infoLink": "",
"infoTitle": "",
"pinned": true
},
{
"name": "Microsoft Teams",
"icon": "teamsmobile.png",
"linkAppStore": "https://apps.apple.com/gb/app/microsoft-teams/id1113153706",
"linkPlayStore": "https://play.google.com/store/apps/details?id=com.microsoft.teams",
"infoLink": "",
"infoTitle": "",
"pinned": true
},
{
"name": "Xbox Game Pass",
"icon": "xboxgamepass.png",
"linkAppStore": "https://apps.apple.com/gb/app/xbox-game-pass/id1374542474",
"linkPlayStore": "https://play.google.com/store/apps/details?id=com.gamepass",
"infoLink": "",
"infoTitle": "",
"pinned": true
},
{
"name": "Coinbase",
"icon": "coinbase.png",
Expand Down Expand Up @@ -214,7 +250,7 @@
},
{
"name": "Artsy",
"icon": "https://avatars.githubusercontent.com/u/546231?s=200&v=4",
"icon": "artsy.png",
"linkAppStore": "https://itunes.apple.com/us/app/artsy-collect-bid-on-fine/id703796080?mt=8",
"infoLink": "https://artsy.github.io/series/react-native-at-artsy/",
"infoTitle": "React Native at Artsy",
Expand Down
Binary file added website/static/img/showcase/officemobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/showcase/outlookmobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/showcase/teamsmobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/showcase/xboxgamepass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5a12b06

Please sign in to comment.