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. Node
  3. 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 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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

  • Wed, 08/26/2026 - 09:04
    Gurux.DLMS.Python 1.0.203
  • Mon, 08/17/2026 - 11:28
    Gurux.DLMS.Python 1.0.202
  • Mon, 08/17/2026 - 09:47
    gurux.dlms.cpp 9.0.2608.1701
  • Mon, 08/17/2026 - 09:25
    gurux.dlms.c 9.0.2608.1701
  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701

New forum topics

  • Security vulnerability report — request for a private contact (GuruxDLMS.c / ANSI C)
  • Topic: Insufficient Memory Error When Reading Class 7 Profile Generic Objects
  • SN ReadResponse returns all-null values when response spans multiple HDLC frames
  • Gurux.Serial.Android 3.0.6 – CH340 (HL-340) USB-Serial Adapter Not Working,
  • Trying to talk to a L&G E360 meter (Using Python Gurux)
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin