AdMob Ads on exit - android

I am creating an app with phonegap and using admob i am displaying fullpage ads on exit.
Is it ok to do so?
I am not blocking the user to exit the app
i am doing it like this
function backCall(e){
// pormt when back button is pressed on home screen
e.preventDefault();
var action=confirm("Do you want to Exit");
if(action){
if(AdMob) AdMob.showInterstitial();
navigator.app.exitApp();
}
So if the admob object is available the ad will show and the app will exit but if the admob object is not available then the app will exit anyway
I did not find anything the documentation.
Please let me know if i missed something in the docs.

You can't put ads on app load or exit according to Google guidelines.
Please read here.

Related

Vungle sdk for showing ad in android

I implemented Vungle SDK for showing ads video.its working fine.
after complete the video close button showing in corner, if i clicked then only moved to nextscreen.
but my scenario is after completion video ad automatically i have to launch next screen.How to achieve in Vungle SDK.ha
Thanks
Gowtham.R
I am Aki from Vungle.
You want to auto-close ad after it finishes?
Most of our ads has ebd card and you need to hit "close" button to close and come back to your app. Some ads have no end-card and it will close automatically.
Please contact us at tech-support#vungle.com for any question.
Thanks,
-aki

Is there a way to check for direct update from native - IBM Mobilefirst?

I am trying to implement Direct Update in my app. In my app, I have display the native page as home page.
So from wlcommoninit(), I am calling WL.Nativepage.show(), to move to native page.
Before moving to native page, I want my app to check for direct update. So before calling WL.Nativepage.show(), I have called the below API,
WL.Client.CheckforDirectUpdate()
It is working like this,
App loads
Check for direct update
Direct update available - so default dialog shows to update the app
In the background, the app is moving to native page.
I want the app to move to the home page only if there is no update available,
so in onSuccess method of WL.Client.CheckforDirectUpdate(), I am passing to the native page.
In some cases the app works perfect, but some times once the update dialog displays to the user the app is moving to the native page and the dialog disappears again I have to return to any hybrid page to access the update dialog.
So I would like to check for notification in the home page [Native Page]. Is there any equivalent native[Android and IPhone] Mobilefirst API available for direct update?
There is no such API. However perhaps you could use the SendAction API to invoke JS code and return the result. I don't think this will play out as expected, though: https://www.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.dev.doc/devref/c_action_sender.html

How to cancel FaceBook Login page in Web-View

I am implementing FaceBook Login using Manual Login Flow (Without any SDK) in a web-Kit/web-view by calling facebook api as
https://www.facebook.com/dialog/oauth?{appid}/etc/etc.
from an HTML Page inside a Web-View.
If the user is not logged-in then it opens a facebook login page in web-view.
It is shown in the image below.
at this point there is no way to cancel the login and come back to my application from in iPhone. If the user want to cancel the login he must close the application and restart again. which is a painful process.
How can I solve this issue?
Steps:
Add a webview and a button(close) to the viewcontroller(it's the viewcontroller where you wish to load the facebook page.
You can present this viewcontroller using presentModalViewController (or anything like that).
eg:
_webViewController=[[WebViewViewController alloc]initWithNibName:#"WebViewViewController" bundle:nil];
[self presentModalViewController:_webViewController animated:YES];
When you're finished done with the facebook or you're in the middle of anything , you can simply press the close button.
Here you put the following code for the close button action as:
[self dismissModalViewControllerAnimated:YES];
This way you can come back to your application without closing your application. Hope it helps. I've implemented this, feel free to comment in case of any confusion.

Facebook OAuth shows "you must log in first"

I want to make MyApp name show on the upper space as Facebook Samples shown.
But even the source code is the same with the sample's, the raw/layout data are the same, too. I don't know why MyApp shows only "You must log in first".
Is anything I missed?
Now I put my whole source code up to the share space: http://qfs.mobi/f689673
And I found it seems not login successful if I input the right information.
Finally, I found the problem..
I change to use the Facebook Sample And run with my app_id. And then I found there are error code when login dialog shows. "This app is in sandbox mode."
God! Isn't sandbox mode for "Developers"? Seems I misunderstand..
Since this a problem is with the webpage shown by the facebook sdk, it doesn't seem to be an issue with your android code, but rather with the way your facebook app is defined in the app center.
The SDK basically redirects you to this link: https://m.facebook.com/dialog/oauth?app_id=xxx&redirect_uri=fbconnect://success (replace xxx with your app_id). Try going to the link when you are not logged in or when you are in incognito mode, you should see the login screen as such: http://imgur.com/xeqigSu
You could check a couple of things:
That your app is live. Check this on your app basic settings page
Try changing the language on the login page and see if that helps, since your app is in a language other than English
go in android setting,then Applications,Manage applications,find your browser and clear data,it works as usual!

Facebook login problems current goals screen not generating oath token

I am a newbie and devleoping an app which uses facebook login and the details which we get after logging from facebook for further interactions. Two days back it was running fine but today it stopped running its just showing CURRENT GOALS screen and no button to do ok or cancel or anything of that sort. Just see this link
https://m.facebook.com/dialog/oauth?redirect_uri=fbconnect%3A%2F%2Fsuccess&display=touch&type=user_agent&client_id=307234779396415&ret=login&ext=1368864103&hash=AeZ9mMBQfC22WXj_&refid=9&_rdr
I am using the Facebook Dialog class to achieve the login but in the facebook sdk also the graphSampleApi sample project is running with same problem.
Please help I need to the login badly and my project deadline is today. Please help.
Thanks in advance.
try this simplier URL for log in ::
https://www.facebook.com/dialog/oauth?client_id=307234779396415&redirect_uri=https://www.facebook.com/connect/login_success.html&display=touch&scope=publish_stream
See my answer on this similar/duplicate question: FbDialog doesn't show full content on smaller devices
Basically, it looks like Facebook changed the code in these web dialogs and something in their javascript is not executing properly on some Android devices. The Cancel/OK buttons are there in the page content, but hidden, and the javascript is failing before the buttons are shown.
You can inject JavaScript to hide the "Current Goals" until FaceBook fixes their API.
See my answer here for details:
webDialog "CURRENT GOALS" header but no button to authorize or cancel

Categories

Resources