Turn auto-sync on in Android emulator - android-emulator

I've found this problem a few times on the web, but no answer:
I'm running an android application (using C2DM) on an emulator using a google api avd (api 8 upwards, tried a few of them). I've managed to register a google account on the device, but it says "sync is off".
Anybody knows how to turn this on?

Try the latest version of Google API's Add-on with an emulator and it may have solved the issue of using the account's sync on. as described here. Not guaranteed though !

You need install Google Apps

Related

Pass safetynet check in Android emulator

I wonder if it is possible to make an Android emulator pass safetynet.
I made an emulator with google play services installed. I installed magisk and installed the universal safetynet fix but still basic integrity and CTS profile fails.
When I google search this question there aren't a lot of results on this topic but the one I found suggested that it is not possible..

Cannot create a work profile The security policy prevents the creation of a managed device because a custom os is or has been installed on this device

I have 5000 devices enrolled with EMM using android management API and recently I am getting issues with multiple devices out of nowhere and getting and error prompt after scanning the QR code on re-enrollment. All of my enrolled devices are Samsung Tab with the older version of android(7-9) and the issue doesn't seem to be related to the android version. Also, The issue has been experienced for the device which was earlier enrolled and was working fine but recently has this issue, we tried re-enrolling it but it gives us the same following error prompt after QR scan.
Cannot create a work profile - The security policy prevents the
creation of a managed device because a custom os is or has been
installed on this device
For your kind information, there is no custom os installed on the device and the device is not rooted or bootloader is not unlocked. I have researched a lot over the internet but cannot find a solution to the problem I have tried following approaches but it doesn't seem to work in my case
To fix this, you will need to update the time on the device by either connecting to wifi or cellular data (insert SIM-card), or by manually changing it in the set-up screen. After this is done you will be able to provision the device.
Tried DPC Identifier method for enrollment, When prompted to sign in on fresh factory reset device, enter afw#setup, which downloads Android Device Policy. Scan a QR code or manually enter an enrollment token to provision the device.
None of the above seems to work for me, I have also seen that its an issue related to Samsung Knox version, so can anyone from Samsung or google help me debugging and solving this issue, will removing the Knox app from the device work in my case.
Eagerly awaiting for the response as most of my device has started getting affected with this issue, please let me know your thoughts and resolution on this.
Not sure if that's an option for you as you have multiple devices, but on my single device, manually downloading and installing "google apps device policy" resolved the issue.
Been a lurker for a while and posting for the first time
Work as IT helpdesk and found a fix for us (context below)
We use Azure, InTune and Samsung Knox
Needing to assign a Knox profile so an application installs and runs
How we fixed this
Unassigned Knox profile
Ran tablet normally, skipping setup of Google, Samsung account and security
Running Samsung updates until current (24th Feb 2021)
Reassign the Knox profile
Factory resetting through settings
run through the setup process
Error has stopped at this point
You can either use Wi-Fi or SIM Card Data for OS updates through Knox
I had the same problems and this is how i fixed it. I have Samsung Tablet Android 10 and need to set it up under Enterprise.
Straight out of the box, you expand the OS, set up Network connection and than type in the google gmail space: afw#mobicontrol. This Does Not install the custom OS. Once expanded the OS has all the bloated software in tact plus the Mobicontrol app. I kept getting an error 'Can't Create Work Profile because Custom OS is installed on this device'. I did a factory reset but did so by powering it off than using the Power Button and Up Arrow to force it to the Android Recovery Screen. There is a factory reset option to choose from. "This Does Not Work". It still keeps the bloated software in tact.
You need to expand the Android OS first than do a reset. Go to SETTINGS. than ABOUT. at bottom is a RESET option. Choose that. Choose Factory Reset. This will delete all those apps. It reboots. Now you can enter afw#mobicontrol at the google email screen and it will install the custom OS and works under Soti.
Reset From the SETTINGS and do a Factory Reset. Than type in AFW#MOBICONTOL and the custom OS will work.

FIREBASE_AUTH_API is not available on this device

I have followed the new Google Firebase guide for Facebook sign-in on Android but I am consistently getting the following error on a particular device.
FirebaseAuth:signInWithCredential failed
com.google.firebase.FirebaseApiNotAvailableException: API: InternalFirebaseAuth.FIREBASE_AUTH_API is not available on this device.
On other devices it seems to work fine. The device is Moto X Play running Android 6.0.1. It also has Google Play Services 9.0.83. I tried a complete uninstall and reinstall with no luck.
This was a bug affecting the 9.0.0 and 9.0.1 versions of the SDK. It has been fixed as of SDK version 9.0.2.
Update the Google repository via the Android SDK manager and then change your gradle dependency to:
compile 'com.google.firebase:firebase-auth:9.0.2'
See incident details here.
As Alfonso says in the comments, there is an issue we are seeing where some users don't have the Firebase Auth API available even though they have Google Play services 9.0.83.
That's a bug - sorry about that - and is being investigated at the moment. If you're seeing it, please raise an issue in the troubleshooting page with any further details of the device where you had the problem.

Running Instagram on AVD

I wanted to use Instagram on my computer, so I decided to use an Android Virtual Device for that task.
I downloaded the Android SDK and the newest apk for instagram for my computer.
Then I created a new AVD and ran it. After it was booted, I installed the instagram apk using adb install instagram.apk.
It installed smoothly and after clicking the app, it started.
Now here's my problem: From there on nothing works.
When I try to login and I press the login button, nothing happens like there would be no internet connection.
Browsers and other apps using an internet connection work just fine, just instagram doesn't work.
How can I fix this?
I think it has something to do that the android Emulator can't really handle a global proxy.
Therefore hostnames get resolved directly to their IP which violates HTTP 1.1 standarts and the request doesn't get send properly.
To fix this, it is needed to change it so the hostname gets send instead of the IP.
You should try creating an AVD with different settings. More RAM and allowing GPU emulation is a good idea. If you insist on using an AVD and you have an appropriate intel CPU then you can make the emulator run much faster by following these steps. They are a bit complicated, but worth it if you want the emulator to run quicker.
I typically try to avoid using the Android emulator while I am developing apps. It has its uses, but it tends to be slow and doesn't have all of the capabilities of actual devices.
As an alternative to using an AVD, I would recommend downloading and installing BlueStacks. BluesStacks was written from the ground up to allow running Android apps on your Windows PC or Mac. I have used it before and it does a great job. Much better than an AVD.
Try visual studio emulator for android. Instagram works on it with enabled and connected wifi. This emulator works better than BlueStacks.

Running Android app in PiP mode

Is it possible to put Google TV Android app in PiP mode (not full screen)?
I think this would be a nice feature.
Currently, the only app that is able to run in PiP mode on Google TV is the "Live TV" app. We've passed the feature request on to the Google TV product development team, and we'll definitely let the dev community know if/when it's part of a release!
EDIT
There's a feature request opened for this at:
http://code.google.com/p/googletv-issues/issues/detail?id=13
If this is an important feature to you, add a star!
In Android 8.0 oreo, they support the custom pip mode now. The document is here.
https://developer.android.com/guide/topics/ui/picture-in-picture.html
Not only works for the tv devices but also mobile devices.