Showing badges in android phonegap app - android

I am developing a phonegap app and I want to show push notification count on app icon. I am using com.phonegap.plugins.pushplugin for receiving push notification.
I am trying to use this plugin https://github.com/katzer/cordova-plugin-badge for displaying badge.
But while building the app it fails and the log shows the following
[javac] /project/src/de/appplant/cordova/plugin/badge/BadgeImpl.java:33: error: package me.leolin.shortcutbadger does not exist
[javac] import me.leolin.shortcutbadger.ShortcutBadger;
Can anyone help me in solving the issue? Thanks in advance.

Add import me.leolin.shortcutbadger.ShortcutBadger; in the top of file "BadgeImpl.java" so that ShortcutBadger class is imported, this should fix the error.
Otherwise try the latest version of cordova-plugin-badge, it should work fine.I did not get any errors while building with latest version (0.7.3).
But I found some different issue with that plugin, badge count is not getting added in Samsung device whereas its working with "ShortcutBadger" "SampleApp"! strange that plugin code is not yet updated with latest ShorcutBadger code!!
Just found another plugin cordova-plugin-android-badge-counter
and its working in Samsung device as well. Try it :)

Related

Xamarin Android error on DeviceInfo.Model

I have a Xamarin for Android app that has been working until today. I needed to make a change but before I did, I ran a test to ensure no VS or Nuget package updates caused an issue. I have Xamarin.Essentials in my app and this line worked before, not sure what is happening now.
if(DeviceInfo.Model == "TC72"){scannerIndex = 1;}
Exception Unhandled:
Xamarin.Essentials.NotImplementedInReferenceAssemblyException: 'This
functionality is not implemented in the portable version of this
assembly. You should reference the NuGet package from your main
application project in order to reference the platform-specific
implementation.'
Any insight would be helpful. TIA
I changed the DeviceInfo.Model to Build.Model and get the same info I was expecting. That fixed my issue. If anyone has a different suggestion, happy to entertain them.
Added 8/11/21 3:25pm CT
I also found that changing my Compile Target to 10.0 fixed the Xamarin.Essentials issues. So far the application is working on 8.1 on the device (Zebra MC3300).

Why I can't use this class Platform in Flutter even though it's installed

This error got me confusing since I can't use the class Platform but I have already added its library dart.io (and even upgraded the pubspec file). The strange thing is that the class appears :
enter image description here
but when Im using it, it throws an error
enter image description here
any idea if it is a flutter bug?

Unable to resolve “expo-app-loading” from “App.js”

I am getting this error:
Failed building JavaScript bundle. Unable to resolve
“expo-app-loading” from “App.js”
when I ran my project after a couple of months. Earlier it was working fine but not now.
Can someone please help me out?
If you recently updated SDK versions (expo upgrade), please be sure to review the breaking changes carefully as is advised when you complete the install.
For instance, SDK-40 which was released in December has breaking changes notes about expo-app-loading that probably addresses what you're seeing perfectly.
Read this page : https://blog.expo.io/expo-sdk-40-is-now-available-d4d73e67da33
Look for section title: AppLoading has been extracted from the expo package
There were two problems:
expo-app-loading was not in my package.json, so I just installed it again and boom, it was in my packege.json then.
I was importing 'AppLoading' the wrong way. I wrote
import {AppLoading} from "expo-app-loading"; //wrong way
Which was breaking. Then I corrected it to
import AppLoading from "expo-app-loading"; //correct way
Which solved the issue.

Phonegap Cordova 5.x looking for working Android QR-Code-Scanner Plugin (Google API 23)

i am looking for a working barcode-scanner plugin..
i´ve already found this one:
https://github.com/phonegap/phonegap-plugin-barcodescanner
..but unfortunately it doesn´t work with the Google API 23 (there are errors occurring by the bookmarkcolumns plugin included).. as far as i know it works with api 22 or less
so the errors ocurr in the CaptureActivity (src folder) > com.google.zxing.client.android.share
files:
AppPickerActivity.java
BookmarkPickerActivity.java
ShareActivity.java
Error: BookmarkColumns cannot be resolved or is not a field
so my question is, is there any other barcode-scanner-solution for phonegap or is there a way to fix these errors?
any help would be appreciated!
thanks!
BarCode Scanner :
Click on the below link you will find multiple numbers of barcode scanner plugin. Please add which ever shoots your API level.
Barcode Scanner plugins

Have a trouble with developing an app for smarteyeglass

Recently,i need to build an app for smart eyeglass. with official instruction,i have to import three library project,including SmartExtensionAPI,SmartExtensionUtils SmartEyeglassAPI.and i have develop dependencies for my project when i run this app, there a lot of error information.
such as Error:(44, 57)
com.sonyericsson.extras.liveware.aef.notification is not
existing;Error:(45, 57)
com.sonyericsson.extras.liveware.aef.registration is not
existiong!Error:(49, 52)com.sonyericsson.extras.liveware.aef.control
is not existing,Error:(198, 40)Registration.Intents is not existing
and so on.
what's wrong? search for help.
thanks
It seems like you are missing registration for your extension in your application.
Please take a look at sample projects for details. You can also start developing directly using sample projects in the SDK.

Categories

Resources