How to access 3rd party TvProvider on rooted device? - android-contentprovider

My question is a follow up to this question.
Let's assume I have an Android Tv stick, I also am the vendor. There are 3rd party apps like Netflix, Prime, etc. I want to access the channels provided via TvProvider or ContentResolver. As pointed out in one comment:
apps vendors signs with the same key as an AOSP itself
placed them in a special folder - only vendors of devices can do it
or you, but only on rooted devices
How are my possibilities for the options above?

Using one of the proposed options you will be able to get all channels from the TvProvider inside the apps with signature /signatureOrSystem protection level. I don't know the specifics but I assume they may be different for different ROMs you may use. You will be able to retrieve the data from TvProvider the same way you are able to do it in your own app - this answer has links to examples from Android system app.
You will be able to render Rows from the data via leanback library in your own app(I don't know whether it should be a launcher or just an app). After the user by clicking on a card will enter the app that provided the content and view it there. You will not be able to view the videos inside your own app even if it is a system one because you would have to have access to the backend of the app that provided the media and that information is not stored in the TvProvider. The media inside a TvProvider is rather a simple link to a content page inside the other app.
There is plenty of info online about modifying ROMs, creating signatureOrSystem apps I cannot dive a specific link because I cannot verify its validity, because I haven't tried to do such things with TvProvider in specifics and Android OS in general(except for the root and disassembling and modifying already existing apps from the device vendor - also plenty info online).

Related

How to work with Firebase App Indexing for IOS Apps

i am in the process of making my app with firebase i am pretty much done with that except Firebase App Indexing. I am very exited with this feature because it could help me to increase my app get more traffic from the web but the problem is i really can't able to see how to implement this. According to Firebase Docs i just need to register my app with this pice of code
[[FIRAppIndexing sharedInstance] registerApp:your Apple ID from iTunes Connect];
I have done that but what should i do after that?
1.My app is firebase app that means i don't have any website to host my content except firebase realtime database. Does my content is available for crawlers? if not how can i make available to them?
2.If i can able to show my content in the google search results i don't wanna show all the content and i wanna show just some of my content for example i have a social app for sharing General Knowledge questions, i wanna show just the question like "What is the highest mountain" in the search results and if the user want to see the answer it should take them to my app how can i do that?
3.As per docs i came to know that i need to create univiersal links for my app content to direct users from google search but how shold i do that ? Lets say should i crate universal links when the user create question?? if so how can i do that ??
Thank you very much for the help.
This is not currently possible on iOS using Firebase App Indexing. The situation is slightly different on Android, but that is not applicable to your question.
On iOS, Firebase App Indexing is simply highlighting pages on your website in Google search results that have corresponding content inside your app. This is achieved by piggybacking on Apple's Universal Links standard, and there is no proactive 'crawling' going on inside your app. This means unless you have a corresponding web page for your app with 1:1 content parity, you can't really benefit from Firebase App Indexing on iOS as it comes out-of-the-box.
The best workaround is to generate little 'placeholder pages' for every piece of content in your app, which the sole purpose of opening your app (if it is installed) or redirecting to the App Store (if it is not installed). Ideally you'll need some sort of deferred deep linking system so that users still see the correct content after downloading. Fun fact: this is essentially how HotelTonight operates their entire business model. Unfortunately Firebase's implementation is not mature enough to support this full flow, and Google hasn't quite figured out how to rank app-only content properly yet in search results so you will probably need to pro-actively submit your placeholder pages to them.
Shameless plug: at Branch, we provide all of the above as a free service. You can read more about it here and take a look at the set up docs here.

Is it possible to get info on other installed iOS apps?

Is it possible to read the contents of another application installed on an iPhone? What about from an extension or keyboard?
I'm trying to come up with something that 'checks' other apps to see if they have any deep links (like Twitter's Twitter://timeline that takes users straight to the timeline in the Twitter app).
Is there any smart way to check a given app for deep links?
Is it even possible to peek at another app's contents from within my app? I suspect no.
If no, what about making a keyboard or extension of some sort that I can access from an app like Twitter and see its contents, such as a URL deep link?
You don't have much options, you may use -canOpenURL:, but, since iOS9, must include special credentails listing all the custom schemes you want to check.
You can't read other app's contents on a non-rooted device unless this app is sharing a keychain (so it can exchange data via the shared keychain). The same thing goes with extensions.
iOS has some high bars on security, so, don't expect much or even, anything.
Something you may want is IntentKit. Also there are ideas around the web about standard url query format like MobileDeepLinking.

Can I find out the location of an app's icon on the home screen?

Is is possible to dynamically figure out the position of an app's icon on the home screen of an iphone/ipad?
Sorry I don't have enough credit to comment yet so I'm posting here.
To my knowledge no you cannot natively or easily do this. I know of no open source or other libraries. The reason being that your app exists in its own world, it is not in touch per say with the rest of the device. It can get permissions to read and write data but it doesn't know of itself.
Does that make sense?
When you open a website it cannot know which tab it is in the browser. Instead it knows how it was accessed and what device (physically) is using it. It knows the user-agent, the time, the browser, etc because that is information sent to it in the request. In turn the phone on launch gives data to the app in how to handle it but not for example how many other apps are running, or where it is on the screen. It's not normally considered relevant to run time. In addition it's a security feature in preventing an app from deleting or altering other apps, as well as itself. If you have an iPhone you will notice that SIRI cannot turn off google maps navigation or any other non-apple specific app. Only apps natively comparable and private party ones (ex apples) are accessible because Apple did that intentionally. They all know of their own existence and each others. However non-native in the sense of apps that do not come preinstalled and manufactured by the company creating the device are less trustworthy, in addition there are no guarantees about how they will be run by the device, where they will be, or what other apps will be there.
It is true that an app can request for another app it may be comparable with but it is up the user to handle that information.
May I ask for curiosities sake why you are trying to do this? Are there any other workarounds?
However in terms of it being physically possible, yes. I doubt that apple allows independent developers to do this however. But an example of this occurring may be gridlock where a user can move their apps around differently on the screen. The app in this case has the ability to access app position. But I believe in this case app position is about the UI and not about nested files. apps cannot to my knowledge modify information outside of their own file. Imagine if you had an app that could edit other games scores.
It is not possible to dynamically find out the position of an app's icon on the Home Screen (even for jailbreak apps). Apple wants you to respect the user's privacy settings.
Extra Info - There is popular JavaScript library that adds a promo bubble to the bottom of your mobile web application, inviting users to bookmark the app to their device's home screen.

Clarification on Apple App Store Guidelines - Use of WebUIView

I'm new to mobile programming. Recently my company has looked into creating a specific application for tablets (Android and iOS). So it was assigned to me to develop a thin-client based around using HTML5 for what we need to do.
Essentially the application allows a user to fill in a custom-designed form (which the user can build themselves, or pull down a predefined template from our server). This form is built using HTML5, Javascript, JQuery, etc. Some additional functionality is planned, such as being able to take a picture using the native device and attach it to the form that we send back to our server for storage (once we figure out how to do it in iOS. We've already done it in Android.)
However, I noticed the following on Apple's App Store Guidelines, under the Functionality section. Item 2.12:
Apps that are not very useful, unique, are simply web sites bundled as Apps, or do not provide any lasting entertainment value may be rejected
Can someone explain, or at least direct me to clarification of this when using the UIWebView construct? This application at its core is pretty much just HTML5. While it might have some additional bells and whistles, does this mean that if we try to submit this (when its completed) to Apple, that they will simply reject it out of hand? Implementing the majority of it in HTML5 was done purposely so we wouldn't have to re-code everything from device to device (and we will also embed it in one of our products, so if they want to fill it out on the desktop while in our system, they can.)
Any guidance would be appreciated, or even suggestions of where this question should be asked if SO is not the proper forum for it. Thanks again.
The key in the Appstore guideline is the word "simply":
Apps that are not very useful, unique, are simply web sites bundled as
Apps
If you keep a balance between locally stored and remote HTML content for your webviews Apple would not look at the app as a hollow shell pulling in remote content.

How to share data between applications?

I have previously developed on Android but never on iPhone so my question could be stupid for iPhone developers.
Does it exist one or several ways to share data between applications on iPhone ?
In Android, data sharing between applications could be performed thanks to ContentProvider.
I found a post ( How to share custom data between iPhone applications? ) that talks about URL scheme but it seems only usable to share small piece of data.
Your conclusions based on the question you linked to are correct; there's no way for iPhone applications to communicate like on Android. As mentioned, you can send information from one app to another via the URL scheme, or you may share some Keychain information amongst your own apps if you sign them properly.
No - iPhone apps are sandboxed and cannot share information. The few exceptions are that you can access information from some of the Apple apps such as the photo library, calendar, email and contacts.
It depends on what you want to share, if it is contained in a document for example, then if another application supports the document format, then you can impliment a control in your application that will allow you to open it in another app. i think it is a UIDocumentController, or UIDocumentInteractionController.
Im not 100% on the class name but good reader uses this method as does iBook, to open PDF files from another application.

Resources