Skip to content

Conversation

@iabdullahbeker
Copy link

fix android sdk 34 and removed all deprecated dependencies & fix ios file.

@msd117
Copy link

msd117 commented Jul 16, 2024

Can we get this pr merged in repo

@iabdullahbeker
Copy link
Author

Can we get this pr merged in repo

There're alot of PR , but without merges !

@CedricDALAT
Copy link

Hi @iabdullahbeker ,
Thanks a lot for your fixes !
It works, but you've commited some changes on the tagToJson function where you've added a second argument, but you didn't change the function, so it crashes when building.

sendEvent(TAG_DEFAULT, Util.tagToJSON(tag, messages));
                                   ^
  required: Tag
  found:    Tag,Parcelable[]
  reason: actual and formal argument lists differ in length
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

@iabdullahbeker
Copy link
Author

iabdullahbeker commented Aug 3, 2024

Hi @iabdullahbeker , Thanks a lot for your fixes ! It works, but you've commited some changes on the tagToJson function where you've added a second argument, but you didn't change the function, so it crashes when building.

sendEvent(TAG_DEFAULT, Util.tagToJSON(tag, messages));
                                   ^
  required: Tag
  found:    Tag,Parcelable[]
  reason: actual and formal argument lists differ in length
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

tha function has two params .. see it's here .

    static JSONObject tagToJSON(Tag tag, Parcelable[] messages) {
        JSONObject json = new JSONObject();

        if (tag != null) {
            try {
                json.put("id", byteArrayToJSON(tag.getId()));
                json.put("techTypes", new JSONArray(Arrays.asList(tag.getTechList())));
                
                if (messages != null && messages.length > 0) {
                    json.put("ndefMessage", messageToJSON((NdefMessage)messages[0]));
                }
            } catch (JSONException e) {
                Log.e(TAG, "Failed to convert tag into json: " + tag.toString(), e);
            }
        }
        return json;
    }

@CedricDALAT
Copy link

tha function has two params .. see it's here .

    static JSONObject tagToJSON(Tag tag, Parcelable[] messages) {
        JSONObject json = new JSONObject();

        if (tag != null) {
            try {
                json.put("id", byteArrayToJSON(tag.getId()));
                json.put("techTypes", new JSONArray(Arrays.asList(tag.getTechList())));
                
                if (messages != null && messages.length > 0) {
                    json.put("ndefMessage", messageToJSON((NdefMessage)messages[0]));
                }
            } catch (JSONException e) {
                Log.e(TAG, "Failed to convert tag into json: " + tag.toString(), e);
            }
        }
        return json;
    }

Well, i'm not an android developer, but, from what i understand, this function is defined in the Util.java file and in your project or in the master of this repo the function only has one parameter.

@iabdullahbeker
Copy link
Author

tha function has two params .. see it's here .

    static JSONObject tagToJSON(Tag tag, Parcelable[] messages) {
        JSONObject json = new JSONObject();

        if (tag != null) {
            try {
                json.put("id", byteArrayToJSON(tag.getId()));
                json.put("techTypes", new JSONArray(Arrays.asList(tag.getTechList())));
                
                if (messages != null && messages.length > 0) {
                    json.put("ndefMessage", messageToJSON((NdefMessage)messages[0]));
                }
            } catch (JSONException e) {
                Log.e(TAG, "Failed to convert tag into json: " + tag.toString(), e);
            }
        }
        return json;
    }

Well, i'm not an android developer, but, from what i understand, this function is defined in the Util.java file and in your project or in the master of this repo the function only has one parameter.

in my research after i installed the package for first time , i found some issues in Util.java and NfcPlugin.java
so i found an updated file for Util.java and with chatGPT help i've fixed NfcPlugin.java to be compatible with SDK 34 .

if you need those two files , just send me your email and i will send it over to you .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants