cordova-plugin-theme-detection icon indicating copy to clipboard operation
cordova-plugin-theme-detection copied to clipboard

ThemeDetection of undefined

Open mkden opened this issue 3 years ago • 7 comments

install to cordova this plugin add to config <plugin name="cordova-plugin-theme-detection" spec="1.3.0" /> but not work erorr ThemeDetection of undefined

my cod

cordova.plugins.ThemeDetection.isAvailable((res)=>{
  console.log('Is Theme Detection Available? ->',res);
},(err)=>{
  console.log('Error when running isAvailable ->',err);
});

cordova.plugins.ThemeDetection.isDarkModeEnabled((res)=>{
  console.log('Is it dark mode? ->',res);
},(err)=>{
  console.log('Error when running isDarkModeEnabled  ->',err);
});

mkden avatar Jul 28 '21 09:07 mkden

Did you try to install the plugin with the cordova CLI? cordova plugin add cordova-plugin-theme-detection

mariusbackes avatar Jul 28 '21 15:07 mariusbackes

  1. cordova plugin add cordova-plugin-theme-detection 2)the plugin was installed and appeared in the plugins folder 3)add to config <plugin name="cordova-plugin-theme-detection" spec="1.3.0" /> 4)add to index.html code `cordova.plugins.ThemeDetection.isAvailable((res)=>{ console.log('Is Theme Detection Available? ->',res); },(err)=>{ console.log('Error when running isAvailable ->',err); });

cordova.plugins.ThemeDetection.isDarkModeEnabled((res)=>{ console.log('Is it dark mode? ->',res); },(err)=>{ console.lo`

but not work erorr ThemeDetection of undefined

mkden avatar Jul 28 '21 18:07 mkden

test in Monaca Debugger

mkden avatar Jul 28 '21 18:07 mkden

Please try to reinstall the plugin or readd your platform. I'm not able to reproduce this issue

mariusbackes avatar Aug 15 '21 09:08 mariusbackes

Is there a problem with MIUI? Beacuse i have the same Issue.

SimeonLukas avatar Aug 17 '21 20:08 SimeonLukas

It shouldn't be a problem with MIUI, I'm testing on a Xiaomi device, too. Are you guys using any plugin for app development?

mariusbackes avatar Aug 18 '21 06:08 mariusbackes

After switching from SDK 33 to SDK 34 I got this error and plugin is not working any longer.

This is what I have: Cordova android 12.0.1 android-targetSDKVersion=34 android-minSdkVersion=30 android-compileSdkVersion=34

alanmilinovic avatar Jun 18 '24 22:06 alanmilinovic