I do not know exactly what AVG did for your application. But I think that AVG may not allow your application to turn on Bluetooth or use Bluetooth when the Android device is in sleep mode or sends / receives SMS. AVG is a type of anti-virus application, most of which have many resolution or energy saving restrictions, especially on Android root devices or the first application on Android devices.
Try to clarify what exactly with AVG real place in your application. Then try to solve your problems with the help of the gentle and smart.
For instance:
1.If AVG does not allow you to use BluetoothAdapter.enable () to force Bluetooth on, try using Activity.startActivityForResult () so that users can choose whether to enable Bleutooth or not.
2. If AVG does not allow you to use Bluetooth when your Android device is in sleep mode. You can try using WakeLock.acquire () to store your Android device.
3. If AVG does not allow you to use sending or receiving SMS. You can change another communication protocol, SPP or BLE or something else.
You may have heard Xiaomi. If you are an Android developer in China because Xiaomi is very popular in China, you have to deal with the adaptation with Xiaomi, and then you will find that Xiaomi is really fucking for Android developers in China.
Xiaomi has no really amazing things for the original Android. For instance:
1. AlertDialog..getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
you cannot warn the TYPE_SYSTEM_ALERT dialog on some xiaomi drives that they say nothing.
2.Xiaomi has changed many original themes.
3.Xiaomi has changed the Android alarm synchronization mechanism, while the device is a dream called Wake-Up-Alignment. This is really terrible for apps with a sync feature.
The above problems are that I met in Android development, some problems I can solve, some you have no chance to change it.
Remember that: the adaptation with Android devices is that you have to tell your users that the application works on most popular Android devices, developers are trying to get the application to work on most Android devices, but maybe this does not work on some Android devivces with customized ROMs or with some special applications of the third part. What is it true that Android.
If the problem cannot be solved, this is not a problem!