Google Drive API only working on tablet, not smartphone - api

I have created an app that connects to Google Drive via this code:
googleApiClient = new GoogleApiClient.Builder(this)
.addApi(Drive.API).addScope(Drive.SCOPE_FILE)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this).build();
googleApiClient.connect();
This code works on my tablet (Samsung Galaxy Tablet 2, with 4.4.2 running on it), however when I try running this same code on either a Nexus 5 with 5.0.1 or a Galaxy S5 with 4.4.4, connecting to Google Drive crashes every time.
I do one initialization of the googleApiClient object, and one call to connect, but for some reason I keep getting this error:
04-13 15:27:44.563: E/AndroidRuntime(5402): java.lang.IllegalStateException: Client must be connected
Both phones have 3G and Wifi access, and the tablet just has Wifi access. I am calling connect to Google Drive, but for some reason I keep getting this error.
Has anyone ever encountered this issue before?

I believe your problem stems from a mismatch in Google Play Services versions. I think, the 7.0.+ version on your phone needs revision 23 in your IDE. Try to run SDK Manager and download rev 23 or higher. Your tablet will probably update to 7.00.+ when Google decides the time is right. But rev. 23 (or higher) should be compatible with everything 7.00 and lower. I can't be more specific here, since I am on Android Studio.
Good Luck

Related

ICE fails even with TURN/STUN servers

I have implemented video chat. It works perfectly on local, but doesn't work on production server.
this.rtc.oniceconnectionstatechange = () => {
console.log(this.rtc.iceConnectionState);
}
On local server the code above prints: checking, then after some time: connected
On the production server it's: checking then failed
I tried to use Google's STUN server and free TURN server by https://numb.viagenie.ca/ (You need to register in order to get access)
I checked both TURN and STUN servers via https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ and it seems work fine.
The code is written in Vue js and you can see it in this pen:
https://codepen.io/4unkur/pen/orNyvy?editors=1010
What is wrong with my code, or is this an issue of that free TURN server?
Dump of chrome://webrtc-internals https://pastebin.com/whhibysu
UPDATE
I was testing my app using 2 laptops: HP (Windows) and Macbook and it didn't work. Then I tried to test is using my mobile phone + Macbook and it worked, then phone + HP - didn't work.
So I thought maybe the problem is in HP? So I tested HP + HP i.e. opened 2 tabs in browser on HP and it did work. Why the issue happens only on HP, might it be the issue of Windows OS?
UPDATE 2
I run WebRTC Troubleshooter at https://test.webrtc.org/
on HP and it gave me errors in Connectivity tab:
On Macbook: I don't get such errors

App Wireless Distribution not working in iOS7. Internet Connection needed?

In iOS6 I used to install some of my apps over an adhoc network without internet sharing. So the iPad had no internet connection. Therefore I use a typical html and plist file. Everything was alright.
Now, in iOS7 the installation is not working anymore. It is just stuck in "Waiting" and nothing more happens. (Note: It is still working on my iOS6 iPad)
First I thought something might be wrong with my plist, but then I copied the files to my IIS Server and installed it from there. Here I had a internet connection on my iPad and everything worked out.
Is it possible that the wireless distribution now needs an internet connection in iOS7 e.g. to check the ipa in the app store or something like that? Because this is the only difference I can see.
The app is signed with a valid distribution profile.
Thanks for your help.
It turned out the installation of apps over the air in iOS 7 really needs an internet connection now. The iPad tries to contact at least the following URLs before installing the app.
ax.init.itunes.apple.com: The device obtains the current file-size limit for downloading apps over the cellular network.
ocsp.apple.com: The device contacts this site to check the status of the distribution certificate used to sign the provisioning profile.
It seems in iOS6 it was ok if those URLs were not reachable and now in iOS 7 they have to be reachable.
Well i just had the same problem and I figured it out. At least on my xcode this is what happened. Turns out the application target release code siging identities auto set to developer and not their current state, from xcode 4.x, which is distribution. So when I went to distribute my application I kept getting the same error you had. So Click on your project name in your project explorer then click on the application target, not the project, and make sure the code signing identity is not set to developer for your releases. I have no idea why the code signing identities were automatically set to the developer profile, maybe there was some sort of bug when updating from xcdoe 4.x to xcode 5 that caused this. But now other devices are able to install the program. Hope this helps.

UAAppReviewManager Rate Function Not Working on iOS 7

Hey Stackoverflow People,
I'm working on implementing the UAAppReviewManager tool developed by Urban Apps (which is basically a super version of Appirater) into my app to have a rating and feedback function. I have devices (running iOS 5/6) where I've tested the Rate feature of the tool and its been able to properly redirect the user to the App Store after they select Rate the App from the pop-up dialogue, but for devices using iOS 7, it redirects the user to the App Store app and displays a pop-up saying the following:
The certificate for this server is invalid. You might be connecting to a server that is pretending to be "ax.itunes.apple.com" which could put your confidential information at risk.
Has anybody used this tool on iOS 7 and encountered this message before? If so, does anyone know what the workaround is? It seems iOS 7 processes things differently underneath with URLs and I'm not doing anything different or specific for earlier versions.
I am the developer of UAAppReviewManager. iOS 7 does not allow this url anymore so it was changed to a new value for iOS 7 in UAAppReviewManager. Update to the most recent (0.1.3) as of this writing and you should be fine

Activation Error and no access to Iphone

I upgraded my Iphone IOS to 7 weeks ago.
Today automaticaly it has been upgraded to the last beta IOS and ask me for Activation.
On display there's a text "Activation Error, register for developer program" and I have not access to my phone.
also, since i installed a new windows on my laptop, I didnot connect the phone to my itunes. Now for finding UDID I just connect it to Itune and Itune ask me to Trust the phone but i have not access to iphone to trust.
seems i have the option to downgrade to ios6 through dfu mode, but i need my data on it and it will be lost if i use udf/restore.
plz provide me solution
This seems like it would answer your question: http://www.imore.com/how-downgrade-ios-7-beta-back-ios-6
Sometimes it's tricky knowing if you made it into DFU mode properly, this should help: http://www.iclarified.com/entry/index.php?enid=1034
Please be careful putting your primary phone on unstable versions of software, Apple has a nasty history of trying to prevent people from going backward.

Does GCM works for android 2.3 platform?

I have created a APP using GCM which works correctly on Android platform 4.1 and 4.03 (I.e. Gets a RegId and register itself in my server and can even recieve a GCM), but when I start the emulator for android 2.3 (API 10) then the app gets installed but never registered I.E never gets RegId. When I start (install) the application for the first time then it receives a GCM message which I do not understand where it comes from but I can see that the device is not registered in my server. I also used a HTC phone with 2.3.3 android software and stil same result. Can any one see what the problem might be?
On the emulator it should normally not work, because it will not have a google account tied to the device. It is requiered for a device to have a google account and Google Play installed to register for an id.
The phone on the other hand should work.
GCM will Work from Android 2.2.
Refer this tutorial it may help you,
http://androidv5.wordpress.com/2012/08/15/how-to-implement-google-cloud-messaging/
it works fine for me.