NordicSemiconductor / Android-nRF-Mesh-Library

The Bluetooth Mesh Provisioner and Configurator library.
https://www.nordicsemi.com/
BSD 3-Clause "New" or "Revised" License
406 stars 174 forks source link

Change abstract ApplicationMessage to public #568

Closed anhhh11 closed 11 months ago

anhhh11 commented 11 months ago

no\nordicsemi\android\mesh\transport\ApplicationMessage.java abstract class ApplicationMessage extends MeshMessage

Currently, the app I am working on relies on the functionality provided by the ApplicationMessage class. However, the class is currently inaccessible or internal, which prevents me from customizing its content to suit my application's specific requirements. I believe making the ApplicationMessage class public would greatly benefit not only my application but also other developers who may encounter similar requirements. By allowing customization of this class, it would enable us to tailor our applications more effectively and efficiently.

roshanrajaratnam commented 11 months ago

Hi ok, could you elaborate what you are trying to achieve?

anhhh11 commented 11 months ago

Yes, I want to create custom SIG model,.i.e send custom command (other opcode + data format), some logic currently cast type to ApplicationMessage but it cannot be extend.

On Fri, Oct 13, 2023, 1:35 PM Roshan Rajaratnam @.***> wrote:

Hi ok, could you elaborate what you are trying to achieve?

— Reply to this email directly, view it on GitHub https://github.com/NordicSemiconductor/Android-nRF-Mesh-Library/issues/568#issuecomment-1760980040, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANGMRVA2KFOSBM2UMKEQTLX7DOKNANCNFSM6AAAAAA55HSZJQ . You are receiving this because you authored the thread.Message ID: @.*** .com>

roshanrajaratnam commented 11 months ago

You can use vendor model message class to send custom messages.

anhhh11 commented 11 months ago

I find VendorModelMessageUnacked but assembleMessageParameters but it is final. Can you provide some class name or sample?

roshanrajaratnam commented 11 months ago

Take a look at the following snippet, this should hopefully help you.

https://github.com/NordicSemiconductor/Android-nRF-Mesh-Library/blob/1e71dabe7cd0a1047db4b662d2af41fb5e9e3584/app/src/main/java/no/nordicsemi/android/nrfmesh/node/VendorModelActivity.java#L223-L240

anhhh11 commented 11 months ago

Thank you very much! exactly what I need.

On Fri, Oct 13, 2023, 6:04 PM Roshan Rajaratnam @.***> wrote:

Take a look at the following snippet, this should hopefully help you.

https://github.com/NordicSemiconductor/Android-nRF-Mesh-Library/blob/1e71dabe7cd0a1047db4b662d2af41fb5e9e3584/app/src/main/java/no/nordicsemi/android/nrfmesh/node/VendorModelActivity.java#L223-L240

— Reply to this email directly, view it on GitHub https://github.com/NordicSemiconductor/Android-nRF-Mesh-Library/issues/568#issuecomment-1761329041, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANGMRWIXYNMF3IHFLPJPK3X7EN2BAVCNFSM6AAAAAA55HSZJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRRGMZDSMBUGE . You are receiving this because you authored the thread.Message ID: @.*** .com>

anhhh11 commented 11 months ago

Library already having VendorModelMessageAcked, VendorModelMessageUnacked for custom (vendor) message