I can't seem to find any literature on expiring content with Android's App Indexing feature.
Let's say you have an app that shows users information on store sales. The store sales are time sensitive - they will eventually expire, and no longer be available. While the sale is available the user can see related search results because the app has used App Index to declare them. Eventually, the sale expires though. The content is presumably still in the App Index, but it's now dead from the perspective of the app.
How does one deal with this? Is there a way to explicitly remove content from App Index? Are App Index entries automatically expired if not declared again within a given timeframe?
The app index entries won't get expired on their own. They will be always visible in the history.google.com of that particular user. So you have to create a mechanism to gracefully handle your case. You can check for the timing in the code that handles the deep-link and take action according to that.
I believe the main question was how to remove deep links from App Indexing in the cases that the Web URLs linked is no longer available due to be time sensitive.
Now regarding your deep links to stop appearing in Google Search results, there are a few options to handle these time-sensitive issues:
1- Use the "unavailable_after" robots meta tag as explained here https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag?hl=en / https://googleblog.blogspot.it/2007/07/robots-exclusion-protocol-now-with-even.html
2- Add a noindex robots meta tag and inform Google about the page-change via the sitemap file
3- Just remove the page (or add a noindex), and Google will recrawl it after a while automatically.
Apart from this, I would recommend you to implement an exception handling for the cases that the App can not obtain any content from the server. You probably can use the HTTP error 404 for that.
Related
I'm implementing a Firebase dynamic link mechanism in Android. We wanted to use Android SDK but to match users only when there is a one-to-one identification between users who clicks the link and user, which opened the app.
In iOS there is MatchType.Unique that serves this purpose:
The match between the Dynamic Link and this device is exact, hence you may reveal personal information related to the Dynamic Link.
https://firebase.google.com/docs/reference/swift/firebasedynamiclinks/api/reference/Enums/DLMatchType#unique
Unfortunately, I can't find anything close in Android SDK.
I will appreciate any help here to find how to distinguish deep links of the unique match type in Android
Thanks
It seems from this part of documentation that the matchType parameter exists only in Swift.
Personally, what I did is creating an array saved in the SharedPreferences, of all the DynamicLink already handled. Then, I just need to check for all the DynamicLinks entering if they are part of this array, and ignoring them in such a case.
Seems that even after an hour, the last DynamicLink handled still remains kind of "active".
For example I expect this kind of situation: data in my application lost relevance and so it usless until update. And until update it have to show users some predefined message.
Is here any simple and free solution to this task?
Guess I can use some server to somehow send simple messages... but it sounds way too complicated.
If this is important I use Xamarin.
Update: main difficulty here is fact - my application can't in any way define if it's outdated or not. This may happen in random moment.
Although the requirement is not very clear I assume Update here means app update.
each time user launches app make call to an api on ur server to check if user needs to update app
If that returns true take user to a static view that says app needs update and redirects user to google play to install updates
If you want to avoid using a server, you should try Firebase (https://firebase.google.com/). More specifically, you should use Firebase Remote Config (https://firebase.google.com/features/remote-config/).
Define in a key-value pair of something like minimum_app_version_required in Firebase Remote Config. Every time user opens the your app, compare the values of app version and minimum_app_version_required that you are getting from Firebase console and show a dialog box accordingly. You can also change the value of minimum_app_version_required anytime you want.
Just set some internal flag. That when that situation occurs, you can set the flag to true and just edit whatever layout element you are using such as listView or any other element with your predefined messages saved in strings.xml. You can also build any custom pop up screen, depends how you want to show them. Let me know if you didn't understand or exactly how you want?
Need to implement versioning for this problem. To achieve this, you have to maintain a version number in server, this is the version number you app will have to save and use it to validate with server. If both are not same, then app will get the latest data from the server.
I want googlebot to index urls that are added dynamically to my sitemaps. Urls that I add are for profiles (example.com/username), blogs, etc... I use server-side rendering with react-router, and some components make api calls to api.example.com/.... After reading the docs about crawling and robots.txt. I had an understanding that googlebot makes requests to links as it crawls the page. Therefore the server gets requests from googlebot.com and googlebot also interacts with robots.txt in process.
Well, I don't want google to crawl my api or people linking to it. This would overload the server. And Instagram does exactly the same https://instagram.com/robots.txt
User-agent: *
Disallow: /api/
Due to my understanding, I am a bit confused how google crawls pages of public profiles (google "Kelly Slater instagram").
Also, https://developer.android.com/training/app-indexing/enabling-app-indexing.html#robots (last paragraph - bottom of page) says I need to instead allow google to make requests to /api/.
Questions
Because /api/ is blocked, how google crawls Instagram pages? Does it wait for the response from the server and ignores robots.txt since it's an indirect request coming from another page?
Is web crawling different to app crawling? And do I need to instead enable /api/ to make my future android app crawlable?
I also noticed Instagram does not have Sitemap: ... field in their robots.txt. Do they submit their sitemap using apis of search engines like google ping or not?
There's kind of a lot of questions going on in this post, but we recently ran into this, and to summarize:
First Google loaded our initial HTML page.
It then treated API calls as 499 errors, and closed the connections before retrieving a response.
If the page required data from the blocked API URLs, it was not fetched, and thus (on our site) did not load the page properly.
So if you want Google to still crawl a page but without the necessary API calls, be sure to have a fallback or to block the page from being crawled in the first place.
I'm doing an android application much like the gmail app for android. I can see the app is very fast and very responsive.
I'm sure gmail uses local caching for better performance. But I wonder how does gmail does the following use cases.
Lets say i login for first time and the app loads all email and put in sql lite or any other caching.
use case1
every time i delete or add a star it makes an asyncronous server req to server. this is fine.
use case 2.
how does the app get notified in case the user makes changes from another client. (from a browser).
To download the entire mails will be costly. Lets assume a case in which the user adds a star to a already cached email.
How can we implement the api in such a way that to get only updates which made from other clients. Updates like new email, deleted email, star added, etc. I'm considering the scenario when the user doesn't use the background sync.
This is been bothering me for a long time. Request you guys to let me know some tutorials or links to understand the secret behind the gmail app.
Why don't you look at the gmail web app. That will be using the same/similar design principals (gmail web app is also very fast for me). Then you can apply the same principals. With the web app you can look at the web requests using something like firebug with firefox. Under the Net tab it will show the json of what is being sent across the network. It will also show you the way the request was structured. You wont be able to see how they go about optimally returning the data, but that should be fairly trivial.
I would recommend for returning data that you do the following:
1) create a cache for the most recent page of emails.
2) Updates of new emails will be immediately prefetched into the cache.
3) setup a cache for the next page and previous page of emails.
Essentially what I am saying is:
1) You can look at googles web version which is very visible to plain snooping.
2) You can optimize based on statistical usage of how the user would want to see their emails. This can suggest cache improvements.
What you are asking for in terms of links is harder because your question relates to many general concepts and proriatary software.
I already published an android app where you can see a list of specific objects and detailed informations about them. The list changes every day but some of the objects can appear again.
The application is communicating with a PHP server over HTTP and periodically pulls the list of objects.
I now plan to extend the app to make it possible to rate the objects and add a comment similar to how it is done in the android market. I'd like to avoid forcing the user to sign up for an account for being able to comment.
I see two problems:
The comment-system could be abused by spammers
A comment could be added from another system
So my questions are:
How to protect the system from spam?
How to authenticate the application with the server?
How do I limit the number of comments to one per user and object?
What about the androids device id? Is it unique enough to use it as identifier for the user?
Which other problems do you see?
2020 Commenting/Rating/Reviews Options
Since Socialize is out, here are a few options you can explore:
Build your own comment/rating implementation. Personally I love reddit and how it handles nested comments and ratings. Here's a library I found that implements it beautifully. Please note you'll need to tie this with a cloud-database. This is based on groupie. Article & implementation. Many ways to do this - https://stackoverflow.com/a/59472206/668240
Disqus - SDK's coming soon to iOS and Android.
BazaarVoice - commercial
Social Networks SDKs like Facebook, Twitter, etc. Personally I dislike this as we'll need to authenticate users with respective networks to use the APIs. It's like we are shipping off users of our apps to social networks. If you don't have a problem with that - then it might be for you
Legacy Option in 2014:
You can try out Socialize SDK which is open-source and a really good SDK for the rating and commenting you are looking for. It already has a well-functioning Commenting system built-in along with a 'like/love' facility and sharing to FB and Twitter. Each 'entity' (object in your case) can have metadata associated with it. So all you have to do is construct/use a rating widget, then send that rating with the entity attached to your object. To display your rating/comment is as simple as retrieving them from Socialize.
Each object (element from your app) should be associated with an entity which has a unique key in the form of a URL - sort of like a primary key to recognize your items. This entity can have meta-data - any data that you can insert on behalf of your object. Once you do that, you can retrieve that metadata any time you want.
I've been using Socialize for around a year now. They've matured over this period and are always aspiring to be the best at what they do.
Look at the Socialize Bar at the bottom. Its can be customized to your needs.
What's more - Socialize is free.
As for your questions:
There is comment moderation built into the Socialize Web Component
where you can filter out anything you feel is out of place.
Socialize allows you to authenticate through Facebook and Twitter.
Limiting to one comment per user can be achieved by using their User
and Comments API.
Socialize has both Anonymous authentication as well as Social A/c
authentication. I believe you can remove anonymous auth. So that
ensure that every user is authenticated before rating/commenting.
For authentication, you could use OpenID like StackOverflow does or Facebook authentication. Once you have them authentication, it shoud be easy to limit the number of comments to one per user per object. As far as spam, you could follow StackOverflow's model and allow users to vote comments up or down or flag as spam. Perhaps users with comments that have been voted up would have more power and be able to flag comments as spam.
You'll need some sort of rate limiting. I've used this one in this example before.
So you need a table with the user's ID and how many api calls they have left, and then when their last api call was. Then use the algorithm to update the values in the table every time a method is called.
Read through this, I think it should be possible to create an UUID for every case:
http://android-developers.blogspot.de/2011/03/identifying-app-installations.html
And then keep a hidden api key which is hard coded, or at least get's everytime calculated the same or in enigma style influenced by the time it is used. But you will be never be sure, that it won't be find out by crackers/hackers and maybe abused, you will always have this Problem.
Authenticate with the UUID of the user + api-key.