QuickBlox, how to create 1:1 chat - android

I've been bumping my head to the wall for hours now, I'm trying to make the simplest chat activity using QuickBlox, so far I've managed to create users and sign them in, the problem comes in when I call:
chat = QBChatService.getInstance().createChat();
It throws an Illegal state exception saying that I have to be logged in, I can't find anything on how createChat works so am wandering the dark here .. any help is really appreciated.

Soooo.. I got it to work, and am not telling you how :# lol, all I had to do was to log in using:
QBChatService.getInstance().loginWithUser(..);
As simple as that !

Related

Which ParseException may be thrown on signup/login attempt

I'm developing an Parse based Android app and now working on signup and login screens, but I don't know which ParseException should I handle.
I wanna give the user the right feedback for each error and there's no documentation at all about wich code I should look for on SignUpCallbackor LogInCallback.
Is there any place where I can find it or should I test all cases I wanna handle and check the code?
I'm still not sure if I'm handling all possible errors, but these are the ones I got in my tests:
For signup: CONNECTION_FAILED, EMAIL_TAKEN and USERNAME_TAKEN.
For login: CONNECTION_FAILED and OBJECT_NOT_FOUND (for unregistered and pass missmatch).
There are also these: EMAIL_MISSING and PASSWORD_MISSING, but I'm not even handling these because they are client side prevented.
I hope this helps.
Update:
I recently found this link that shows every error code possibly returned by Parse, although it still doesn't say when they can happen.

AppRequest Dialog does not appear

i am currently building a game with Unity for Android.
I want to use the AppRequest feature from the Facebook API.
User should be able to challenge their friends.
I implemented it just like in the tutorial (https://developers.facebook.com/docs/unity/reference/current/FB.Apprequest)
FB.AppRequest(
message:"message",
title:"title",
callback: appRequestCallback);
I have the following permissions:
basic_info
publish_actions (to post the score)
friends_games_activity (to see the scores of the friends)
And yes, I am logged in. I check that directly before that.
I tested it with development mode on and off.
If I run the game on Android and click the button that calls the method, Facebook tries to load something, but it will never appear. I see the load-icon (this turning circle thing) but nothing appears and I am back in my game. It looks like everything is directly cancelled.
If I run the game in the Unity Editor everyhing works just fine. I can see my friends and send them requets.
What am I missing? It's driving me crazy.
Do I need another permission?
Everything else works perfectly with the FB SDK.
I have encountered a similar problem with Facebook Unity SDK, which was solved by passing more parameters - these marked as optional too.
It shouldn't work like that, but they're still working on that plugin, so maybe you could give it a try, and specify all parameters you can, or manually pass them default values.
I found the solution.
I passed to many characters in the message and title strings.
Therefore my question was maybe misleading, because I replaced the strings with short dummy values.
If you encouter a similar issue:
The length of message should be at most 60 characters.
The length of title should be at most 50 characters.
I tried it on another phone got an error message there. On my phone the dialog just did not appear.

HTTP response code -1 on android phone - using appinventor

I am building a simple search app through MIT AppInventor. I have had no problems in querying my spreadsheet shared as public on the cloud.
Suddenly, for no reason, my GET request to the HTTP fails with a response code of -1. I have looked everywhere but can't find an explanation for this -1 code.
Let me repeat that the same block of codes was working perfectly fine until this happened. Now I can't figure out what is going wrong. Any help will be much appreciated.
I solved this problem when I found out that my target spreadsheet link, which used to start with http:// was changed to https://. I found that my browser redirected me to https:// when I tried to run my query directly on the web. So changing that in my code fixed the issue.
I came across a similar issue recently. It used to work and I found out that my get request was being redirected to a login page being the session had expired.
I suggest you open the get request using the webviewer component (or activitystarter) to give you a better understanding of where the error is coming from.

Retweet for Android API problems

Hello all and first thing to apologize for my poor English.
I wanted to comment my problem on the attempt of the integration retweet on my android application.
So far I managed to authenticate with OAUTH and even I have been able to send a tweet.
My problem starts when I want to be able to send retweet from a ID that I have saved in a class.
I have tried almost everything, Ive been dozens of hours looking for information on this, but without knowing if I on the right track.
trying to create a getRetweetsById function
trying to make http GET to the address:
https://API.Twitter.com/statuses/retweets/21943348.json
... getting the same response in all cases
It doesnt work.
If someone could guide me which is the appropriate method and the steps i should follow I would be eternally grateful.
Thanks and best regards
hey try following code
Twitter mTwitter = TwitterFactory.getInstance();
mTwitter.retweetStatus("send ur id here");
thanks
santhu

Android In App Billing DEVELOPER_PAYLOAD not coming through

I've been playing around the the Dungeons app and also my own billing code and pretty much have everything working except for one strangeness.
It seems that no matter what I do I can't get the DEVELOPER_PAYLOAD to show up in the JSON signed response. If I'm reading thing right, the docs seem to say that I should see the developer_payload in the JSON market response. The Dungeons app seems to think it should see the developer_payload in the json too.
I haven't gotten it to work in my code and it doesn't seem to work in the Dungeons example either on my phone.
Here are some snippets of my code:
Bundle request = makeRequestBundle("REQUEST_PURCHASE");
request.putString(C.DEVELOPER_PAYLOAD, "testing 123");
C.DEVELOPER_PAYLOAD is:
public static final String DEVELOPER_PAYLOAD = "DEVELOPER_PAYLOAD";
And here's what I'm seeing in the purchase state changed responses
05-14 20:13:08.360: INFO/BillingService(715): purchaseStateChanged got
signedData:
{"nonce":9005407554096378381,"orders":[{"notificationId":"android.test.purchased","orderId":"transactionId.android.test.purchased","packageName":"com.mypackage","productId":"android.test.purchased","purchaseTime":1305429187752,"purchaseState":0}]}
Thanks in advance!
EDIT: I finally figured this out. Turns out that the developer_payload doesn't come through if you're using any of the test android item ids. You have to be using real in app purchase items.
I finally figured this out. Turns out that the developer_payload doesn't come through if you're using any of the test android item ids. You have to be using real in app purchase items.

Categories

Resources