android-7.0-nougat

Android Notification with DecoratedCustomViewStyle

懵懂的女人 提交于 2019-12-04 18:06:44
I'm trying to create a Notification on Android 7 with a custom layout but I want to use the DecoratedCustomView Style from the v7-Support Library: https://developer.android.com/reference/android/support/v7/app/NotificationCompat.DecoratedCustomViewStyle.html The reason why I want to use this style is that I want to use the notification header provided by android, as the documentation states: Instead of providing a notification that is completely custom, a developer can set this style and still obtain system decorations like the notification header with the expand affordance and actions. So I

Genymotion Google Nexus 6P 7.0.0 with Open_Gapps arm 7.0.0

本秂侑毒 提交于 2019-12-04 17:57:29
问题 With Genymotion 2.8.0 , I have installed Google Nexus 6P 7.0.0 device with API level 24. After launching the device, I have flashed the ARM Virtual translator and restarted the device. Then, I have download open_gapps from http://opengapps.org/?download=true&arch=arm64&api=7.0&variant=pico for playstore and other apps installation. By drag and dropping the open_gapps zip file into the device, it is getting copied to the SDcard download folder and not installing the google apps. Please anyone

BitmapFactory.decodeStream from Assets returns null on Android 7

谁都会走 提交于 2019-12-04 13:45:46
问题 How to decode bitmaps from Asset directory in Android 7? My App is running well on Android versions up to Marshmallow. With Android 7 it fails to load images from the Asset directory. My Code: private Bitmap getImage(String imagename) { // Log.dd(logger, "AsyncImageLoader: " + ORDNER_IMAGES + imagename); AssetManager asset = context.getAssets(); InputStream is = null; try { is = asset.open(ORDNER_IMAGES + imagename); } catch (IOException e) { // Log.de(logger, "image konnte nicht gelesen

Android 7 JobScheduler get event when new picture is taken by the camera

有些话、适合烂在心里 提交于 2019-12-04 11:45:18
问题 I have a problem on Android 7 that not support the broadcast event "android.hardware.action.NEW_PICTURE" longer. I write now for Android 7 a JobService but it will not fire when a Picture is shot by the internal camera. I don't know what is the problem, can everybody help me. If any example source in the www that's for Android 7 and JobService for the replacement the broadcast "android.hardware.action.NEW_PICTURE" . Thanks for help ! Here is my example Code: @RequiresApi(api = Build.VERSION

How to set audio as ringtone programmatically above Android N

折月煮酒 提交于 2019-12-04 11:31:24
In the past, we could use code below to set an audio file as ringtone: ContentValues values = new ContentValues(); values.put(MediaStore.MediaColumns.DATA, musicFile.getAbsolutePath()); values.put(MediaStore.MediaColumns.TITLE, "my music"); values.put(MediaStore.MediaColumns.MIME_TYPE, "audio/mp3"); values.put(MediaStore.MediaColumns.SIZE, 215454); values.put(MediaStore.Audio.Media.IS_RINGTONE, true); values.put(MediaStore.Audio.Media.IS_NOTIFICATION, false); // true for notification sound values.put(MediaStore.Audio.Media.IS_ALARM, false); values.put(MediaStore.Audio.Media.IS_MUSIC, false);

SipManager.newInstance returns null

浪尽此生 提交于 2019-12-04 09:07:10
I implement simple SIP client app for receiving calls. I go through official manual and get code from it. I noticed that SipManager.newInstance(getApplicationContext()); returns null. Documentation says that it happens when SIP API is not supported by device. However I use LG G6 with Android 7.0 and I successfully test third-party SIP clients from Google Play. So I doubt that API is not supported really. How could I check that? My manifest has all permissions ( INTERNET and USE_SIP ) Permission for USE_SIP is granted by user The Problem is that Android SDK is not supported over all the devices

“Connection closed by peer” error occurs in Android 7.0 Nougat while connecting to SHA256 CA installed Windows 2003 Server SP2 through HTTPS

大城市里の小女人 提交于 2019-12-04 08:02:54
My app communicates with server interface (classic ASP) through HTTPS. It has been workd very well in prior version of Android 7.0 Nougat. (until 6.0) But, Connection closed by peer Error occurs in Android 7.0 phone and AVD(Android virtual device). Server is Windows 2003 Server SP2 (SSL Certificate was updated from SHA1 to SHA256 in Jul 23th, 2016), HTTPS, Classic ASP Server's SSL certificate installation check status of GeoTrust is like below (cryptoreport.geotrust.com/checker/views/certCheck.jsp) GeoTrust check status screen shot of my Server's certificate (Protocols not enabled : TLS1.1,

Support split screen in Android N+ only on tablets

て烟熏妆下的殇ゞ 提交于 2019-12-04 07:00:51
Is there a way to configure multi-window support for an activity only on screens large enough, e.g. tablet? https://developer.android.com/preview/features/multi-window.html#configuring doesn't mention that. Setting android:minimalHeight and android:minimalWidth seems to not help, because If the user moves the divider in split-screen mode to make an activity smaller than the specified minimum, the system crops the activity to the size the user requests. Use case: for certain activities, it might not make sense to be run in very small (split) screen sizes. In those situations, the activity

Change language programmatically (Android N 7.0 - API 24)

谁说胖子不能爱 提交于 2019-12-03 18:45:55
问题 I'm using the following code to set specific language in my app. Language is saved into SharedPreferences within the app. And it works perfectly up to API level 23. With Android N SharedPreferences works well too, it returns the correct language code-string, but it does not change the locale (sets default language of the phone). What could be wrong? Update 1: When I use Log.v("MyLog", config.locale.toString()); immediately after res.updateConfiguration(config, dm) it returns correct locale,

Disabling Multi-window feature for Android N not working for an activity

瘦欲@ 提交于 2019-12-03 17:15:23
问题 I want to disable multi-window support for an activity in my app. I have set resizeableActivity to false in my Manifest but when I long press recent app icon, the app still goes in multi-window mode. Below is my manifest: <activity android:name=".MainActivity" android:resizeableActivity="false" android:excludeFromRecents="true" android:icon="@drawable/ic_launcher_home" android:theme="@style/AppThemeV3.CustomToolbar"> </activity> Per documentation: android:resizeableActivity=["true" | "false"]