Distriqt Google Plus ANE - Issues on Android & Conflict with Milkman GoViral ANE - actionscript

I am currently working with Distriqt G+ ANE. My setup is this:
AIR 16 with correct dx.jar provided in Distriqt tutorials.
Using the Demoproject provided with District ANE
Samsung Galaxy S-Plus (GT-I9001) with Android 2.3.6 for testing
OAUTH IDs all set up correctly, it works perfectly on iOS
GooglePlay and Core ANEs are included (even though former not necessary on iOS)
Problem #1:
So i get the following very weird behavior with demo project (on Android):
first call to signIn just does nothing.
second call to signIn takes me to google plus application.
i can select the account i want to use. but i can click on it and nothing happens. i can click 2-3 times usually.
it switches back to the app, but triggers none of the event handlers
-> steps are repeatable and i never get any events back
if you search for the app id in the cat log the only thing are the traces from the app and
08-19 18:18:32.031 I/GLSUser (4626): [GLSUser] getTokenFromGoogle
[account: , callingPkg: air.my.com.zas.lefiner, service:
oauth2:https://www.googleapis.com/auth/plus.login
Problem #2:
If i try to implement this into my main app which uses several other ANEs.
<extensionID>com.distriqt.PushNotifications</extensionID>
<extensionID>com.itpointlab.ane.FlashLight</extensionID>
<extensionID>com.milkmangames.extensions.GoViral</extensionID>
<extensionID>com.distriqt.GooglePlus</extensionID>
<extensionID>com.distriqt.Core</extensionID>
<extensionID>com.distriqt.GooglePlayServices</extensionID>
I can't compile. With a very long error.
dx tool failed:warning: Ignoring InnerClasses attribute for an
anonymous inner class (com.facebook.AppEventsLogger$1) that doesn't
come with an associated EnclosingMethod attribute. This class was
probably produced by a compiler that did not target the modern .class
file format. The recommended solution is to recompile the class from
source, using an up-to-date compiler and without specifying any
"-target" type options. The consequence of ignoring this warning is
that reflective operations on this class will incorrectly indicate
that it is not an inner class.
This block is repeated with dozens of other classes most of them in com.milkmangames.extensions.* some also having cryptic names like c.m.x.a.gv.al
At the end there is a memory error:
UNEXPECTED TOP-LEVEL ERROR: java.lang.OutOfMemoryError: Java heap
space at com.android.dx.util.IntList.growIfNeeded(IntList.java:274)
at com.android.dx.util.IntList.add(IntList.java:217)
...
Has anybody ever encountered similar problems with these 2 ANEs or just the G+ ANE on the old android phone?

Your first issue sounds like a problem with the SHA-1 Certificate. You should make sure you are following the instructions to correctly generate this and that you have added this correctly to your console project.
http://airnativeextensions.com/extension/com.distriqt.GooglePlus#get-started
You can find more information on the certificate here: https://developers.google.com/+/mobile/android/getting-started
This is very important on Android and incorrectly matching this to the signature/certificate used to sign your application will cause the login to fail as you are experiencing.

Related

Transferring Xcode Project from one computer to another brings random errors?

I have a Xcode project I got from another developer. Initially when I opened it it has a bunch of errors (most of which were un-updated frameworks). I got it to work after a while and I fixed it. I want pass it back to the manager since I'm leaving uni in a few months. I copied it over to my friends Mac to see what would happen if I just took the project and all it's folders and made it a zipfile. It didn't work for some reason. It gave me an error:
error: using bridging headers with framework targets is unsupported
But why did that come up? I mean it's the same code on the slightly different versions of Xcode (13.1 versos 14.1) but I doubt there was a massive change between the two that would cause this. I want to be able to pass these app later in the future without having to care about this stuff. I made a GitHub (link below) would cloning that work? Also the laptop I chose was just a fresh reset. Would it be due to not having coco-pods installed?
I feel like I could go through and fix it all on that laptop and document that but then I'm afraid that every time I put it on a new one it would come up with random errors every single time making my documentation moot.
https://github.com/AbdullahMSaid/SonicExperiment-Works
With big help this was Fixed.
Things that fixed it.
Having the correct version of Xcode
Turning everything from absolute path to relative
Lots of other code fixes. But those are my project specific.
You don't need bridging headers in framework. Use should have something like "YourFramework.h" where you can import your .h files.

Class GAD_GTMStringEncoding is implemented in both <framework> and <app>. One of the two will be used. Which one is undefined

I have an iOS project in Xcode. It contains a load of linked libraries including GoogleInteractiveMediaAds.framework as well as an internal player library that I believe is also linked against this framework. Both are also embedded binaries.
The project compiles just fine but at runtime I get the following error:
Class GAD_GTMStringEncoding is implemented in both
/GoogleInteractiveMediaAds.framework/GoogleInteractiveMediaAds
and APP_PATH. One of the two will be used. Which one is undefined.
On simulator the app works as expected every time despite this warning - I get the pre-roll, mid-roll and post-roll ads that I'm expecting. Every time. On device it's a different story with the ads sometimes working and sometimes not. I'm aware that the above issue results in different behaviour on different targets and I suspect this conflict is to blame for the broken functionality on devices.
Solutions I've found here on SO suggest either changing the namespaces or removing the linkage from either my app or the library that I'm linking against. The problem is, if I remove the embedded binary in my project then it fails to compile:
dyld: Library not loaded:
#rpath/GoogleInteractiveMediaAds.framework/GoogleInteractiveMediaAds
Referenced from: APP_PATH
Reason: image not found
(lldb)
I've seen a few people suggest what would be removing the linkage from the app and using the player's internal instance (where I then have to hope that the player is compiled against the version that I need), but how on earth do you do that? And would that even work in this case?
Also, is there a way to find out for sure where this other instance of GoogleInteractiveMediaAds.framework is coming from? I'm only assuming that it's inside the internal player library but I don't know for sure as I don't have the source. The error message just provides me with the path to the compiled app which is of little help since there's like 30 linked libraries inside it.
Thanks in advance.
After initially insisting that the issue was somewhere in our code, the Google team responsible for this framework were eventually forced to admit (after we provided a sample app) that it was a problem with their code and not ours. It was resolved in an update.

BlackBerry RIMAPPSA2 signing key required -- why?

I'm trying to sign our BlackBerry app, but now it's asking for "RIMAPPSA2" signing key, which is the signing key for private APIs (which isn't allowed in the app world I assume). So I want to remove this requirement so I can actually run the app on devices.
There's nothing in the build log. My app does NOT use any of the following packages (which the internet suggests might be the issue):
net.rim.vm.Persistable
net.rim.vm.*
net.rim.device.api.browser.field2.*
net.rim.device.api.browser.field2.debug.*
net.rim.device.api.script.*
org.w3c.dom.jsp2.* <- actually is uses org.w3c.dom.*, but I've had an app not require this that already had this package in it.
net.rim.device.api.io.Seekable
And I'm not importing any external JARs (although I was before). I'm using the 4.5 JDE.
How can I find out what is making the signer tool require this signature?
Is there any way to track down what is causing this signature (RIMAPPSA2) to be required?
This might be due to a bug in Eclipse or RIM. You might not be using the RIMAPPSA2 classes.
OK, so its hard to believe but this page might fix the problem for some:
Frustrations with Blackberry Developer plugins for Eclipse
Basically its a bug, and by changing the Application Descriptor, saving, removing & re-adding the JAR file, the problem is fixed.
Follow-up #1 - might not work:
The above solution enabled me to build & sign the app. Unfortunately the app won't run on the phone Module 'MyApp" attempts to access a secure API.
Follow-up #2 - this worked for me:
I documented a full solution that worked for me here:
BlackBerry - use own JAR file in own project
In my case, I was importing my own JAR file, and I needed to set that project's build type to be a MIDLET. Setting it as LIBRARY or APPLICATION caused problems.
I've not tried it, as I am waiting for my signing key.
If you use eclipse, you can have following settings that can be turned off.

Mono For Android Hello World code throws AndroidManifest.xml error

I recently downloaded the trial version of Mono For Android. I tried running the Hello World tutorial. I receive the following error:
Tried to launch activity 'HelloMonoDroid.HelloMonoDroid/hellomonodroid.Activity1', but the device could not find it.
A common cause of this is manually adding an to your AndroidManifest.xml whose name does not match your Activity class.
Consider using the [Activity] attribute instead:
http://monodroid.net/Tutorials/Working_with_AndroidManifest.xml
I triple checked my code and didn't see any differences between it and the posted code in the tutorial. So I tried to create a new Mono For Android Project and ran it without modification. I named the Project Driver. Here is the error I received:
Tried to launch activity 'Driver.Driver/driver.Activity1', but the device could not find it.
A common cause of this is manually adding an to your AndroidManifest.xml whose name does not match your Activity class.
Consider using the [Activity] attribute instead:
http://monodroid.net/Tutorials/Working_with_AndroidManifest.xml
Notice it is the same as the original error with only the activity name changed. This is a simple solution. I am not creating a AndroidManifest.xml file manually. Is this a bug with the Mono For Android product?
Go to Tools->Options->Mono for Android and turn on adb logging.
This should write a log to your desktop that might give more details.
Aha, thanks I've found the issue. There is a place in that dialog (Tools->Options->Mono For Android) that sets the Android SDK path. After doing this the solution deploys and works with no trouble. I thought I told the installer where the SDK was, but apparently not. Its possible I got myself confused as I'm evaluating the Eclipse/Android SDK development environment in parrallel.

finding unsupported apis with os version

I've developed and application for iPhone. It works fine on os4 but it does not work on os3.1. In fact works but there are some problems; after splash screen a what screen appears. while I leaving the application I can see the application is opened successfully but just see while exiting.
So I wonder if there is a tool which says which apis have problems with os3.1? So I have a chance to replace them.
If you want to check a specific API, just run this in your code somewhere with an appropriate response. For example, to see if print is supported, run this...
if (NSClassFromString(#"UIPrintInfo")) {
}
Set your project's Base SDK to iphone-os-3-1, then build. All the error messages about classes, methods, and functions that don't exist must designate things added since iphone-os-3-1, since your project built and linked fine against the iphone-os-4-0 SDK.
If you don't have the iphone-os-3-1 SDK, try this instead:
Open your project's Build Settings.
Find the "Preprocessor Macros" setting.
Edit it and add __IPHONE_OS_VERSION_MAX_ALLOWED=30100
Now, try building. This should cause everything introduced after iOS 3.1 to be labeled unavailable, producing the same errors as if you had switched to the iphone-os-3-1 SDK.
It's a good idea to get a second installation of Xcode for this situation, in this case you need 3.2.1 with SDK 3.1.3 - I wish I could help you with a download link since it is no longer shown on Apple's page, but I have googled in the past and found direct, official download links which will work as long as you are signed in with your developer account, so good luck.
The annoying bit is that you need to go through your project files and set "Base SDK" to 3.1.3 and then back once you have completed the exercise. But it is the easiest way to flag what you can't do in 3.1.3. "sudo rm -rf" (I feel nervous even typing that) has an excellent method there but you need to have an inkling of what might be safe and what might not before you implement it or else you end up with code 10x the size it needs to be.
Apple really needs to sort out this issue - hopefully by flagging methods that are prior to your specified "Deployment Target", in the same way that deprecated methods are flagged.

Resources