I am trying to integrate kiip in my android app . I have downloaded the latest sdk and sample example from https://kiip.me/ developers site . Also ,I have created a new app in kiip.me site.
Everything is fine but the problem is , I am getting KPResource null so showing No Promo .
Here is the listner that I am using in onStart() method:
public void onStart() {
super.onStart();
// The Activity context has been created by now, so start a new session.
KPManager.getInstance().startSession(mStartSessionListener);
}
private KPRequestListener<KPResource> mStartSessionListener = new KPRequestListener<KPResource>() {
public void onFinished(KPManager manager, KPResource response) {
if (response != null) {
toast("Start Session Finished w/ Promo");
} else {
toast("Start Session Finished No Promo");
}
manager.showResource(response);
// Start retrieving user's location
new LocationHelper(ExampleApplication.this).requestLocationUpdates(mLocationListener);
}
Here the response is always null , so getting the message : Start Session Finished No Promo . If anyone has got similar problem then please share your views.
Thanks in advance.
Have you enabled promos for test devices in the dashboard on https://kiip.me?
It sounds like it could be a settings issue on the server side. Try logging in and switching promo frequency and adding your test device.
Finally, the issue has been resolved. I think the problem was with my device , when I tested it next day with some other device, It worked for me.
Related
After some back and forth I finally got this to work but I had to use version 0.2.0 because I followed the google guide presented in the Readme.
Anyway, Im struggling with handling what will happen when the oAuth token times out. Then it needs to open the browser again to log in or is there a background process available for this as it automatically redirects back to the app because the server remembers the user so there is no need for a new username/password input?
Im getting a refresh token like this :
if(mAuthService == null){
mAuthService = new AuthorizationService(context);
}
mAuthState.performActionWithFreshTokens(mAuthService, new AuthState.AuthStateAction() {
#Override public void execute(
String accessToken,
String idToken,
AuthorizationException ex) {
if (ex != null) {
return;
}
// Getting the access token...
}
});
Thats working fine but after the user is idle for some time it wont work. How to handle this properly?
Solution for my problem was this:
I changed to using offline_access for the token in the scope. Depending on the site/service you're login into if they accept it or not. For me it was accepted and will keep the user logged in for a long time and removes the need to re-login.
I have Branch.io deeplinking implemented in my App. Everything used to work fine, but recently (not sure how long ago, just noticed), when links are clicked from within the FB App, the returned branchUniversalObject is always null. The following code snippet is implemented and if the same link is clicked from any other App (messenger, slack, browser, etc...) the branchUniversalObject is valid and everything works as expected. I even copied the link from the FB post and pasted it into the browser and the branchUniversalObject was non-null then.
branch.initSession(new Branch.BranchUniversalReferralInitListener() {
#Override
public void onInitFinished(BranchUniversalObject branchUniversalObject, LinkProperties linkProperties, BranchError error) {
Log.d(TAG, "setupBranch: onInitiFinished: branchUniversalObject: " + branchUniversalObject);
if (error == null && branchUniversalObject != null) {
HashMap<String,String> branchMetadata = branchUniversalObject.getMetadata();
Bundle bundle = new Bundle();
if (Session.isGuestMode()) {
bundle.put(.....)
jumpToLogin(bundle);
} else {
bundle.put(.....);
BranchUtils.startBranchSubscribe(bundle);
}
}
}
}
});
Did FB change something in their App how they are handling link clicks? And if so, is there something that needs to be done on the Android App side?
Seems to work fine in the iOS version of the App.
Alex from Branch.io: this is not expected behavior. We just tried this with our own testbed apps and everything is working as expected, so it sounds like some sort of configuration issue unique to your app.
Would you mind writing a ticket for our Integrations team so we can get to the bottom of this?
I am trying to submit a score at a Google Game Play Leaderboard using the following code line:
if(mGoogleApiClient.isConnected()) {
Games.Leaderboards.submitScoreImmediate(mGoogleApiClient, "xxxxxxxxxxxxxxxxx", myScore).setResultCallback(new ResultCallback<Leaderboards.SubmitScoreResult>() {
#Override
public void onResult(Leaderboards.SubmitScoreResult arg0) {
Log.e(TAG, "getStatusCode= "+arg0.getStatus().getStatusCode());
Log.e(TAG, "score submitted: "+arg0.getScoreData().toString());
}
});
}
The score is not uploaded and I get the following error ScoreSubmissionData:
ScoreSubmissionData{PlayerId=xxxxxxxxxxxxxxxx, StatusCode=2, TimesSpan=DAILY, Result=null, TimesSpan=WEEKLY, Result=null, TimesSpan=ALL_TIME, Result=null}
StatusCode=2 means STATUS_CLIENT_RECONNECT_REQUIRED
I call the above line inside onConnected() method so it is sure that I am connected...
Try reconnecting or apply a Loop-switch sequence to handle error like this. You might want to check this example showing how to use STATUS_CLIENT_RECONNECT_REQUIRED of the com.google.android.gms.games.GamesClient class.
Base on the document:
STATUS_CLIENT_RECONNECT_REQUIRED
The AppStateClient is in an inconsistent state and must reconnect to the service to resolve the issue.
Also here is the list of AppStateClient that you may encounter.
Hope this helps.
I have found the solution.
The application i make was first build to an other Laptop.
Now i have bought a new Laptop, i installed Android Studio and tried to change some code lines. But when i submitted a Score my Google play account (API Manager) could not recognize my new Laptop because it had a different SHA1 key.
So i added my new SHA1 key at the credentials of the API Manager and everything was ok !!
need a little help. Im making an android app and integrated Soomla for a simple "No ads" purchase inside my app. Ive a purchase button which should do the actual purchase via google.
What occurs is a popup from google : "Error
authentication needed, You have to login in your google account" .
I think its a small problem, but i dont get what. I am logged in in my google account. Store in Soomla is running ( at least it says so). ive enable test purchase.Im using my phone for the purchase ofc. What i am missing?
public class NoADsButton : MonoBehaviour {
private static bool storeInitialized = false; // prevent store to be initialized twice
void Start () {
if(storeInitialized) return;
SoomlaHighway.Initialize();
StoreEvents.OnSoomlaStoreInitialized += onSoomlaStoreInitialized;
SoomlaStore.Initialize(new SoomlaAssets());
}
public void onSoomlaStoreInitialized() {
storeInitialized = true;
}
public void OnMouseDown(){
StoreInventory.BuyItem("no_ads");
}
And the item ive done as its shown in the soomla example:
public const string NO_ADDS_PRODUCT_ID = "no_ads";
public static VirtualGood NO_ADS_LTVG = new LifetimeVG(
"No Ads", // name
"No More Ads!", // description
"no_ads", // item id
new PurchaseWithMarket(NO_ADDS_PRODUCT_ID, 0.99)); // the way this virtual good is purchased
}
This usually happens when the process of publishing the app for testing wasn't done properly. Try going carefully over Google's instructions, make sure you didn't miss anything. http://developer.android.com/google/play/billing/billing_testing.html#billing-testing-test
I am trying to use facebook sdk to track total app installs. The unity plugin is working for log in, posting etc. But the FB.PublishInstall method doesn't work. I logged the FBResult object and printed it :
private void CallFBPublishInstall()
{
FB.PublishInstall(PublishComplete);
}
private void PublishComplete(FBResult result)
{
Debug.Log("publish response: " + result.Text.Length);
}
This is printed in logcat:
publish response: 0
I am totally puzzled what is wrong. The installs are not being counted in the app's dashboard in facebook. Anyone knows what I might be doing wrong?
I still don't know why there is no reponse text. But the installs are now appearing in the app's dashboard. I am guessing it takes time for the counter to kick in.