Enabling Push Notification Xamarin.Android runtime BB 10 App - push-notification

I am following this doc to enable push in Xamarin.Android runtime BB10 app. I am confused where & when exactly to put android.cfg file.
Before creating apk, added cfg file in root of project in application
name (tried naming as android.cfg also).
Using that apk, I generated .bar file, but under android folder, res
folder and apk file only exist, cfg file doesn't seems to be exist.
Then I tried adding cfg file under bar file after creating apk but
before signing bar file, but I started getting following error:
Error: No manifest. Exception in thread "main"
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at net.rim.tools.signing.SigningMain.main(SigningMain.java:72) Caused by: java.lang.Exception: java.lang.RuntimeException: No
manifest.
at net.rim.device.codesigning.barsigner.BarSigner.if(Unknown Source)
at net.rim.device.codesigning.barsigner.BarSigner.main(Unknown Source)
... 5 more Caused by: java.lang.RuntimeException: No manifest.
at net.rim.device.codesigning.barsigner.BarSigner.try(Unknown Source)
... 7 more
I have ppgurl, appid which I got from BB.
What is the exact procedure for this? In same doc following thing is given:
The Google Play Services SDK is not supported on BlackBerry 10. If
your app includes GCM services, you must set up your Android project
to use the stand-alone GCM SDK. Android Studio does not support the
use of the stand-alone GCM SDK at this time. For more information see
Android Studio Overview.
I am using GCM Client component for push in Xamarin.Android. What is stand alone GCM SDK given in doc?. I don't know what kind of GCM I am using.

I fixed above issue and now I am receiving push notification successfully in my BlackBerry device. In different places different location is given to place android.cfg file, but actual location which worked for me is:
android.cfg file under assets/blackberry/android.cfg
Place this file before creating apk. Because in many places I read to put this file after creating apk using zip tool, that may also work, but if it is not working try the solution given here :)
I followed procedures exactly given in below docs.
https://github.com/blackberry/BB10-Android-Runtime-Samples/tree/master/SamplePushClient

Related

Azure IoT Hub and Xamarin.Forms

Is it possible to use Xamarin.Forms Android and UWP with the IoT Hub? How? I can't find a functioning example. Windows.Azure.Devices.Clint works, but only for UWP (for me at least). What to do? Is it possible to use Windows.Azure.Devices.Clint, or do I have to use Windows.Azure.Devices.Clint.PCL?
Some things from the logs (might be helpful):
Ignoring C:\Users\Korisnik.nuget\packages\system.runtime.compilerservices.unsafe\4.4.0\ref
And when trying to deploy:
03-30 10:09:33.202 D/Mono (16948): Assembly Loader probing location: 'System.Runtime.CompilerServices.Unsafe'.
03-30 10:09:33.203 F/monodroid-assembly(16948): Could not load assembly 'System.Runtime.CompilerServices.Unsafe' during startup registration.
03-30 10:09:33.203 F/monodroid-assembly(16948): This might be due to an invalid debug installation.
03-30 10:09:33.203 F/monodroid-assembly(16948): A common cause is to 'adb install' the app directly instead of doing from the IDE.
Check out the repo with the sample code: https://github.com/ChakraSpice/Xamarin-IoT-Android-Issue-Sample (use your own connection string)
I can't deploy it to the android devices.
It was a known issue but has already been fixed. Please check these issues: [1] and [2].
I install Microsoft.Azure.Devices.Client version 1.7.0 in Xamarin.Forms Android. It seems working. You can try to see if it helps.

what Jar's are needed for and ActiveMQ client, application

I have activemq-client-5.13.3.jar on my class path, but i keep getting
Exception in thread "main" java.lang.NoClassDefFoundError: javax/jms/JMSException
If i use activemq-all-5.13.3.jar on my class path, every thing works.
however I am not allowed to use the activemq-all jar.
added jms-api-1.1-rev-1.jar
and now Exception in thread "main" java.lang.NoClassDefFoundError: javax/management/j2ee/statistics/Stats
You can use maven to determine this with the mvn dependency:tree command or use other maven centric tools to explore the artifacts dependencies.
At a minimum you would need these for v5.13.3
slf4j-api.jar geronimo-jms_1.1_spec.jar hawtbuf.jar
Then you can add an slf4j binding like log4j or logback to get proper logs. There are some others that you might want depending on where / how you are using it like the geronimo-j2ee-management_1.1_spec jar.
Of course if you use maven to build you can make this simpler since it will manage the deps for you.
I found same problem with my java application. I needed to insert Spring Boot for rest web service (Jetty Server) and now ActiveMQ for others data exchange.
With
activemq-client-5.15.11.jar; geronimo-jms_1.1_spec-1.1.1.jar; geronimo-j2ee-management_1.1_spec-1.0.1.jar; hawtbuf-1.11.jar;
all works.

Bouncy castle no such method error

I'm trying to decrypt a file using Bouncy Castle v1.53 PGP and Using PGPUtil class.
The program works fine in my Eclipse, but given following error when integrated inside a war file and deployed onto a weblogic server.I'm using following dependencies:
1)bcpg-jdk15on
2)bcprov-jdk15on
Error
java.lang.NoSuchMethodError:
org.bouncycastle.util.Strings.newList()Lorg/bouncycastle/util/StringList;
at org.bouncycastle.bcpg.ArmoredInputStream.<init>(Unknown Source)
at org.bouncycastle.bcpg.ArmoredInputStream.<init>(Unknown Source)
at org.bouncycastle.openpgp.PGPUtil.getDecoderStream(Unknown Source)`
Resolution
This problem is resolved when I copied following classes into my source folder:
org.bouncycastle.util.Strings
org.bouncycastle.util.StringList
org.bouncycastle.bcpg.ArmoredInputStream
org.bouncycastle.openpgp.PGPUtil`
by changing their Class Names
However, I want a better fix than this as I feel this is some Jar Conflict
Please let me know if anyone finds one
That error is likely happening because you are using one version of the bouncycastle .jars when you run with Eclipse, but there is a different version of one of those .jars which is on the classpath that Weblogic is using when running your application.
You will need to investigate how exactly Weblogic sets up the classpath, and make sure the version of the .jars you need are on the classpath before the preexisting version (unless that preexisting version is there by mistake, in which case you can just remove the preexisting one from the classpath).

Distriqt Google Analytics Extension fails in Air Debug Launcher (ADL)

Exception fault: VerifyError: Error #1014: Class com.distriqt.extension.googleanalytics::Tracker could not be found.
The issue does NOT occur when installed to a device.
The extension has been added to the application descriptor.
I have other Distriqt extensions (notifications, dialog) already in my app which are working fine.
Setup: Mac / FDT / AIR SDK 18
We accidentally missed a few classes in default library of the first release of this ANE.
Grab the update and it should resolve this issue.
Cheers
try to copy and rename your ANE: ane-file-name.ane to ane-file-name.swc, and also add it to your project (you must have both ane and swc)

sqlite3 method access exception in wp7 while storing database in isolatedstorage

I'm currently developing database app for wp7& 8 in wp8 Sdk with target Os 7.1.When i Run the Application in Wvga,wxga,720p emulator all working fine,but when i run it on 7.1 Emulator,An unhandled exception of type 'System.MethodAccessException' occurred in Community.CsharpSqlite.WinPhone.dll exception is Thrown at the sqlite.cs file in return the code (Result)Sqlite3.sqlite3_open_v2(filename, out db, flags, null);.Help me to solve this Problem
for reference have a look at it
Not sure if this is useful to you, but I fixed this problem in the end by, well, switching to csharp-sqlite :)
You may also peek into sqlite-net sources and remove the offending call, but the csharp-sqlite project has more activity and generally less problems.

Resources