ICS Emulator will not create Calendar Account - android

Please help. I absolutely need to be able to test the Calendar.contract provider in my app using the SDK emulator. Purchasing a $400 hardware device just to test is not a real option.
I have seen the posts that remind us that we need to target the Google API platform, which we have done. Next, I have seen a work around where it is suggested that we create a google account as an exchange account by specifying the m.google.com server and clicking "Accept all SSL". Unfortunately, that generates the error that:
You have typed an incorrect server address or the server requires a protocol version that Email doesn't support.
We created a basic Google account. However, the emulator still says we must create at least one calendar account and forces us into creating the Echange Account. According to the emulator, the account we did create as a Google account has no calendars associated with it, even though I can go to Google Calendar, access that account, and add items to a calendar.
Can anyone suggest a solution?
Thanks,

Related

Is it possible to send app debug signing package to AWS Device Farm in order for them to resign app with it instead of their own package?

We are using AWS Device Farm for running our Appium TestNG automation tests for Android. Our app uses Google Maps and our API returns locations of some stations on the map in order for the user to navigate to them. In order for the app to get a response from API, it needs to be registered on our back-end (application's signing package must be added to the "trust" list).
Our problem with AWS Device Farm is that it resigns Android application with their own package when we upload it to AWS DF.
Because of that our API doesn't recognize that app and doesn't send the response to it, so on AWS DF device we get neither map nor stations, but just "gray" screen. In that state our app is untestable.
In one post on the AWS DF forum, they mentioned (3 years ago) that AWS is working on the possibility for users to send their own debug packages for AWS DF to resign the app using them.
This would solve our problem, but there is no updated info on it neither on forum nor documentation. I tried asking this on the AWS DF forum, but it's almost a month gone and there is no answer to it, not even some advice or suggestion.
Does anyone know is it possible to send a debug signing package to AWS DF for resigning the app with it or maybe some other way for apps that must be signed with specific package to work on AWS DF?
You can skip the app resigning in Device Farm using their private offering. However, this offering is much more expensive than the default metered public offering. The pricing page points us to this email for more info about the price:
aws-devicefarm-support#amazon.com
Otherwise, this is still expected behavior as discussed in the FAQs.
https://aws.amazon.com/device-farm/faqs/
Q: Do you modify my app?
On Android, we resign the app. This may break functionality that depends on the app signature, such as the Google Maps Android API. It may also trigger anti-piracy and anti-tamper detection available from products such as DexGuard. For built-in tests, we may modify the manifest to include permissions required to capture and save screenshots.

In-app purchases with multiple accounts

I am facing a problem with in app purchases/subscriptions:
If there are multiple accounts on the device, I can't get the purchases, which were made with the second account.
This can sometimes be temporarily fixed, by installing the app from the Google Play web interface, but after a while, the purchases won't appear in the query, forcing the user to reinstall.
I am using the IabHelper classes from this sample.
Doing some Google searches, I found that this bug exists since a while, but unfortunately I couldn't find out if the error is in the IabHelper classes or on Google's side.
I'd like to draw attention to Google, so they provide a proper fix for this, either in the IabHelper classes or in the Play Services or to provide information, how this should be handled.
I am using the code in an app with (at the time of writing) 900.000 active user installs and I have to trigger quite a lot of refunds, due to this.
If there is a fix for this, which I missed, please let me know.
Edit:
Sometimes it's not possible at all to retrieve the purchases, even if there is only one account on the phone.
It seems like there isn't a one way road to solve this, but let's try do this.
When the user first install the app get his/her primary email or all accounts on the device
Ask the user what email will they be using for future payment/ or which account is active for google play.
you can use this code to get the account
Pattern emailPattern = Patterns.EMAIL_ADDRESS; // API level 8+
Account[] accounts = AccountManager.get(context).getAccounts();
for (Account account : accounts) {
if (emailPattern.matcher(account.name).matches()) {
String possibleEmail = account.name;
...
}
}
Don't forget to ask for permission
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
After the user selects the email, you can send a link via email to confirm this email address
Lead all the payment to that specific email.
Method 2
Use the new "Send & Receive money using Gmail" future
Create a email intent and send specific data to the email intent and make payments.
Upon success, send a code to the user email
Use the code to activate whatever purchased they make.
Method 3
Use another payment library or gateway for your in app purchase instead of Google play.
As others have noted, this is a bug with the Google Play Billing Library. If it affects you, star this issue on https://issuetracker.google.com/issues/139597485 so Google can notice it (really?) and start working on a fix.
It is sure a bug in the in-app billing service apis. This is a similar question and as mentioned in one of the answers, may be you need to introduce login mechanism and store the purchases made from an account to your server or locally on the device in an encrypted file or something similar.
I had ran into same problem couple of months later.
After hours of finding solutions and all i came up with a work around something like this,
You can use OAuth 2.0.
But you also have to manage it from your backend.
I am not a backend developer so i didnt know how exactly it does in backend but at app side i have done something like this,
You can use the first Google account allowing authentication on your serve side. OAuth 2.0 is a tool that simplifies and get developers an easy way to allow users to access your application. The OAuthHmacSigner class does manages the authentication.
signer = new OAuthHmacSigner();
signer.clientSharedSecret = Constants.CONSUMER_SECRET;
Then the Android activity uses the following code to launch the OAuth flow :
launchOauth.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
startActivity(new Intent().setClass(v.getContext(),
PrepareRequestTokenActivity.class));
}
});
In order to get an OAuth 2.0 access token, you simply need to call:
AccountManager.getAuthToken()
I Hope this might help :)
I have two accounts, but one does not work. What I did is I went into android's settings, and then went into account preferences. I changed my main account from the one that does not work to the working one. Then I assigned the new account to be the main one for all of my applications, including google play. That worked for me. Sometimes, if it does not work for some reason, you can also go online and access the Google Play store from the internet.
Try to get dup...duplicate dot with file signature ending in .apk or .xcode
I'm not sure if this is the answer you're searching for, but perhaps setting up a shared Google Play Family Library would suffice. It works for up to 5 users sharing the same purchases (app, music, movies, etc), if desired.
(See: https://support.google.com/googleplay/answer/7007852?hl=en)

Where is AccountManager in Amazon Kindle HDX?

I have implemented the AccountManager workflow to add accounts to my service in the standard Android settings screen.
In typical Android devices, I successfully get my App's icon, settings, login workflow, etc. in the "Accounts" section of the settings screen, and I am able to add accounts.
However, in an Amazon Kindle HDX, even though the API exists, and in my App details I can see the permissions are identified (android.permission.AUTHENTICATE_ACCOUNTS, ...), I can't find the AccountManager anywhere in the settings screen. Everything seems related to Amazon authentication. The closest thing is "Social Network Accounts" under "My Account", but only displays Facebook and Twitter, and seems a proprietary account manager rather than Android's.
Does anybody know if
The standard Account list exists in Kindle HDX?
The AccountManager API is the way to go? or shall I write a custom account dialog in case the App is running on a Kindle?
Regarding the second question, Amazon claims the API is supported https://forums.developer.amazon.com/forums/thread.jspa?threadID=906 but if accounts can't be listed or managed, I suppose it's better to use a proprietary approach. Am I wrong?

Android Emulator: Calendar application will not synchronize with google calendar

I would like to reopen this question since I am having the same problem:
Use Calendar within emulator Android 4.0 +
Namely, I see a Calendar application on virtual devices running android 4.0
or later (there is no calendar application on android 3.2 even though my physical
gingerbread phone has once such an app, which I find strange). However I am not
able to synchronize the data on the android 4.0 or later emulator with my google
account's calendar data. Here are the details:
I had created an Android 4.2.2 emulator and launched the calendar application
from within such an emulator. I want to sync my google account with the calendar
application. So I hit menu -> Settings -> ADD ACCOUNT. Nothing happens. So I tried
to hit menu -> Calendars to display -> Calendars to sync, but the list is empty
and hitting menu does not bring up a menu.
I suspected the problem was I needed google apis to work. So I created a new
4.2.2 virtual device with google apis. When I launched such emulator and then the
calendar application I got a screen saying "Make it Google", "Do you want to add
an existing account or create a new one?". Click on Existing. I entered my
sign in details. I click on the popup asking me to agree to google terms
of service, and I accepted. It then says "Signing in..." "This can take a few minutes."
The Backup and Restore screen shows up and I click forward and proceed. However I
do not see the contents of my google calendar's account on the android calendar.
When I launch the calendar application again it asks me once again to
"Make it Google" and enter my account information. If I enter the old
information it complains telling me I have already specified such an
account. However my google account's data does not show up in android calendar.
I cannot understand why or what I am doing wrong.
(Alas I do not have a 4.0+ phone to test with so I am stuck having to get
the emulator to work).
Thanks for your feedback,
Jason Posit
I know this is older, but I did find a solution. I was never able to get a Google account to work since Google blocks active sync on free accounts.
The solution for me was to signup for a free outlook.com account and use outlook.com's active sync settings.
The steps I followed are from my blog and are as follows:
Sign out for free account at outlook.com
Select a Corporate Account
Enter username such as email#outlook.com
Select Manual Setup
Select account type of “Exchange” (This will allow us to sync with active
sync)
Enter Server as s.outlook.com
Security type as SSL/TLS
Select next
Confirm settings.
As "Corporate Account" type isn't being provided in newer emulator images, one can install custom CalDAV adapter, which amusingly does work with Google's CalDAV interface.

How to use and test the Android 4.0 Calendar API in the emulator?

Do most use real phones to test Google Account specific Android features? For example, I want to develop/test the Ice Cream Sandwich calendar api and in the emulator I can add a Google Gmail account to the operating system, but the calendars never seem to sync.
Here's a related post:
How to read and edit Android calendar events using the new Android 4.0 Ice Cream Sandwich API?
My question is how do you test it? I'd like to upgrade my nexus s phones and the galaxy 10.1 tablet but I'd also like to make sure the upgrade will be safe. It would be nice if the emulator could support limited sync'ing, etc.
Thanks.
One work around is to add you Google account as an Exchange account -- see http://www.google.com/support/mobile/bin/answer.py?hl=en&answer=138636&topic=14299 for info.
Basically, enter your gmail address, but change the server it connects to to m.google.com and enable SSL.
I was never able to get a Google account to work since Google blocks active sync on free accounts.
The solution for me was to signup for a free outlook.com account and use outlook.com's active sync settings as I did not have access to an Exchange account.
The steps I followed are from my blog and are as follows:
Sign out for free account at outlook.com
Select a Corporate Account
Enter username such as email#outlook.com
Select Manual Setup
Select account type of “Exchange” (This will allow us to sync with active
sync)
Enter Server as s.outlook.com
Security type as SSL/TLS
Select next
Confirm settings.

Categories

Resources