@moustafahelmi/react-native-quran-app 1.4.1 → 1.5.0

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.
Files changed (72) hide show
  1. package/package.json +14 -6
  2. package/.bundle/config +0 -2
  3. package/.eslintrc.js +0 -4
  4. package/.prettierrc.js +0 -7
  5. package/.watchmanconfig +0 -1
  6. package/App.tsx +0 -23
  7. package/Gemfile +0 -9
  8. package/Gemfile.lock +0 -105
  9. package/MIGRATION.md +0 -163
  10. package/ReactotronConfig.js +0 -7
  11. package/__tests__/App.test.tsx +0 -17
  12. package/android/app/build.gradle +0 -118
  13. package/android/app/debug.keystore +0 -0
  14. package/android/app/proguard-rules.pro +0 -10
  15. package/android/app/src/debug/AndroidManifest.xml +0 -9
  16. package/android/app/src/main/AndroidManifest.xml +0 -25
  17. package/android/app/src/main/assets/fonts/Cairo.ttf +0 -0
  18. package/android/app/src/main/assets/fonts/QCF_BSML.ttf +0 -0
  19. package/android/app/src/main/assets/fonts/QCF_P001.ttf +0 -0
  20. package/android/app/src/main/java/com/quranapp/MainActivity.kt +0 -22
  21. package/android/app/src/main/java/com/quranapp/MainApplication.kt +0 -43
  22. package/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -37
  23. package/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  24. package/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  25. package/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  26. package/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  27. package/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  28. package/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  29. package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  30. package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  31. package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  32. package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  33. package/android/app/src/main/res/values/strings.xml +0 -3
  34. package/android/app/src/main/res/values/styles.xml +0 -9
  35. package/android/build.gradle +0 -21
  36. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  37. package/android/gradle/wrapper/gradle-wrapper.properties +0 -7
  38. package/android/gradle.properties +0 -41
  39. package/android/gradlew +0 -249
  40. package/android/gradlew.bat +0 -92
  41. package/android/link-assets-manifest.json +0 -17
  42. package/android/settings.gradle +0 -4
  43. package/app.json +0 -4
  44. package/babel.config.js +0 -3
  45. package/index.js +0 -11
  46. package/ios/.xcode.env +0 -11
  47. package/ios/Podfile +0 -40
  48. package/ios/Podfile.lock +0 -1460
  49. package/ios/QuranApp/AppDelegate.h +0 -6
  50. package/ios/QuranApp/AppDelegate.mm +0 -31
  51. package/ios/QuranApp/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  52. package/ios/QuranApp/Images.xcassets/Contents.json +0 -6
  53. package/ios/QuranApp/Info.plist +0 -57
  54. package/ios/QuranApp/LaunchScreen.storyboard +0 -47
  55. package/ios/QuranApp/PrivacyInfo.xcprivacy +0 -38
  56. package/ios/QuranApp/main.m +0 -10
  57. package/ios/QuranApp.xcodeproj/project.pbxproj +0 -729
  58. package/ios/QuranApp.xcodeproj/xcshareddata/xcschemes/QuranApp.xcscheme +0 -88
  59. package/ios/QuranApp.xcworkspace/contents.xcworkspacedata +0 -10
  60. package/ios/QuranAppTests/Info.plist +0 -24
  61. package/ios/QuranAppTests/QuranAppTests.m +0 -66
  62. package/ios/link-assets-manifest.json +0 -17
  63. package/jest.config.js +0 -3
  64. package/metro.config.js +0 -11
  65. package/react-native.config.js +0 -7
  66. package/screenshots/1.png +0 -0
  67. package/screenshots/2.png +0 -0
  68. package/screenshots/3.png +0 -0
  69. package/screenshots/4.png +0 -0
  70. package/screenshots/5.png +0 -0
  71. package/tsconfig.json +0 -3
  72. package/videos/1.gif +0 -0
package/package.json CHANGED
@@ -1,14 +1,18 @@
1
1
  {
2
2
  "name": "@moustafahelmi/react-native-quran-app",
3
- "version": "1.4.1",
4
- "description": "React Native Quran application with Hafs recitation",
3
+ "version": "1.5.0",
4
+ "description": "React Native library for displaying Quran with Hafs recitation, audio playback, and customizable components",
5
5
  "main": "src/index.ts",
6
- "keywords": ["react-native", "quran", "hafs", "islamic", "mobile"],
6
+ "types": "src/index.ts",
7
+ "files": [
8
+ "src/"
9
+ ],
10
+ "keywords": ["react-native", "quran", "hafs", "islamic", "mobile", "library", "components"],
7
11
  "author": "Moustafa Helmi",
8
12
  "license": "MIT",
9
13
  "repository": {
10
14
  "type": "git",
11
- "url": "https://github.com/moustafahelmi/react-native-quran-app"
15
+ "url": "https://github.com/moustafahelmi96/react-native-quran"
12
16
  },
13
17
  "scripts": {
14
18
  "android": "react-native run-android",
@@ -22,14 +26,16 @@
22
26
  "@react-native-clipboard/clipboard": "^1.14.1",
23
27
  "@react-native-community/slider": "^4.5.2",
24
28
  "axios": "^1.6.8",
25
- "react": "18.2.0",
26
- "react-native": "0.74.0",
27
29
  "react-native-dynamic-fonts": "^0.3.2",
28
30
  "react-native-fs": "^2.20.0",
29
31
  "react-native-quran-hafs": "^1.0.3",
30
32
  "react-native-responsive-fontsize": "^0.5.1",
31
33
  "react-native-track-player": "^4.1.1"
32
34
  },
35
+ "peerDependencies": {
36
+ "react": ">=18.0.0",
37
+ "react-native": ">=0.70.0"
38
+ },
33
39
  "devDependencies": {
34
40
  "@babel/core": "^7.20.0",
35
41
  "@babel/preset-env": "^7.20.0",
@@ -44,6 +50,8 @@
44
50
  "eslint": "^8.19.0",
45
51
  "jest": "^29.6.3",
46
52
  "prettier": "2.8.8",
53
+ "react": "18.2.0",
54
+ "react-native": "0.74.0",
47
55
  "react-test-renderer": "18.2.0",
48
56
  "reactotron-react-native": "^5.1.6",
49
57
  "typescript": "5.0.4"
package/.bundle/config DELETED
@@ -1,2 +0,0 @@
1
- BUNDLE_PATH: "vendor/bundle"
2
- BUNDLE_FORCE_RUBY_PLATFORM: 1
package/.eslintrc.js DELETED
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: '@react-native',
4
- };
package/.prettierrc.js DELETED
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- arrowParens: 'avoid',
3
- bracketSameLine: true,
4
- bracketSpacing: false,
5
- singleQuote: true,
6
- trailingComma: 'all',
7
- };
package/.watchmanconfig DELETED
@@ -1 +0,0 @@
1
- {}
package/App.tsx DELETED
@@ -1,23 +0,0 @@
1
- import {I18nManager} from 'react-native';
2
- import {QuranPageLayout, QuranTypesEnums} from './src';
3
- import {IMAGES} from './src/common';
4
- const App = () => {
5
- I18nManager.allowRTL(false);
6
- I18nManager.forceRTL(false);
7
-
8
- return (
9
- <QuranPageLayout
10
- chapterId={2}
11
- type={QuranTypesEnums.chapter}
12
- QURAN_FONTS_API="https://meccamuqra-public-mixed.b-cdn.net/meccamuqra/fonts/"
13
- backgroundImage={IMAGES.mushafFrame}
14
- surahNameFrameImage={IMAGES.surahNameFrame}
15
- autoCompleteAudioAfterPlayingVerse
16
- onBookMarkedVerse={verse => {
17
- console.log(verse);
18
- }}
19
- />
20
- );
21
- };
22
-
23
- export default App;
package/Gemfile DELETED
@@ -1,9 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4
- ruby ">= 2.6.10"
5
-
6
- # Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7
- # bound in the template on Cocoapods with next React Native release.
8
- gem 'cocoapods', '>= 1.13', '< 1.15'
9
- gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
package/Gemfile.lock DELETED
@@ -1,105 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- CFPropertyList (3.0.7)
5
- base64
6
- nkf
7
- rexml
8
- activesupport (6.1.7.7)
9
- concurrent-ruby (~> 1.0, >= 1.0.2)
10
- i18n (>= 1.6, < 2)
11
- minitest (>= 5.1)
12
- tzinfo (~> 2.0)
13
- zeitwerk (~> 2.3)
14
- addressable (2.8.6)
15
- public_suffix (>= 2.0.2, < 6.0)
16
- algoliasearch (1.27.5)
17
- httpclient (~> 2.8, >= 2.8.3)
18
- json (>= 1.5.1)
19
- atomos (0.1.3)
20
- base64 (0.2.0)
21
- claide (1.1.0)
22
- cocoapods (1.14.3)
23
- addressable (~> 2.8)
24
- claide (>= 1.0.2, < 2.0)
25
- cocoapods-core (= 1.14.3)
26
- cocoapods-deintegrate (>= 1.0.3, < 2.0)
27
- cocoapods-downloader (>= 2.1, < 3.0)
28
- cocoapods-plugins (>= 1.0.0, < 2.0)
29
- cocoapods-search (>= 1.0.0, < 2.0)
30
- cocoapods-trunk (>= 1.6.0, < 2.0)
31
- cocoapods-try (>= 1.1.0, < 2.0)
32
- colored2 (~> 3.1)
33
- escape (~> 0.0.4)
34
- fourflusher (>= 2.3.0, < 3.0)
35
- gh_inspector (~> 1.0)
36
- molinillo (~> 0.8.0)
37
- nap (~> 1.0)
38
- ruby-macho (>= 2.3.0, < 3.0)
39
- xcodeproj (>= 1.23.0, < 2.0)
40
- cocoapods-core (1.14.3)
41
- activesupport (>= 5.0, < 8)
42
- addressable (~> 2.8)
43
- algoliasearch (~> 1.0)
44
- concurrent-ruby (~> 1.1)
45
- fuzzy_match (~> 2.0.4)
46
- nap (~> 1.0)
47
- netrc (~> 0.11)
48
- public_suffix (~> 4.0)
49
- typhoeus (~> 1.0)
50
- cocoapods-deintegrate (1.0.5)
51
- cocoapods-downloader (2.1)
52
- cocoapods-plugins (1.0.0)
53
- nap
54
- cocoapods-search (1.0.1)
55
- cocoapods-trunk (1.6.0)
56
- nap (>= 0.8, < 2.0)
57
- netrc (~> 0.11)
58
- cocoapods-try (1.2.0)
59
- colored2 (3.1.2)
60
- concurrent-ruby (1.2.3)
61
- escape (0.0.4)
62
- ethon (0.16.0)
63
- ffi (>= 1.15.0)
64
- ffi (1.16.3)
65
- fourflusher (2.3.1)
66
- fuzzy_match (2.0.4)
67
- gh_inspector (1.1.3)
68
- httpclient (2.8.3)
69
- i18n (1.14.4)
70
- concurrent-ruby (~> 1.0)
71
- json (2.7.2)
72
- minitest (5.22.3)
73
- molinillo (0.8.0)
74
- nanaimo (0.3.0)
75
- nap (1.1.0)
76
- netrc (0.11.0)
77
- nkf (0.2.0)
78
- public_suffix (4.0.7)
79
- rexml (3.2.6)
80
- ruby-macho (2.5.1)
81
- typhoeus (1.4.1)
82
- ethon (>= 0.9.0)
83
- tzinfo (2.0.6)
84
- concurrent-ruby (~> 1.0)
85
- xcodeproj (1.24.0)
86
- CFPropertyList (>= 2.3.3, < 4.0)
87
- atomos (~> 0.1.3)
88
- claide (>= 1.0.2, < 2.0)
89
- colored2 (~> 3.1)
90
- nanaimo (~> 0.3.0)
91
- rexml (~> 3.2.4)
92
- zeitwerk (2.6.13)
93
-
94
- PLATFORMS
95
- ruby
96
-
97
- DEPENDENCIES
98
- activesupport (>= 6.1.7.5, < 7.1.0)
99
- cocoapods (>= 1.13, < 1.15)
100
-
101
- RUBY VERSION
102
- ruby 2.6.10p210
103
-
104
- BUNDLED WITH
105
- 1.17.2
package/MIGRATION.md DELETED
@@ -1,163 +0,0 @@
1
- # Migration Guide
2
-
3
- ## Upgrading to v1.4.0
4
-
5
- Version 1.4.0 adds powerful font preloading capabilities while maintaining full backward compatibility.
6
-
7
- ### Breaking Changes
8
-
9
- **None!** All existing code continues to work without modifications.
10
-
11
- ### New Features
12
-
13
- #### 1. Background Font Preloading
14
-
15
- ```typescript
16
- import { useQuranFontPreloader, PRIORITY_PAGES } from 'react-native-quran-hafs';
17
-
18
- // Add to your Surah list screen
19
- const { isPreloading, progress } = useQuranFontPreloader({
20
- pages: PRIORITY_PAGES,
21
- quranFontApi: YOUR_FONT_API,
22
- autoStart: true,
23
- });
24
- ```
25
-
26
- #### 2. Batch Font Downloads
27
-
28
- ```typescript
29
- import { downloadMultiplePageFonts } from 'react-native-quran-hafs';
30
-
31
- // Download multiple pages at once
32
- await downloadMultiplePageFonts([1, 2, 3, 4, 5], FONT_API);
33
- ```
34
-
35
- #### 3. Cache Management
36
-
37
- ```typescript
38
- import {
39
- getFontCacheStats,
40
- clearFontCache,
41
- isFontCached
42
- } from 'react-native-quran-hafs';
43
-
44
- // Check what's cached
45
- const stats = await getFontCacheStats();
46
-
47
- // Clear cache if needed
48
- await clearFontCache();
49
- ```
50
-
51
- ### Recommended Upgrade Path
52
-
53
- 1. **Install v1.4.0**
54
- ```bash
55
- npm install react-native-quran-hafs@1.4.0
56
- # or
57
- yarn add react-native-quran-hafs@1.4.0
58
- ```
59
-
60
- 2. **Test Existing Functionality**
61
- Ensure your current implementation still works.
62
-
63
- 3. **Add Preloading** (Optional but Recommended)
64
- Add the `useQuranFontPreloader` hook to your Surah list screen.
65
-
66
- 4. **Monitor Performance**
67
- Check console logs for preload progress and cache hits.
68
-
69
- ### Performance Tips
70
-
71
- - Start with `PRIORITY_PAGES` (53 pages) - covers 80% of use cases
72
- - Preload on WiFi-only if concerned about data usage
73
- - Cache persists between app launches
74
- - Consider adding a "Download Quran" button in settings for `ALL_QURAN_PAGES`
75
-
76
- ### Performance Improvements
77
-
78
- #### Before v1.4.0
79
- - **First Load**: 15-30 seconds (downloads fonts on-demand)
80
- - **Subsequent Loads**: 15-30 seconds for different pages
81
- - **User Experience**: Long waits with loading spinners
82
-
83
- #### After v1.4.0 (With Preloading)
84
- - **Background Preload**: 30-60 seconds (silent, one-time)
85
- - **First Load**: < 1 second (fonts already cached)
86
- - **Subsequent Loads**: < 1 second (fonts already cached)
87
- - **User Experience**: Instant loading
88
-
89
- ### Network Usage
90
- - **Priority Pages**: ~10MB one-time download
91
- - **All Pages**: ~150MB one-time download
92
- - **Subsequent Opens**: 0KB (cached)
93
-
94
- ### Example Implementation
95
-
96
- Here's a complete example of integrating font preloading into your app:
97
-
98
- ```typescript
99
- import React from 'react';
100
- import { View, Text, FlatList, TouchableOpacity } from 'react-native';
101
- import {
102
- useQuranFontPreloader,
103
- PRIORITY_PAGES,
104
- QuranChapters
105
- } from 'react-native-quran-hafs';
106
-
107
- function SurahListScreen({ navigation }) {
108
- const { isPreloading, progress, isCompleted } = useQuranFontPreloader({
109
- pages: PRIORITY_PAGES,
110
- quranFontApi: 'https://raw.githubusercontent.com/quran/quran.com-images/master/fonts/',
111
- autoStart: true,
112
- });
113
-
114
- return (
115
- <View>
116
- {isPreloading && (
117
- <View style={{ padding: 10, backgroundColor: '#f0f0f0' }}>
118
- <Text>📥 Preparing Quran pages: {progress.percentage}%</Text>
119
- <Text style={{ fontSize: 12, color: '#666' }}>
120
- {progress.current} of {progress.total} pages ready
121
- </Text>
122
- </View>
123
- )}
124
-
125
- <FlatList
126
- data={QuranChapters}
127
- renderItem={({ item }) => (
128
- <TouchableOpacity
129
- onPress={() => navigation.navigate('Quran', { chapterId: item.id })}
130
- >
131
- <Text>{item.name_arabic}</Text>
132
- </TouchableOpacity>
133
- )}
134
- />
135
- </View>
136
- );
137
- }
138
- ```
139
-
140
- ### Support
141
-
142
- If you encounter issues during migration:
143
-
144
- 1. **Check Console Logs**: Look for font download messages with 📥, ✅, and ❌ emojis
145
- 2. **Verify Exports**: Ensure new functions are imported correctly
146
- 3. **Clear Cache**: Try clearing Metro cache: `npx react-native start --reset-cache`
147
- 4. **Check Network**: Ensure device/emulator has internet access for downloads
148
-
149
- For bugs or questions, please open an issue on GitHub: https://github.com/mohamedshawky982/react-native-quran-hafs/issues
150
-
151
- ---
152
-
153
- ## Summary
154
-
155
- Version 1.4.0 brings significant performance improvements through intelligent font preloading:
156
-
157
- ✅ **Backward Compatible**: All existing code works without changes
158
- ✅ **Easy to Adopt**: Single hook for complete preloading functionality
159
- ✅ **Performance Boost**: 15-30s → <1s load times
160
- ✅ **Flexible**: Works with custom page lists and configurations
161
- ✅ **Smart Caching**: Persistent cache across app launches
162
-
163
- **Recommended Action**: Add `useQuranFontPreloader` with `PRIORITY_PAGES` to your main Quran list screen for instant improvements!
@@ -1,7 +0,0 @@
1
- import Reactotron from 'reactotron-react-native';
2
- import AsyncStorage from '@react-native-async-storage/async-storage';
3
-
4
- Reactotron.setAsyncStorageHandler(AsyncStorage)
5
- .configure() // controls connection & communication settings
6
- .useReactNative() // add all built-in react native plugins
7
- .connect(); // let's connect!
@@ -1,17 +0,0 @@
1
- /**
2
- * @format
3
- */
4
-
5
- import 'react-native';
6
- import React from 'react';
7
- import App from '../App';
8
-
9
- // Note: import explicitly to use the types shipped with jest.
10
- import {it} from '@jest/globals';
11
-
12
- // Note: test renderer must be required after react-native.
13
- import renderer from 'react-test-renderer';
14
-
15
- it('renders correctly', () => {
16
- renderer.create(<App />);
17
- });
@@ -1,118 +0,0 @@
1
- apply plugin: "com.android.application"
2
- apply plugin: "org.jetbrains.kotlin.android"
3
- apply plugin: "com.facebook.react"
4
-
5
- /**
6
- * This is the configuration block to customize your React Native Android app.
7
- * By default you don't need to apply any configuration, just uncomment the lines you need.
8
- */
9
- react {
10
- /* Folders */
11
- // The root of your project, i.e. where "package.json" lives. Default is '..'
12
- // root = file("../")
13
- // The folder where the react-native NPM package is. Default is ../node_modules/react-native
14
- // reactNativeDir = file("../node_modules/react-native")
15
- // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
16
- // codegenDir = file("../node_modules/@react-native/codegen")
17
- // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
18
- // cliFile = file("../node_modules/react-native/cli.js")
19
-
20
- /* Variants */
21
- // The list of variants to that are debuggable. For those we're going to
22
- // skip the bundling of the JS bundle and the assets. By default is just 'debug'.
23
- // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
24
- // debuggableVariants = ["liteDebug", "prodDebug"]
25
-
26
- /* Bundling */
27
- // A list containing the node command and its flags. Default is just 'node'.
28
- // nodeExecutableAndArgs = ["node"]
29
- //
30
- // The command to run when bundling. By default is 'bundle'
31
- // bundleCommand = "ram-bundle"
32
- //
33
- // The path to the CLI configuration file. Default is empty.
34
- // bundleConfig = file(../rn-cli.config.js)
35
- //
36
- // The name of the generated asset file containing your JS bundle
37
- // bundleAssetName = "MyApplication.android.bundle"
38
- //
39
- // The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
40
- // entryFile = file("../js/MyApplication.android.js")
41
- //
42
- // A list of extra flags to pass to the 'bundle' commands.
43
- // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
44
- // extraPackagerArgs = []
45
-
46
- /* Hermes Commands */
47
- // The hermes compiler command to run. By default it is 'hermesc'
48
- // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
49
- //
50
- // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
51
- // hermesFlags = ["-O", "-output-source-map"]
52
- }
53
-
54
- /**
55
- * Set this to true to Run Proguard on Release builds to minify the Java bytecode.
56
- */
57
- def enableProguardInReleaseBuilds = false
58
-
59
- /**
60
- * The preferred build flavor of JavaScriptCore (JSC)
61
- *
62
- * For example, to use the international variant, you can use:
63
- * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
64
- *
65
- * The international variant includes ICU i18n library and necessary data
66
- * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
67
- * give correct results when using with locales other than en-US. Note that
68
- * this variant is about 6MiB larger per architecture than default.
69
- */
70
- def jscFlavor = 'org.webkit:android-jsc:+'
71
-
72
- android {
73
- ndkVersion rootProject.ext.ndkVersion
74
- buildToolsVersion rootProject.ext.buildToolsVersion
75
- compileSdk rootProject.ext.compileSdkVersion
76
-
77
- namespace "com.quranapp"
78
- defaultConfig {
79
- applicationId "com.quranapp"
80
- minSdkVersion rootProject.ext.minSdkVersion
81
- targetSdkVersion rootProject.ext.targetSdkVersion
82
- versionCode 1
83
- versionName "1.0"
84
- }
85
- signingConfigs {
86
- debug {
87
- storeFile file('debug.keystore')
88
- storePassword 'android'
89
- keyAlias 'androiddebugkey'
90
- keyPassword 'android'
91
- }
92
- }
93
- buildTypes {
94
- debug {
95
- signingConfig signingConfigs.debug
96
- }
97
- release {
98
- // Caution! In production, you need to generate your own keystore file.
99
- // see https://reactnative.dev/docs/signed-apk-android.
100
- signingConfig signingConfigs.debug
101
- minifyEnabled enableProguardInReleaseBuilds
102
- proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
103
- }
104
- }
105
- }
106
-
107
- dependencies {
108
- // The version of react-native is set by the React Native Gradle Plugin
109
- implementation("com.facebook.react:react-android")
110
-
111
- if (hermesEnabled.toBoolean()) {
112
- implementation("com.facebook.react:hermes-android")
113
- } else {
114
- implementation jscFlavor
115
- }
116
- }
117
-
118
- apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
Binary file
@@ -1,10 +0,0 @@
1
- # Add project specific ProGuard rules here.
2
- # By default, the flags in this file are appended to flags specified
3
- # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4
- # You can edit the include path and order by changing the proguardFiles
5
- # directive in build.gradle.
6
- #
7
- # For more details, see
8
- # http://developer.android.com/guide/developing/tools/proguard.html
9
-
10
- # Add any project specific keep options here:
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
- xmlns:tools="http://schemas.android.com/tools">
4
-
5
- <application
6
- android:usesCleartextTraffic="true"
7
- tools:targetApi="28"
8
- tools:ignore="GoogleAppIndexingWarning"/>
9
- </manifest>
@@ -1,25 +0,0 @@
1
- <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
-
3
- <uses-permission android:name="android.permission.INTERNET" />
4
-
5
- <application
6
- android:name=".MainApplication"
7
- android:label="@string/app_name"
8
- android:icon="@mipmap/ic_launcher"
9
- android:roundIcon="@mipmap/ic_launcher_round"
10
- android:allowBackup="false"
11
- android:theme="@style/AppTheme">
12
- <activity
13
- android:name=".MainActivity"
14
- android:label="@string/app_name"
15
- android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
16
- android:launchMode="singleTask"
17
- android:windowSoftInputMode="adjustResize"
18
- android:exported="true">
19
- <intent-filter>
20
- <action android:name="android.intent.action.MAIN" />
21
- <category android:name="android.intent.category.LAUNCHER" />
22
- </intent-filter>
23
- </activity>
24
- </application>
25
- </manifest>
@@ -1,22 +0,0 @@
1
- package com.quranapp
2
-
3
- import com.facebook.react.ReactActivity
4
- import com.facebook.react.ReactActivityDelegate
5
- import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
6
- import com.facebook.react.defaults.DefaultReactActivityDelegate
7
-
8
- class MainActivity : ReactActivity() {
9
-
10
- /**
11
- * Returns the name of the main component registered from JavaScript. This is used to schedule
12
- * rendering of the component.
13
- */
14
- override fun getMainComponentName(): String = "QuranApp"
15
-
16
- /**
17
- * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
18
- * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
19
- */
20
- override fun createReactActivityDelegate(): ReactActivityDelegate =
21
- DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
22
- }
@@ -1,43 +0,0 @@
1
- package com.quranapp
2
-
3
- import android.app.Application
4
- import com.facebook.react.PackageList
5
- import com.facebook.react.ReactApplication
6
- import com.facebook.react.ReactHost
7
- import com.facebook.react.ReactNativeHost
8
- import com.facebook.react.ReactPackage
9
- import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
10
- import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
11
- import com.facebook.react.defaults.DefaultReactNativeHost
12
- import com.facebook.soloader.SoLoader
13
-
14
- class MainApplication : Application(), ReactApplication {
15
-
16
- override val reactNativeHost: ReactNativeHost =
17
- object : DefaultReactNativeHost(this) {
18
- override fun getPackages(): List<ReactPackage> =
19
- PackageList(this).packages.apply {
20
- // Packages that cannot be autolinked yet can be added manually here, for example:
21
- // add(MyReactNativePackage())
22
- }
23
-
24
- override fun getJSMainModuleName(): String = "index"
25
-
26
- override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
27
-
28
- override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
29
- override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
30
- }
31
-
32
- override val reactHost: ReactHost
33
- get() = getDefaultReactHost(applicationContext, reactNativeHost)
34
-
35
- override fun onCreate() {
36
- super.onCreate()
37
- SoLoader.init(this, false)
38
- if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
39
- // If you opted-in for the New Architecture, we load the native entry point for this app.
40
- load()
41
- }
42
- }
43
- }