I am trying to run the AWS android samples from https://github.com/awslabs/aws-sdk-android-samples
I have included the following jars in libs:
aws-android-sdk-2.0.4-cognito.jar
aws-android-sdk-2.0.4-core.jar
aws-android-sdk-2.0.4-s3.jar
Also I have added the AWS_ACCOUNT_ID, COGNITO_POOL_ID, COGNITO_ROLE_UNAUTH, BUCKET_NAME
this is the logcat
When im runnig this sample, action and then program shuts down.
What is problem?
I don't know what to do.
The stacktrace shows accountId is malformed. The accountId isn't your login email of your AWS account. Instead, it should be a 12 digit account number. One way to find it is to go to console -> My Account (top right corner).
PS: consider use the latest SDK version v2.2.2. It has lots of improvements compared to v2.0.4. You can find it at http://aws.amazon.com/mobile/sdk/.
Related
I am trying to implement a simple subscription IAP on Android using the Amazon SDK. I adjusted their subscription sample app. The code is really simple.
Set <String>productSkus = new HashSet<String>();
productSkus.add("TLS_SKU_MONTHLY" );
productSkus.add( "TLS_SKU" );
PurchasingService.getProductData(productSkus);
But the response from onProductDataResponse() is always fail. I'm not sure why, I cannot find any examples etc to even know if my SKUs are right, in the sample app they looked more like package names than this, but these strings are what I entered on the 'in-app items' on the apps page on Amazon. The app has not been submitted yet, but I need to test and implement IAP before that. Any ideas? I cannot even find a simple tutorial walking through this, and as usual their docs are poor.
edit, noticed im getting these errors that dont even come up on google
Kiwi: DataAuthenticationKeyLoaderV3: Unable to load authentication Key
java.io.FileNotFoundException: AppstoreAuthenticationKey.pem
DATA_AUTH_KEY_LOAD_FAILURE: CERT_NOT_FOUND: null
com.amazon.a.a.o.b.a.a: DATA_AUTH_KEY_LOAD_FAILURE: CERT_NOT_FOUND: null
I'm wondering, is this because I am running on real Android and not an Amazon device like a fire tablet or tv stick?
You should add your own AppstoreAuthenticationKey.pem to the project assets folder. It is not (and should not be) delivered together with the sample.
Basically, you must do a few things:
Login to the Amazon developer console and create your application.
Go to the “Apk Files" tab to download AppstoreAuthenticationKey.pem.
Add this file to the project’s assets folder.
You can get the full instructions from Amazon.
As for devices, yes, you must use an Amazon device. But this should not be the reason why you are getting this exception.
I am sending push notification using firebase console and i am getting "0% of potential users are eligible for this campaign: 0". and push notification is not displaying in mobile..If anyone got same experience and solve issue then please suggest me how can i solve this issue. I followed all the thing..that i added json file that i got from firebase.
Please check for the following:
Have you configured your android package name correctly.
Did you place the google-services.json file in android/src folder.
Make sure you have done all steps present in this link (If you using android studio i suggest going with option 2)
Get user token to send firebase message Follow the steps
After all these if you still can't receive push notifications try setting channelid in advanced messaging options
Refer https://firebase.google.com/docs/cloud-messaging/android/client link step by step and you will be good to go for your push notification using fcm and if you already implemented the basic things then compare your code with the sample code step by step mentions on the link. you must find out the error. let me know if it resolves your issue.
Go to Build --> clean project -->Rebuild project
(Build is at top in android studio)
Why it was not working - You must have had deleted google-services.json file and re-added it.
Make sure you have only one firebase project configured for this app (if no then delete one you dont plan to use)
Go to firebase setiings -> Left top angle -> settings icon -> Project settings ->
scroll to bottom, then make sure to add SHA certificate fingerprints Type. How to get it
Then (still on this page) press See SDK instructions button. And place google-services.json file in your project.
If all this steps passed for you and you still getting this error then just wait a little bit, for me it take 2 days, before it started working.
Problem: Firebase Management API method projects.addFirebase returns status code 403
Steps to recreate:
In an Android application I need to create separate Firebase Accounts for Realtime Database. For this purpose I authenticate users with GoogleSignIn.
Then I retrieve token with proper scope "oauth2:https://www.googleapis.com/auth/cloud-platform".
In next step I use GCP Resource Manager API to create a new GCP project, which will be a container for Firebase project.
The new project is created successfully on each of the test accounts.
When I try to call Firebase Management API method projects.addFirebase using the same token I got earlier (same scope) I get error "The caller does not have permission". This error occurs on 3 out of 4 accounts I have tried.
I was able to reproduce same error also using google-apis-explorer. Apis Explorer
I will be grateful for any hints on how to resolve this issue. As I mentioned earlier this error does not occur on one of the accounts I tested, while on the remaining three it happens every time.
Thank you.
Update
#Doug thank you for taking time to look at my problem. It seems that I have found the cause. After accessing https://console.firebase.google.com and clicking "Add a project" a following popup showed up (I can't paste it directly, because my reputation is too low):
Popup link
After I checked all consents and added first project I am also able to make api calls successfully.
It looks like I my question should be: Is there a way to grant required permissions through Resource Manager Api calls so I can add Firebase to existing Cloud Project?
Also for the reference I paste the method I use to call projects.addFirebase, it uses RxJava2 (Android) and Retrofit2.
#Headers({"Content-Type: application/json"})
#POST("projects/{project}:addFirebase")
Single<Operation> addFirebaseToProject(#Header("Authorization") String bearerToken,
#Path("project") String project,
#Body FirebaseDataModel dataModel
);
Thank you for your help.
Ps. sorry for my bad English, it's not my mother tongue.
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.
Please bear with me as I am a complete noob and trying to create a database for my app using App Inventor.
According to Google App Launcher, I have successfully created my app. However, when I load mcdougaltextspeak.appspot.com into my browser, I get the following message:
Error: Server Error
The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this error message and the query that caused it.
I am following the directions provided on http://appinventorapi.com/program-an-api-python/ and I'm sure my issue is because I am not correctly modifying the default app.ymal file
Here's what I have according to the directions:
application: textspeakedtech597
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /images
static_dir: images
- url: .*
script: main.py
I initially just changed myapp to mcdougaltextspeak, however I got a message that I needed to modify the code for python 2.7 according to this site:
https://developers.google.com/appengine/docs/python/python25/migrate27
This site also included modifications for other things, so I am wondering if my error stems from this. The directions do not make note of modifying any other code. Do I need to modify/add the code that appears on the migrate to python 2.7 page (see above link) and if so where does it go.
My app is stuck without a location to hold data.
Any advice on how to proceed is greatly appreciated.
Have you actually created an app on https://appengine.google.com?! You need to do that first, then your app.yaml should contain the appid that you have created i.e. application: mcdougaltextspeak & not what it is in the tutorial.
After you've edited the app as you want, you must then deploy the app to the Google App Engine Servers (refer to the GUI deploy). You would get detailed logs when deploying, which would tell if the deployment was successful or not.
After deploying, you can then goto https://mcdougaltextspeak.appspot.com & play around with your online app. If you still get errors, check https://appengine.google.com/dashboard?&app_id=mcdougaltextspeak for the logs & report them here.