Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Regarding The Dlms Android Project

Regarding the dlms android project

By atuldd , 31 May, 2025
Forums
Gurux DLMS for Android

public GXSerial(Context context) {
if (context == null) {
throw new IllegalArgumentException("context");
}
mContext = context;
GXUsbReceiver mUsbReceiver = new GXUsbReceiver(this);
String name = "gurux.serial";
IntentFilter filter2 = new IntentFilter(name);
filter2.addAction(UsbManager.ACTION_USB_DEVICE_ATTACHED);
filter2.addAction(UsbManager.ACTION_USB_DEVICE_DETACHED);
mContext.registerReceiver(mUsbReceiver, filter2, Context.RECEIVER_NOT_EXPORTED);
mSyncBase = new GXSynchronousMediaBase(200);
setConfigurableSettings(AvailableMediaSettings.ALL.getValue());
}

this supports only android 8 and above
it is not supporting for android 7 devices i am getting
FATAL EXCEPTION: main
Process: com.iiits.TrmSbd.sit, PID: 6896
java.lang.NoSuchMethodError: No virtual method registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;I)Landroid/content/Intent; in class Landroid/content/Context; or its super classes (declaration of 'android.content.Context' appears in /system/framework/framework.jar)
at gurux.serial.GXSerial.<init>(GXSerial.java:216)

i am having the option of
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
context.registerReceiver(mUsbReceiver, filter, Context.RECEIVER_NOT_EXPORTED);
} else {
context.registerReceiver(mUsbReceiver, filter);
}

this but

GXSerial is read only class i want this to support from android 7

Profile picture for user Kurumi

Kurumi

1 year ago

Hi, Google ended support for…

Hi,

Google ended support for Android 7 in August 2019. If you want to support Android 7 devices, you can modify the source code to meet your needs.

It's recommended that you update the version seven to newer versions.

BR,
Mikko

atuldd

1 year ago

to modify in the code…

to modify in the code GXserial is read only class
which is where i am getting exception

i have shared you
mContext.registerReceiver(mUsbReceiver, filter2, Context.RECEIVER_NOT_EXPORTED);

which lies inside GXserial
getting this
FATAL EXCEPTION: main
Process: com.iiits.TrmSbd.sit, PID: 6896
java.lang.NoSuchMethodError: No virtual method registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;I)Landroid/content/Intent; in class Landroid/content/Context; or its super classes (declaration of 'android.content.Context' appears in /system/framework/framework.jar)

exception

Profile picture for user Kurumi

Kurumi

1 year ago

Hi, This Tiramisu check is…

Hi,

This Tiramisu check is already in version 2.0.12. What version are you using?

BR,
Mikko

atuldd

1 year ago

2.0.15 here i am getting the…

2.0.15

here i am getting the issue which is not supporting for android 7

i have to make
context.registerReceiver(mUsbReceiver, filter);
this changes for supporting android 7

which i could not able to do

please provide the solution for android 7

Profile picture for user Kurumi

Kurumi

1 year ago

Hi, Google is no longer…

Hi,

Google is no longer supporting Android 7, and we no longer have any Android 7 devices left.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin