Get browser history over 6.0 Marshmallow - android

Is there way to get history on Android 6.0 Marshmallow?

This is intentionally not a supported use case. Using Android SDK's Browser provider right now it doesn't seems to provide history.
Look at this issue https://code.google.com/p/android/issues/detail?id=200685

API >= M ignores the permission argument and instead checks for com.android.chrome.permission.READ_WRITE_BOOKMARK_FOLDERS. This permission is limited to system apps and apps signed with Google's key.
https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-bookmark-browser
Please refer to my answer as mention on below post
https://stackoverflow.com/a/45566687/7895502

Related

Are Directory Contacts removed in Android 11+?

I'm working on a contact directory integration. I know that I had this feature on an older phone and want to integrate this feature for my own app. Technical is my question similar to Provide the caller id for incoming call from my own app just that I want to support modern devices with Android 11+. On my Android 12 device my content provider is initialized and can be queried from my own code. However the phone app does not invoke my content provider.
Since I am absolutely sure that this feature has worked in the past. I used the emulator with the result that the app works fine with the API versions 27 and 29, but not with 30. Do you know an API change or was that feature silently dropped for privacy?
I talked with the Google Support and they told me that this feature would only work with work profiles in the context of the cooperate contacts from Google Work Accounts. Is that a general restriction or just something related with Google Accounts?
I made some deeper research and found the class ContactDirectoryManager. I modified the code so far that I was able to execute the onPackageChanged() method which detected my content provider correctly as expected. What am I doing wrong?
If you want some sample code check this repo: simplecallerid
Bonus question: Does that only work on Stock Android? I found a feature request for Samsung devices on their frensh community page. It seems that this is not supported there.
A bit late but I too was using "android.content.ContactDirectory". I can confirm that the AOSP dialer does not seem to invoke "phone_lookup" which was the only part my app was supporting.
I can query ContactsContract.Directory.ENTERPRISE_CONTENT_URI and see my app being registered and even make requests to it. But AOSP dialer no longer queries it.
Perhaps performance was reason for it to stop querying other directories.
I suppose we can dig in to AOSP commit history to find the change but who has the time?

How to access chrome history from android api 25+?

since the normal permission was removed in kitkat, I find it really hard to find any information.
I want to access the default installed chrome browser's history in android oreo or around that version
Looks like it is not possible anymore since Android 6 Marshmallow.
The release note tells us :
Browser Bookmark Changes
This release removes support for global bookmarks. The android.provider.Browser.getAllBookmarks() and android.provider.Browser.saveBookmark() methods are now removed. Likewise, the READ_HISTORY_BOOKMARKS and WRITE_HISTORY_BOOKMARKS permissions are removed. If your app targets Android 6.0 (API level 23) or higher, don't access bookmarks from the global provider or use the bookmark permissions. Instead, your app should store bookmarks data internally.
It was once reported as a bug but as comment 2 says, it is deprecated

Android app works on 5.0 but not on 6.0

I recently had some beta test for my app. The app works fine on Android 5.0 and even some lower deivices, but not on Android 6.0. Does anybody know what could be an issue here or how one might upgrade their app to support a newer Android OS
Some context about my app:
It uses Firebase auth and database.
Core Use case for this app is getting, sending and showing gps locations on maps.
The problem in Android 6.0 now is that the GPS is not activated when using the app
Thanks in advance
In marshmallow GPS location access is achived by runtime permissions https://developer.android.com/training/permissions/requesting.html
Make sure your permissions are declared in your manifest.xml
If target sdk version is marshmallow ,we need to implement runtime permissions for GPS access.
You need to ask for permissions at runtime in android 6+. This is the reason why no permission is asked when you are installing your application like its asking in android lollipop. Visit android developer page to learn how to ask for permission for android M and above visit : https://developer.android.com/training/permissions/requesting.html

Strange behaviour in Android M Permissions

So I have this app that I made before the Android M came out, the app has permissions such as Camera(using custom camera within the app) Write & Read from external storage and System Alert permission I installed the app to my phone which has android 6.0 and the app was able to run normally and without any restrictions. I was able to use the camera, save files into sdcard & show a custom view using the WindowManager API.
please take a note that the target SDK for the app is android lollipop.
my question: is this even possible? the OS let apps that has target SDK smaller than M to run perfectly without asking for permissions? and if this is actually the default behaviour that android developers implement?
P.S: the identified question is not really applicable for my question. and i don't see any similarity between them at all.
Yes, it is possible. But that can give you a big problem. If the user deactivates some permission your app simple crushes because the permission is no longer available. The OS ask the user "This app was developed for a previous android version. disabling this permission can cause unexpected closing of the app" (ore some thing similar). In conclusion this is the normal behaviour because the android version that you are using to compile your app is before permissions needed to be confirmed by the user.
https://inthecheesefactory.com/blog/things-you-need-to-know-about-android-m-permission-developer-edition/en
this link explains all you need to now about your question .
Yes, if your app has targetSdkVersion below 23, it will work on M and above without asking any permissions (they will be asked during installation).
But if user will revoke any permission himself, app will crash. It was made by Google to get backwards compatibility with old applications that does not support new Permissions API.
You can read more about it here.
Here is quote from that page:
If the device is running Android 5.1 or lower, or your app's target
SDK is 22 or lower: If you list a dangerous permission in your
manifest, the user has to grant the permission when they install the
app; if they do not grant the permission, the system does not install
the app at all.

signatureOrSystem protection level in Android Studio

I am pretty new in Android Studio. I am trying to add a permission:
<uses-permission android:name="android.permission.CONTROL_LOCATION_UPDATES"/>
The problem I am facing is that apparently my app is NON system app. I read about the differences between system and NON system apps. However I didn't get to any solution.
My question is: How to sign an app by platform signature? Can anyone explain that please? And maybe explain why do I need to do that?
I know that my question might look very silly, but as I mentioned, I just started to use Android Studio so I am pretty new in all that and I need some help with silly things like this one.
My question is: How to sign an app by platform signature?
Build your own custom Android ROM. You will sign that platform, and you can then sign your app with the same signing key. Of course, you will only get this permission when your app is running on devices that, in turn, are running your custom ROM.
And maybe explain why do I need to do that?
Because you are trying to use a signature-level permission to control the OS. Approximately 1 in 50,000 Android developers need to do this, and usually only in conjunction with creating their own custom Android ROM.
IOW, to quote the documentation for this permission: "Not for use by third-party applications".

Categories

Resources