Unable to +1 using google Plus or google auth api - android

I am unable to +1 using google Plus or google auth api. This function works fine on every other device except my galaxy 10.1 note. Even when going through Google Plus i get the error message "Can't +1 the post".
Any ideas how to fix this error?

I once had this issue and after trying for quite a long time, I found out that you cannot do it through the API directly. Here is a short description of what I did to work around it:
This only works for a Google Plus Page - get the snippet that you would normally see on a webpage. That includes some html+javascript+ajax and save it as a string variable in your android code.
Then secondly, load it in a webview - that will load the Plus 1 Button for a user to click (that means they follow or recommend it depending on which button you have).
Once they have clicked it, you can make another API call to verify that they actually clicked it - you see, there is no easy way to know this because you have no control over the html button.
I figured that when they authorize the app, request permission to read their circle count and then if they actually clicked the plus one button, compare the final count with the original count to make sure they did indeed follow/+1 your page.
If you don't use this approach, please let me know how you pull it off.
Check out this answer on how to load the button in a web view:
Load Plus One Button In WebView
Good luck.

Related

Live Images are showing on offline(no internet) mode too - Ionic 3 App

I'm using this cache API to cache the content on the page.All are working fine.But when I disconnected the internet on the mobile device, I can see all the image content too on the cached page.Those images are coming from AWS and having a path like below.When I debugged the offline use case, the URLs are same as below.In other words, I didn't put any special effort to cache the images.So my question is, how those images are showing on offline use case? You can see that according to the image URLs it must work only on the online use case.So how this works? Hope you'll give a feedback for this.
Update:
By disconnect means: disconnecting from the internet with the app open
Use case:
I have an online page(i.e. working only with the internet) where the user can select the content for the offline(i.e. no internet) reading.What I have done here is, I have cached the content and then use that already cached content on the offline page.But I didn't put any special effort to cache the images.As I mentioned above I can see the live URLs on the images on the offline page too.But still, those images are shown on that offline page.Any clue, please?
This is the image URL on offline page too:
<img src="https://s3-us-west-2.amazonaws.com/blue/pic/my-thumbnail-136x200-95.jpg">
I've never used this caching service neither have came across this behaviour, but here's what i can share:
I have an app where I show an avatar in some pages, it's a Firebase image and the link is always the same. When i open the image, disconnect and go to a page where i have to show this image again it doesn't shows until i connect the internet again.
Since you're using Amazon AWS i don't know if it has the same behaviour, since you probably needs to authenticate to connect and retrieve the image, thus it needs internet to this.
My first guess is that since it's a single page app, when you open an image in a page, it's already downloaded and has a success request, then when you navigate to another page it's already cached in, not because of the cache service installed, but be cause it's opened in a early page on your stack.
If you close the app, kill/destroy it and open again the common behaviour is to fail to show an image, since you've not downloaded it again. If you do this and it shows the image it's beyond my knowledge.
It's not something on the cache service since you need to especify what you want to cache and you're using it directly on your HTML page.
So my second guess is that AWS does something, since Firebase has a behaviour for working with its images, AWS must have it's own way to work with it. So it automatically caches the opened image and creates some sort of indexing or reference so it can first look for success calls to that image before calling the API again (i've never worked with AWS and never looked at it's docs, so i'm just saying what i think).
This answer is more like a comment that is too long for the comment box, but i hope it can give you some ideas of where to look for the correct answer.

IOS / Android: Can I retrieve clickthrough data from inside an app?

I'm trying to find a way to figure out how to retrieve clickthrough information to figure out which ad / link was clicked to direct a person to download it.
Say we have the following situation:
User sees an ad for the app.
They click it
It directs them to the app store, and they download it from there.
They run the app
Is there any way at all to figure out the source of the click in step 2? This is for advertising analytics - we want to know where our clicks are coming from.
I know that the site visited in step 1 can theoretically retrieve device data and link it up to device data retrieved by the app. However, we're looking for a more direct approach.
I've had a great deal of difficulty locating information on this, so any assistance would be appreciated.
We're using the Flurry API on IOS and Android.
Thanks!
May be you can check the touchEvent point location, when the ad bannber frame rect contains the touchpoint , we can treat that as a click ad event.

Why my app cache is not returning null even after deleting the same?

I am working on an app which renders a mobile website using android's web view.
My app is capable of showing the website in offline mode with the help of cache.
Upto here everything is fine.
Now i have introduced a clear cache mechanism and getting issues..
To understand the issue have a look carefully at login steps performed via login button on loginscreen(I have two buttons here 1. Login 2. Clear Cache):
Step 1. if network is connected, let the user enter inside app and show the online content(cache mode off)---> WORKING FINE...
Step 2. else if network is either disconnected||suspended||unknown and if cache is present, show the cached content.---WORKING FINE.
Here come the issue:
Let us suppose if there is no network and user clears/already have cleared, the cache then login then according to my logic they shouldn't be able to login but my code is failing and it login the user see this link
For clearing cache, i have done something like this post
Let me know if anyone need further clarification.
Any help will highly be appreciated.

Is it possible to put a Facebook like button in a mobile app and when used, it would like my website url?

I have an Android and an iPhone mobile app into which I need to put a Facebook like button for marketing purposes.
The problem is that I am not sure what is really being liked when a user likes something from inside a mobile app. I have a website for the two apps (Android and iPhone) so it seems that this website should be liked when a user likes something from a mobile app.
Is that possible to do?
From my experience and what i know, Facebook doesn't leave you the possibility to use a likeButton into a mobil Application, they don't want the users to be spammed by those in every apps.
From my point of view, there is two solutions, but neither are perfect :
You use Facebook OpenGraph and create a like action for a Website Object, you can find more informations about Facebook OpenGraph on facebook documentation, OpenGraph web tutorial and the last one examples that are more specific to iOS. But if i remember right, you won't be able to create an action called "Like", i think facebook will prevent it so there is no confusion for the users, but as i'm not sure at all, it's still worth a try.
the second solution is to make a simple UIButton, and when you click on it you just show a webview of the facebook page you want the user to like. If you want to know if the user liked your page, you can always make a request for his likes and try to find your facebook page id in it, whenever the user did exit the webview.
I hope i answered your question.
And if ever you find a way to make a real facebook like (not an opengraph), directly in a native mobile application, i would be very interested in knowing the howto.
EDIT:
Actually, only the second solution would work if it's to like a facebook fanpage, as for OpenGraph you need to be able to modify the metadata sent by the page so it fits the properties of your object.
The Opengraph solution would work only to make a fake "like" on a webpage of your own.
Use this code. You should be logged in to Facebook, before using this code. Check whether the Facebook session is valid and then use this code.
WebView foll_fb = (WebView) findViewById(R.id.btn_foll_fb);
String url = "http://www.facebook.com/plugins/like.php?layout=standard&show_faces=true&width=80&height=50&action=like&colorscheme=light&href=YOUR_URL_TO_LIKE";
foll_fb.loadUrl(url);
foll_fb.getSettings().setJavaScriptEnabled(true);
foll_fb.requestFocus(View.FOCUS_DOWN);
foll_fb.setWebViewClient(new LikeWebviewClient());
Correct. If you click a like button inside a mobile app, most users expect that they have liked the corresponding page. If you have a page for both the android and the iOS app, then it should like the corresponding one.
In case you wanted to know how to do this, I can give you the main idea. Simply place a button, that on tap, runs whatever is necessary to like something. Since I personally haven't done that, I'm not sure what needs to be run.
Hope that helps, but someone else probably has a better answer than I do. Meaning the actual code to that.

Android - Searching and navigating the web

I was wondering if it was at all possible to attempt the following in an Android app:
I want the user to be able to enter a few keywords, then in the background (while showing a loading animation) have the app search google for the entered keywords, navigate to the first search result, then search the resulting web page for a URL leading to a particular domain, and return this URL to a list in the app?
Is this possible, and could anyone nudge me in the right direction to get this done?
You can use Google search api by Http request methods in backend while showing loading animation, which provides its search results details...
But also look out for restrictions in using this api, i guess in terms of max search requests/day..

Categories

Resources