地理围栏不会触发通知

时间:2018-03-09 07:56:55

标签: android android-studio push-notification geofencing android-geofence

当有英语时,地理围栏工作正常 当我将语言环境更改为语法时,它会停止触发。

mLocale = new Locale("en");
            Locale.setDefault(mLocale);
            config = new Configuration();
            config.locale = mLocale;
            getBaseContext().getResources().updateConfiguration(config,
                    getBaseContext().getResources().getDisplayMetrics());

Android清单

 <receiver
        android:name=".geofencing.GeofenceBroadcastReceiver"
        android:enabled="true"
        android:exported="true">
        <intent-filter>
            <action android:name="com.myapplication.geofencing.ACTION_RECEIVE_GEOFENCE" />
        </intent-filter>
    </receiver>

    <service
        android:name=".geofencing.GeofenceTransitionsJobIntentService"
        android:exported="true"
        android:permission="android.permission.BIND_JOB_SERVICE" />

0 个答案:

没有答案