android-7.0-nougat

SecureRandom provider “Crypto” unavailable in Android N for deterministially generating a key

蓝咒 提交于 2019-12-18 04:16:05
问题 Users can purchase a "Pro" version of my app. When they do, I store and verify their purchase as follows. Combine the user's UUID and another unique string. The resulting string is then encrypted using a static seed. I do this using SecureRandom.getInstance("SHA1PRNG", "Crypto") - This is the problem! The resulting encrypted string is then the "unlock code". Therefore, I always know the expected unique unlock code value for the user. When the user purchases "Pro", I store the "unlock code" in

Android 7 Native Crash: libc.so tgkill

半腔热情 提交于 2019-12-17 21:25:28
问题 I'm seeing this native crash with the following stack trace. This happens in Android 7.0 & 7.1 only. Nothing new has been added to the app, which has been in production for a few years, but with more devices being updated to Nougat this crash happens frequently now and is becoming a nuisance. Any advice would be appreciated. native: pc 000000000007a6c4 /system/lib64/libc.so (tgkill+8) native: pc 0000000000077920 /system/lib64/libc.so (pthread_kill+64) native: pc 000000000002538c /system/lib64

Android N - Cannot run on lower API though minSDK set to 14

一个人想着一个人 提交于 2019-12-17 19:14:09
问题 I am trying to run the APK on API 22 device after updating compileSdkVersion to N but unable to do so. compileSdkVersion 'android-N' buildToolsVersion "24.0.0 rc1" defaultConfig { minSdkVersion 14 targetSdkVersion 'N' } 回答1: Out of the box, the build tools are set up to block you from running N Developer Preview apps on older devices. Presumably, this is a sloppy way for Google to try to prevent people from shipping stuff built off of the preview. This approach was also used in the past two

java.lang.SecurityException: MODE_WORLD_READABLE no longer supported

时间秒杀一切 提交于 2019-12-17 19:08:05
问题 The exception only occurs in Android 7.0 Nougat (emulator) devices. java.lang.SecurityException: MODE_WORLD_READABLE no longer supported My code: public void SessionMaintainence(Context context) { this.context = context; preferences = context.getSharedPreferences(PREF_NAME, Context.MODE_WORLD_READABLE); editor = preferences.edit(); editor.commit(); } LogCat: > E/AndroidRuntime: FATAL EXCEPTION: main > Process: burpp.av.feedback, PID: 2796 > java.lang.RuntimeException: Unable to create

job scheduler in android N with less then 15 minutes interval

自古美人都是妖i 提交于 2019-12-17 16:16:35
问题 Part of my question, how I can set up a job with less then 15 minutes interval in "Nougat", was answerd by "blizzard" in his answer here: Job Scheduler not running on Android N He explained the problem and suggested to use the following workaround: JobInfo jobInfo; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { jobInfo = new JobInfo.Builder(JOB_ID, serviceName) .setMinimumLatency(REFRESH_INTERVAL) .setExtras(bundle).build(); } else { jobInfo = new JobInfo.Builder(JOB_ID, serviceName)

Android : How to write camera intent in android nougat

情到浓时终转凉″ 提交于 2019-12-17 12:03:53
问题 In my android application I have to take images using the camera when a button is clicked. It is working perfectly in all Android versions except Android 7 (Nougat). When I choose the camera option, the app is exiting even if the permissions are granted. I think the problem is in the camera-calling Intent. Below is my code. camera = (ImageView) dialog.findViewById(R.id.camera); camera.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { clickCamera(); dialog

How to get charles proxy work with Android 7 nougat?

前提是你 提交于 2019-12-17 08:00:41
问题 Android 7 introduced some changes to the way certificates are handled (http://android-developers.blogspot.com/2016/07/changes-to-trusted-certificate.html) and somehow I cannot make my Charles proxy work any more. My network_security_config.xml: <?xml version="1.0" encoding="utf-8"?> <network-security-config> <base-config> <trust-anchors> <certificates src="system" /> </trust-anchors> </base-config> <debug-overrides> <trust-anchors> <certificates src="user" /> </trust-anchors> </debug

Android - WebView language changes abruptly on Android 7.0 and above

≡放荡痞女 提交于 2019-12-17 03:04:21
问题 I have a multilingual app with primary language English and secondary language Arabic. As described in the documentation, I have added android:supportsRtl="true" in the manifest. I have changed all xml properties with left and right attributes to start and end respectively. I have added Arabic language strings in strings-ar (and similarly for other resources). The above setup works properly. After changing the Locale to ar-AE , Arabic text & resources are correctly displayed in my Activities.

Phonegap Push Plugin not working in Nougat

风流意气都作罢 提交于 2019-12-14 03:32:58
问题 I am using the latest Phonegap Push Plugin for my Phonegap Application. It's working fine below Nougat but in Nougat the same code does not work. I have tried to debug several times, also cross verified at server side if there is anything missing but found the device is not recognized by the GCMSender. Also everytime I uninstall and reinstall the Application the registered device token is same whereas in case of the Pre Nougat devices, it's always different after each uninstall and fresh

How to upload selected video from nougat, path returning null

南楼画角 提交于 2019-12-13 15:21:46
问题 I want to upload video selecting from gallery. I am using Intent to select video from device: Intent intent = new Intent(); intent.setType("video/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent, "Select Video"), PICK_VIDEO_REQUEST); after that: public void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode == RESULT_OK) { if (requestCode == REQUEST_TAKE_GALLERY_VIDEO) { Uri filePath = data.getData(); try {