sikandernoori / time_change_detector

A flutter plugin to detect change in device time, date and timezone for Android and IOS.
MIT License
1 stars 5 forks source link

java.lang.RuntimeException: Unable to instantiate receiver #2

Closed jajangjayus closed 1 year ago

jajangjayus commented 2 years ago

Hello, I faced error java.lang.RuntimeException: Unable to instantiate receiver, when i changed device time zone

I assumed the problem in file manifest

<receiver
      android:name=".TimeChangeDetectorPlugin"
      android:exported="true">
      <intent-filter>
          <action android:name="android.intent.action.TIME_SET" />
          <action android:name="android.intent.action.TIMEZONE_CHANGED" />
          <action android:name="android.intent.action.DATE_CHANGED"/>
      </intent-filter>
  </receiver>

please tell me what should i do, thanks

Hideart commented 2 years ago

@jajangjayus In my case, the solution was to replace

<receiver
      android:name=".TimeChangeDetectorPlugin"
      ...

with

<receiver
      android:name="com.randomforest.time_change_detector.TimeChangeDetectorPlugin"
      ...
Mamasodikov commented 1 year ago

@jajangjayus In my case, the solution was to replace

<receiver
      android:name=".TimeChangeDetectorPlugin"
      ...

with

<receiver
      android:name="com.randomforest.time_change_detector.TimeChangeDetectorPlugin"
      ...

Based on this I've opened pr https://github.com/sikandernoori/time_change_detector/pull/6#issue-1925978214

sikandernoori commented 1 year ago

Fix in version 0.0.3