Dropbox on Android, onResume() fail - android

I tried to implement dropbox on android, but even "example" from dropbox page won't work. In code below i changed only my Key (to "MY_KEY"). It shows this error during "log in" process because session.authenticationSuccessful() is false. and thats because mApi.getSession().startAuthentication(DBRoulette.this) and/or mApi.getSession().startOAuth2Authentication(DBRoulette.this) propably failed. But in my opinion everything should be ok - i have correct my Key and Secret, permisions and key in manifest and also configuration of libraries should be fine. I also tried implement this example but still with the same error. I can post more info if needed, but basically i didn't changed code at all - only tried to change some methods that i found, but without success.
Error during "log in" proces.
12-02 16:11:34.014: E/AndroidRuntime(1501): java.lang.RuntimeException: Unable to resume activity {com.dropbox.android.sample/com.dropbox.client2.android.AuthActivity}: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=https://www.dropbox.com:443/1/connect?locale=en_US&k=MY_KEY&s=&state=oauth2:d953b22cfa534a73ba088fc6fd03e47a }

Well, I didn't know Dropbox on phone needs internet browser (even when someone use all keys, secret, persmissions and so) - In video tutorials i watched they simply skip this part because of private information. I also didn't know, that even when i used AVD from latest API it won't have internet browser. And no internet browser is mentioned in examples and it was only thing missing.
So changing AVD fixed problem.

Related

Dropbox AuthActivity from Android. Fails with "User may have restricted profile"

I'm trying to modify an existing app (that uses Gdrive) to work with Dropbox. To that effect, I'm adapting code from https://github.com/dropbox/dropbox-sdk-java/tree/master/examples/android.
Unfortunately, I'm stuck at the first step: Auth.startOAuth2Authentication
Android Studio's log shows the following:
08-02 13:13:30.338 7994-7994/rudy.android.stdb E/com.dropbox.core.android.AuthActivity: Could not launch intent. User may have restricted profile
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=https://www.dropbox.com/... }
Any ideas?
This error seems to be indicating that there is no app available to handle this intent to view the supplied URL, i.e., there is no browser installed. It sounds like this may be due to the use of a Restricted Profile.
If there isn't a browser or the Dropbox app available, the SDK won't be able to process the authorization flow. If this is the issue, you should enable a browser or switch off of the Restricted Profile.
[Cross-linking for reference: https://www.dropboxforum.com/t5/API-Support-Feedback/Auth-startOAuth2Authentication-Android-returns-quot-User-may/m-p/288600 ]

How to integrate mirrorlink common api in android Application

friends I am new in mirrorlink common Api.I don't know to enable mirror link service in android application.Please anyone tell me steps and any tutorial link.
I already do following things :-
I get developer account from mirrorlink.com.
I attached certificate with my app(that get from software that available from https://causeway.carconnectivity.org) Documents.
I saved device EMI number in my ACMS account (https://acms.carconnectivity.org)
Now I know I missing mirror link code for launching and terminate all this code and permission in manifest file.
Actually, I don't know how to code in the application for mirrorlink. please help me for step no.4
The launch and terminate UPnP code should be placed in the MainActivity. For certification purposes, your app needs to handle the Terminate intent without coming to the foreground (if it is in the background). Even if you don't respond to the intents, the app should be usable in MirrorLink.
You don't need to do anything extra to enable framebuffer streaming, or audio streaming. (Though providing context information via IContextManager.setFramebufferContextInformation and IContextManager.setAudioContextInformation is needed to make sure that the head unit knows what is being provided to it.)

Cannot get google-services.json file for Google Play Services

I am currently working on updating the Google Login process in my app using google-services 3.0.0 and play-services 9.6.1 and am having troubles getting the required google-services.json file to include in my project.
I am following the setup guide and trying to get the json file from https://developers.google.com/mobile/add?platform=android.
When I pick my app from the dropdown menu I get a 'bad request' error message.
I went ahead through the process anyway, choosing only Google Login for the service but I still get an error when I attempt to download the google-services.json file
This is what is returned when I attempt to download the file
)]}'
{"code":3,"errorSpace":"generic","placeholders":{"trackingId":"123456789"},"status":400,"message":"backend error"}
Looking at the form that was sent in Fiddler, the query string is
["getArtifactRequest",null,"android:my.app.package","2","123456789"]
(After replacing the trackingId and the project Id numbers in these two requests)
Attempting to go back through the process gives me an error stating that the package already exists (Which it does). Other places seem to imply that I could use this method repeatedly as a way to re-generate the json file though.
The app was already listed in the OAuth 2.0 client IDs on the developer console site when I did this. I also went through it a second time for a debug version of the app which was not already created, but I received the same messages and outcome.
Has anyone else seen this issue and found out how to fix it?
After switching projects for a bit and checking back today, I went through the same process as listed and it worked just fine. I haven't changed any settings, so maybe it was a problem on their end for a while. Wish there was something more helpful to say about this, but it just works now.

can't authorise moves through app link

We are developing an app that should get data from the Moves app API.
When authorising our app on the mobile phone, we manage to do so successfully in the case in which we submit the PIN provided by the desktop link into the moves app:
https://api.moves-app.com/oauth/v1/authorize?response_type=code&client_id=<client_id>&scope=<scope>&state=<state>
In the case where I use the Mobile website / app link instead, this won't work:
moves://app/authorize?client_id=<client_id>&scope=activity%20location&state=<state>&redirect_uri=<redirect_uri>
Note: <redirect_uri>==encodeURIComponent("mymovesconnector:8081/callback").
The response we get from the Moves API is 400: {"error":"invalid_grant"}.
From the docs, it says that invalid_grant can happen if either:
the code in the request is not valid or
the code has expired (it’s valid for 5 minutes currently) or
the code has been revoked, because it was already used in an access token request (both successful and unsuccessful requests will revoke the code) or
you are missing the redirect_uri parameter when it’s required.
My checklist:
I guess this could have happened, but how/why should this code, provided over moves://, be different than the one provided through the https:// request? What control do I have over this?
not my case, since I'm using the code right away within less then a few seconds
if this might have happened, where could it happen other than through the redirect url?
I'm providing it always. It's always the same - also in the app settings on moves.
Can't figure out what I'm missing. Went through the docs many times, step by step. No success.
While writing down my question, I managed to figure out a solution to this problem.
The docs don't point out that response_type=code might also be used for the moves:// link. I tried to add this parameter, and it worked!
Note: this has been tested on a virtual android device only (Genymotion).

what is keycharmap file? why am i getting 'cant open keycharmap file' warning?

I am developing app using facebook API.
When I push 'login' button from my app,
I am getting 'can't open keychar map file' warnning.
application is running fine but this still bugging me out because
login progress is too slow.
can anybody tell me what is 'keycharmap' file?
why am i getting this warnning?
It's possible this problem is unrelated to the time your login is taking. Have you tried logging in through the facebook api in a different environment, like the device browser or a desktop browser? You could compare the time difference.
Have you checked to see if this error is logged elsewhere? I found these bug reports: http://jira.appcelerator.org/browse/TIMOB-2891, http://code.google.com/p/alogcat/issues/detail?id=19, which might be related. Might be worth checking to see if the error is logged when running other apps, and see if it happens with further logins beyond the first. Could be outside your app.
Does your login button fire a virtual key event or something? I wonder why the app is trying to access the keycharmap file in the first place. If you can figure out which line of your button handler code causes the warning to appear, you might be able to track down the cause.

Categories

Resources