isValidFragment Android API 19
Try this… this is how we check validity of fragment. protected boolean isValidFragment(String fragmentName) { return StockPreferenceFragment.class.getName().equals(fragmentName); }
Try this… this is how we check validity of fragment. protected boolean isValidFragment(String fragmentName) { return StockPreferenceFragment.class.getName().equals(fragmentName); }
Got it. Its a bug in 4.4. I tried this and it worked perfectly fine(its a dirty workout though). Just override this method -: public void onTaskRemoved(Intent rootIntent) { Log.e(“FLAGX : “, ServiceInfo.FLAG_STOP_WITH_TASK + “”); Intent restartServiceIntent = new Intent(getApplicationContext(), this.getClass()); restartServiceIntent.setPackage(getPackageName()); PendingIntent restartServicePendingIntent = PendingIntent.getService( getApplicationContext(), 1, restartServiceIntent, PendingIntent.FLAG_ONE_SHOT); AlarmManager alarmService = (AlarmManager) getApplicationContext() … Read more
Please post code for your BroadcastReceiver and AndroidManifest.xml. Manifest should look something like <application> <!— … —> <receiver android:name=”.UsbBroadcastReceiver” android:exported=”true” android:enabled=”true” > <intent-filter> <action android:name=”android.intent.action.MEDIA_MOUNTED” /> <action android:name=”android.intent.action.MEDIA_UNMOUNTED” /> <data android:scheme=”file” /> </intent-filter> </receiver> </application> Note the data tag, it’s often overlooked. In your onReceive implementation the URI to root of mount can be obtained … Read more
This would appear to be a result of two ndk-gcc bugs mentioned at https://code.google.com/p/android/issues/detail?id=23203 and stated there to have been fixed as of ndk-r8c. It would appear that the check for libraries with the issue has been added only recently. Note: please do not edit this post to hide the link URL. It is explicit … Read more
There’s zero documentation so here’s some info to help. 1) com.google.android.mms.pdu from source. You need the Pdu utils. 2) You get the notification push from byte array extra of the incoming mms broadcast (intent.getByteArrayExtra(“data”)). 3) Parse the notification push into a GenericPdu (new PduParser(rawPdu).parse()). 4) You’ll need TransactionSettings to communicate with the carrier’s wap server. … Read more
I believe I’ve solved it. The request intent: Intent intent; if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT){ intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true); intent.addFlags(Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION); }else{ intent = new Intent(Intent.ACTION_GET_CONTENT); } intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true); intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); intent.setType(“image/*”); startActivityForResult(Intent.createChooser(intent, getResources().getString(R.string.form_pick_photos)), REQUEST_PICK_PHOTO); and onActivityResult … // kitkat fixed (broke) content access; to keep the URIs valid over restarts need to persist access permission if(Build.VERSION.SDK_INT … Read more
First step and the one which Ken White rightly suggested & which you may have already covered is the Example Code provided officially. I have used their API earlier. I agree screenshot is pretty straight forward. But, screen recording is also under similar lines. I will answer your questions in 3 sections and will wrap … Read more
Had the same problem for the last couple of days. Tried a few solutions, but for some reason I was getting permission denial on Uri content provider for some images even when I had the android.permission.MANAGE_DOCUMENTS permission added to my manifest. Here’s a workaround, for the time being: i = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); startActivityForResult(i, CHOOSE_IMAGE); … Read more
We could not prevent the status appearing in full screen mode in kitkat devices, so made a hack which still suits the requirement ie block the status bar from expanding. For that to work, the app was not made full screen. We put a overlay over status bar and consumed all input events. It prevented … Read more