@dashx/react-native 0.1.15 → 0.1.16
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.
- package/android/.gradle/6.9/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/6.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/6.9/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/6.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.9/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/6.9/javaCompile/classAnalysis.bin +0 -0
- package/android/.gradle/6.9/javaCompile/jarAnalysis.bin +0 -0
- package/android/.gradle/6.9/javaCompile/javaCompile.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/build/intermediates/packaged-classes/debug/classes.jar +0 -0
- package/android/build/intermediates/packaged-classes/release/classes.jar +0 -0
- package/android/build/kotlin/compileDebugKotlin/build-history.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/counters.tab +2 -2
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values.s +1 -1
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/last-build.bin +0 -0
- package/android/build/kotlin/compileReleaseKotlin/build-history.bin +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/counters.tab +2 -2
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.values +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.values.s +1 -1
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileReleaseKotlin/last-build.bin +0 -0
- package/android/build/outputs/aar/android-debug.aar +0 -0
- package/android/build/outputs/aar/android-release.aar +0 -0
- package/android/build/reports/lint-results.html +56 -3
- package/android/build/reports/lint-results.xml +16 -0
- package/android/build/tmp/kotlin-classes/debug/com/dashx/rn/sdk/DashXMessagingService$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dashx/rn/sdk/DashXMessagingService.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dashx/rn/sdk/DashXPayload.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/dashx/rn/sdk/DashXMessagingService$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/dashx/rn/sdk/DashXMessagingService.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/dashx/rn/sdk/DashXPayload.class +0 -0
- package/android/src/main/java/com/dashx/rn/sdk/DashXMessagingService.kt +25 -4
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.values.at
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.values.at
CHANGED
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.values.at
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.values.at
CHANGED
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
16
|
|
2
|
+
8
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.keystream.len
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
�D�G�<�6
|
|
1
|
+
�D�G�<�6�6
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileReleaseKotlin/caches-jvm/inputs/source-to-output.tab.values.at
CHANGED
|
Binary file
|
package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-attributes.tab
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/subtypes.tab.values.at
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/supertypes.tab.values.at
CHANGED
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
16
|
|
2
|
+
8
|
|
Binary file
|
package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/file-to-id.tab.values.at
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab.keystream
CHANGED
|
Binary file
|
package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab.values.at
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.keystream.len
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
�D�G�<�6
|
|
1
|
+
�D�G�<�6�6
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -173,16 +173,17 @@ document.getElementById(id).style.display = 'none';
|
|
|
173
173
|
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
|
|
174
174
|
<header class="mdl-layout__header">
|
|
175
175
|
<div class="mdl-layout__header-row">
|
|
176
|
-
<span class="mdl-layout-title">Lint Report: 1 error</span>
|
|
176
|
+
<span class="mdl-layout-title">Lint Report: 1 error and 1 warning</span>
|
|
177
177
|
<div class="mdl-layout-spacer"></div>
|
|
178
178
|
<nav class="mdl-navigation mdl-layout--large-screen-only">
|
|
179
|
-
Check performed at Wed Apr 27
|
|
179
|
+
Check performed at Wed Apr 27 13:25:52 IST 2022 </nav>
|
|
180
180
|
</div>
|
|
181
181
|
</header>
|
|
182
182
|
<div class="mdl-layout__drawer">
|
|
183
183
|
<span class="mdl-layout-title">Issue Types</span>
|
|
184
184
|
<nav class="mdl-navigation">
|
|
185
185
|
<a class="mdl-navigation__link" href="#overview"><i class="material-icons">dashboard</i>Overview</a>
|
|
186
|
+
<a class="mdl-navigation__link" href="#InlinedApi"><i class="material-icons warning-icon">warning</i>Using inlined constants on older versions (1)</a>
|
|
186
187
|
<a class="mdl-navigation__link" href="#NewApi"><i class="material-icons error-icon">error</i>Calling new methods on older versions (1)</a>
|
|
187
188
|
</nav>
|
|
188
189
|
</div>
|
|
@@ -199,6 +200,9 @@ Check performed at Wed Apr 27 10:59:29 IST 2022 </nav>
|
|
|
199
200
|
<tr><td class="countColumn"></td><td class="categoryColumn"><a href="#Correctness">Correctness</a>
|
|
200
201
|
</td></tr>
|
|
201
202
|
<tr>
|
|
203
|
+
<td class="countColumn">1</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
|
|
204
|
+
<a href="#InlinedApi">InlinedApi</a>: Using inlined constants on older versions</td></tr>
|
|
205
|
+
<tr>
|
|
202
206
|
<td class="countColumn">1</td><td class="issueColumn"><i class="material-icons error-icon">error</i>
|
|
203
207
|
<a href="#NewApi">NewApi</a>: Calling new methods on older versions</td></tr>
|
|
204
208
|
<tr><td></td><td class="categoryColumn"><a href="#MissingIssues">Disabled Checks (32)</a>
|
|
@@ -210,7 +214,56 @@ Dismiss</button> </div>
|
|
|
210
214
|
</div>
|
|
211
215
|
</section>
|
|
212
216
|
<a name="Correctness"></a>
|
|
213
|
-
<a name="
|
|
217
|
+
<a name="InlinedApi"></a>
|
|
218
|
+
<section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="InlinedApiCard" style="display: block;">
|
|
219
|
+
<div class="mdl-card mdl-cell mdl-cell--12-col">
|
|
220
|
+
<div class="mdl-card__title">
|
|
221
|
+
<h2 class="mdl-card__title-text">Using inlined constants on older versions</h2>
|
|
222
|
+
</div>
|
|
223
|
+
<div class="mdl-card__supporting-text">
|
|
224
|
+
<div class="issue">
|
|
225
|
+
<div class="warningslist">
|
|
226
|
+
<span class="location"><a href="../../src/main/java/com/dashx/rn/sdk/DashXMessagingService.kt">../../src/main/java/com/dashx/rn/sdk/DashXMessagingService.kt</a>:99</span>: <span class="message">Field requires API level 23 (current min is 16): <code>android.app.PendingIntent#FLAG_IMMUTABLE</code></span><br /><pre class="errorlines">
|
|
227
|
+
<span class="lineno"> 96 </span>
|
|
228
|
+
<span class="lineno"> 97 </span> private <span class="keyword">fun</span> getNewPendingIntent(): PendingIntent {
|
|
229
|
+
<span class="lineno"> 98 </span> <span class="keyword">val</span> context = getApplicationContext()
|
|
230
|
+
<span class="caretline"><span class="lineno"> 99 </span> <span class="keyword">val</span> pendingIntentFlags = PendingIntent.FLAG_UPDATE_CURRENT or <span class="warning">PendingIntent.FLAG_IMMUTABLE</span> </span>
|
|
231
|
+
<span class="lineno"> 100 </span>
|
|
232
|
+
<span class="lineno"> 101 </span> <span class="keyword">val</span> intent = getNewBaseIntent()
|
|
233
|
+
</pre>
|
|
234
|
+
|
|
235
|
+
</div>
|
|
236
|
+
<div class="metadata"><div class="explanation" id="explanationInlinedApi" style="display: none;">
|
|
237
|
+
This check scans through all the Android API field references in the application and flags certain constants, such as static final integers and Strings, which were introduced in later versions. These will actually be copied into the class files rather than being referenced, which means that the value is available even when running on older devices. In some cases that's fine, and in other cases it can result in a runtime crash or incorrect behavior. It depends on the context, so consider the code carefully and decide whether it's safe and can be suppressed or whether the code needs to be guarded.<br/>
|
|
238
|
+
<br/>
|
|
239
|
+
If you really want to use this API and don't need to support older devices just set the <code>minSdkVersion</code> in your <code>build.gradle</code> or <code>AndroidManifest.xml</code> files.<br/>
|
|
240
|
+
<br/>
|
|
241
|
+
If your code is <b>deliberately</b> accessing newer APIs, and you have ensured (e.g. with conditional execution) that this code will only ever be called on a supported platform, then you can annotate your class or method with the <code>@TargetApi</code> annotation specifying the local minimum SDK to apply, such as <code>@TargetApi(11)</code>, such that this check considers 11 rather than your manifest file's minimum SDK as the required API level.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
|
|
242
|
+
To suppress this error, use the issue id "InlinedApi" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
|
|
243
|
+
<br/></div>
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
<div class="chips">
|
|
247
|
+
<span class="mdl-chip">
|
|
248
|
+
<span class="mdl-chip__text">InlinedApi</span>
|
|
249
|
+
</span>
|
|
250
|
+
<span class="mdl-chip">
|
|
251
|
+
<span class="mdl-chip__text">Correctness</span>
|
|
252
|
+
</span>
|
|
253
|
+
<span class="mdl-chip">
|
|
254
|
+
<span class="mdl-chip__text">Warning</span>
|
|
255
|
+
</span>
|
|
256
|
+
<span class="mdl-chip">
|
|
257
|
+
<span class="mdl-chip__text">Priority 6/10</span>
|
|
258
|
+
</span>
|
|
259
|
+
</div>
|
|
260
|
+
</div>
|
|
261
|
+
<div class="mdl-card__actions mdl-card--border">
|
|
262
|
+
<button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationInlinedApiLink" onclick="reveal('explanationInlinedApi');">
|
|
263
|
+
Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="InlinedApiCardLink" onclick="hideid('InlinedApiCard');">
|
|
264
|
+
Dismiss</button> </div>
|
|
265
|
+
</div>
|
|
266
|
+
</section><a name="NewApi"></a>
|
|
214
267
|
<section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="NewApiCard" style="display: block;">
|
|
215
268
|
<div class="mdl-card mdl-cell mdl-cell--12-col">
|
|
216
269
|
<div class="mdl-card__title">
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<issues format="5" by="lint 3.4.1">
|
|
3
3
|
|
|
4
|
+
<issue
|
|
5
|
+
id="InlinedApi"
|
|
6
|
+
severity="Warning"
|
|
7
|
+
message="Field requires API level 23 (current min is 16): `android.app.PendingIntent#FLAG_IMMUTABLE`"
|
|
8
|
+
category="Correctness"
|
|
9
|
+
priority="6"
|
|
10
|
+
summary="Using inlined constants on older versions"
|
|
11
|
+
explanation="This check scans through all the Android API field references in the application and flags certain constants, such as static final integers and Strings, which were introduced in later versions. These will actually be copied into the class files rather than being referenced, which means that the value is available even when running on older devices. In some cases that's fine, and in other cases it can result in a runtime crash or incorrect behavior. It depends on the context, so consider the code carefully and decide whether it's safe and can be suppressed or whether the code needs to be guarded.

If you really want to use this API and don't need to support older devices just set the `minSdkVersion` in your `build.gradle` or `AndroidManifest.xml` files.

If your code is **deliberately** accessing newer APIs, and you have ensured (e.g. with conditional execution) that this code will only ever be called on a supported platform, then you can annotate your class or method with the `@TargetApi` annotation specifying the local minimum SDK to apply, such as `@TargetApi(11)`, such that this check considers 11 rather than your manifest file's minimum SDK as the required API level."
|
|
12
|
+
errorLine1=" val pendingIntentFlags = PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE"
|
|
13
|
+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
|
14
|
+
<location
|
|
15
|
+
file="/home/dgulshan/Projects/dashx-js/packages/react-native/android/src/main/java/com/dashx/rn/sdk/DashXMessagingService.kt"
|
|
16
|
+
line="99"
|
|
17
|
+
column="71"/>
|
|
18
|
+
</issue>
|
|
19
|
+
|
|
4
20
|
<issue
|
|
5
21
|
id="NewApi"
|
|
6
22
|
severity="Error"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/tmp/kotlin-classes/release/com/dashx/rn/sdk/DashXMessagingService.class
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -5,7 +5,6 @@ import android.app.Notification
|
|
|
5
5
|
import android.app.NotificationChannel
|
|
6
6
|
import android.app.NotificationManager
|
|
7
7
|
import android.app.PendingIntent
|
|
8
|
-
import android.app.PendingIntent.FLAG_UPDATE_CURRENT
|
|
9
8
|
import android.content.Context
|
|
10
9
|
import android.content.Intent
|
|
11
10
|
import android.content.pm.PackageManager
|
|
@@ -82,9 +81,7 @@ class DashXMessagingService : FirebaseMessagingService() {
|
|
|
82
81
|
title: String?,
|
|
83
82
|
body: String?
|
|
84
83
|
) : Notification {
|
|
85
|
-
val
|
|
86
|
-
|
|
87
|
-
val pendingIntent = PendingIntent.getActivity(this, 1, intent, FLAG_UPDATE_CURRENT)
|
|
84
|
+
val pendingIntent = getNewPendingIntent()
|
|
88
85
|
|
|
89
86
|
val notificationBuilder = NotificationCompat.Builder(this, CHANNEL_ID)
|
|
90
87
|
.setSmallIcon(getSmallIcon())
|
|
@@ -97,6 +94,30 @@ class DashXMessagingService : FirebaseMessagingService() {
|
|
|
97
94
|
return notificationBuilder.build()
|
|
98
95
|
}
|
|
99
96
|
|
|
97
|
+
private fun getNewPendingIntent(): PendingIntent {
|
|
98
|
+
val context = getApplicationContext()
|
|
99
|
+
val pendingIntentFlags = PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
|
|
100
|
+
|
|
101
|
+
val intent = getNewBaseIntent()
|
|
102
|
+
|
|
103
|
+
val launchIntent = context.packageManager.getLaunchIntentForPackage(context.packageName)
|
|
104
|
+
|
|
105
|
+
if (launchIntent == null) {
|
|
106
|
+
return PendingIntent.getActivity(context, 1, intent, pendingIntentFlags)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Mimic launcher behaviour
|
|
110
|
+
launchIntent.setPackage(null)
|
|
111
|
+
launchIntent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
|
|
112
|
+
|
|
113
|
+
return PendingIntent.getActivities(
|
|
114
|
+
context,
|
|
115
|
+
1,
|
|
116
|
+
arrayOf(launchIntent, intent),
|
|
117
|
+
pendingIntentFlags
|
|
118
|
+
)
|
|
119
|
+
}
|
|
120
|
+
|
|
100
121
|
private fun getNewBaseIntent(): Intent {
|
|
101
122
|
return Intent(
|
|
102
123
|
this,
|