Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qrvideo support #496

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4d5c4a1
[new]-nfc new activity data fetch
Jul 8, 2021
7f67ee6
[new]-new activity NFC
Jul 9, 2021
9c1bff3
[new]-plugin xml fix
Jul 9, 2021
055f525
[fix]-plugin xml fix
Jul 9, 2021
cd4968c
[fix]-module export nfc
Jul 9, 2021
60a8139
[fix]-add source file nfc
Jul 9, 2021
8b7b789
[fix]-NFC Activity path
Jul 9, 2021
5f49e39
[fix]- callback context
Jul 9, 2021
ab48c6b
[temp][update] hide for ios
chaymankala Jul 12, 2021
42c284f
Update plugin.xml
chaymankala Jul 13, 2021
7c1b773
Update NfcPlugin.java
chaymankala Jul 13, 2021
8ea29ae
Update NfcPlugin.java
chaymankala Jul 13, 2021
4e87b6b
Update plugin.xml
chaymankala Jul 13, 2021
3d5ed84
Update plugin.xml
chaymankala Jul 13, 2021
bccf8d5
[fix] error
chaymankala Aug 31, 2021
809bb85
Update NfcPlugin.java
sowmya-kiot Aug 25, 2022
d87f72f
[new]-npm publish changes
chaymankala Sep 2, 2022
4b6e1f6
[new]-android 12 fixes npm publish
chaymankala Sep 21, 2022
ea97ba2
Create Notification Channel
sowmya-kiot Oct 10, 2023
32c0b2b
Create Notification Channel
sowmya-kiot Oct 10, 2023
84b582c
Update plugin.xml
sowmya-kiot Oct 10, 2023
c6e870f
Update package.json
sowmya-kiot Oct 10, 2023
9b25c0a
Update NfcPlugin.java
sowmya-kiot Oct 11, 2023
117b13b
Update plugin.xml
sowmya-kiot Oct 11, 2023
55b659c
Update package.json
sowmya-kiot Oct 11, 2023
e491537
[init]
chaymankala Nov 15, 2023
0868653
fix
chaymankala Nov 15, 2023
86c4ed9
[fix] incoming call layout
chaymankala Nov 20, 2023
6f44db5
[fix] setInitialPushPayloadCallback
chaymankala Nov 20, 2023
3a895a0
[fix] theme
chaymankala Nov 20, 2023
1414c43
[fix] spelling mistake
chaymankala Nov 20, 2023
065d8b7
[fix] open intent
chaymankala Nov 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "phonegap-nfc",
"version": "1.2.0",
"name": "kiot-phonegap-nfc",
"version": "1.2.3",
"description": "Near Field Communication (NFC) Plugin. Read and write NDEF messages to NFC tags and share NDEF messages with peers.",
"cordova": {
"id": "phonegap-nfc",
Expand Down
37 changes: 28 additions & 9 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<plugin
xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="phonegap-nfc"
version="1.2.0">
id="kiot-phonegap-nfc"
version="1.2.3">

<name>NFC</name>

Expand All @@ -30,12 +30,33 @@
target-dir="src/com/chariotsolutions/nfc/plugin"/>
<source-file src="src/android/src/com/chariotsolutions/nfc/plugin/Util.java"
target-dir="src/com/chariotsolutions/nfc/plugin"/>

<config-file target="AndroidManifest.xml" parent="/manifest">
<source-file src="src/android/src/com/chariotsolutions/nfc/plugin/NfcActivity.java"
target-dir="src/com/chariotsolutions/nfc/plugin"/>
<source-file src="src/android/src/com/chariotsolutions/nfc/plugin/IncomingCallActivity.java"
target-dir="src/com/chariotsolutions/nfc/plugin"/>
<source-file src="src/android/src/com/chariotsolutions/nfc/plugin/QRNotificationHandler.java"
target-dir="src/com/chariotsolutions/nfc/plugin"/>

<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.NFC"/>
<uses-feature android:name="android.hardware.nfc" android:required="false"/>
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest/application">
<activity android:configChanges="orientation|keyboardHidden|screenSize" android:exported="false" android:launchMode="singleTop" android:name="com.chariotsolutions.nfc.plugin.IncomingCallActivity" android:screenOrientation="portrait" android:showOnLockScreen="true" android:theme="@style/Theme.Design.NoActionBar"/>
<meta-data android:name="com.onesignal.NotificationServiceExtension" android:value="com.chariotsolutions.nfc.plugin.QRNotificationHandler"/>
<receiver android:exported="true" android:name="com.chariotsolutions.nfc.plugin.QRNotificationHandler">
<intent-filter>
<action android:name="com.yourpackage.QR_NOTIFICATION_ACTION"/>
</intent-filter>
</receiver>
</config-file>

<framework src="com.google.android.material:material:1.5.0" />

<resource-file src="src/android/res/layout/activity_incomingcall.xml" target="res/layout/activity_incomingcall.xml" />


</platform>

<platform name="wp8">
Expand Down Expand Up @@ -106,7 +127,7 @@
</config-file>
</platform>

<platform name="ios">
<!-- <platform name="ios">
<js-module src="www/phonegap-nfc.js" name="NFC">
<runs />
</js-module>
Expand All @@ -117,7 +138,6 @@
</feature>
</config-file>

<!-- https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_nfc_readersession_formats?language=objc -->
<config-file parent="com.apple.developer.nfc.readersession.formats" platform="ios" target="*-Debug.plist">
<array>
<string>NDEF</string>
Expand All @@ -133,15 +153,14 @@

<header-file src="src/ios/NfcPlugin.h" />
<source-file src="src/ios/NfcPlugin.m" />

<!-- frameworks -->

<framework src="CoreNFC.framework" weak="true" />

<preference name="NFC_USAGE_DESCRIPTION" default="Read NFC Tags" />
<config-file target="*-Info.plist" parent="NFCReaderUsageDescription">
<string>$NFC_USAGE_DESCRIPTION</string>
</config-file>
</platform>
</platform> -->


</plugin>
87 changes: 87 additions & 0 deletions src/android/res/layout/activity_incomingcall.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_incoming_call"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#0D0D0D"
android:theme="@style/Theme.Design.NoActionBar"
tools:context="com.chariotsolutions.nfc.plugin.IncomingCallActivity">

<TextView
android:id="@+id/fullscreen_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="top|center_horizontal"
android:layout_marginTop="70dp"
android:keepScreenOn="true"
android:text="Incoming Call"
android:textColor="#FFF"
android:textSize="40sp"
android:textStyle="bold" />

<TextView
android:id="@+id/fullscreen_content2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="top|center_horizontal"
android:layout_marginTop="130dp"
android:keepScreenOn="true"
android:text="you have a visitor at your door"
android:textColor="#FFF"
android:textSize="15sp" />


<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<WebView
android:id="@+id/webView"
android:layout_width="267dp"
android:layout_height="424dp"
android:layout_marginStart="1dp"
android:layout_marginEnd="1dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.53" />


</androidx.constraintlayout.widget.ConstraintLayout>

<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="false">

<LinearLayout
android:id="@+id/fullscreen_content_controls"
style="@style/Theme.Design.NoActionBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:orientation="horizontal"
tools:ignore="UselessParent">
<Button
android:id="@+id/cl_decline_button"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="#ff352f"
android:text="Decline" />
<Button
android:id="@+id/cl_answer_button"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="#4bab10"
android:text="Answer" />

</LinearLayout>
</FrameLayout>
</FrameLayout>
Loading