Clicking on an ad opens a browser, but I cannot go back to the launching activity screen of my Android app












0














Even though there is a similar case here:



After click AdMob ads, I cannot return to my Android app by back button



the code proposed didn't solve my case. So I am posting this if there's somebody with fresh ideas to solve this.



I have coded an app for Android. Now I am trying to add ads to this app.
I am implementing the ads from Appodeal. When I show an ad type called MREC (which is a square-like banner) on my main activity, if I click
on the ad, it will open a tab in the default browser of the device.



The problem arises when I press the square button on the device (the menu that displays the current running apps): it displays the browser and
also my own app as active. If I select my app, Android wont let my app come to the forefront, instead it shows the device background or the
recently opened browser. It's like the browser has taken over the "identity" of my app.



So, why I cannot return to the activity screen where the ad is located, and from where the click launched a browser tab?



One more thing is that in the sample apps that Appodeal provide, there is no code in onResume, and there isn't any different code from the
Appodeal SDK in the manifest, and yet, the app returns correctly to the main activity after coming from the browser tab. I am also trying to implement Admob ads, and the same effect happens as described in this post.










share|improve this question




















  • 1




    Please post your activity code so we can see if there are any issues.
    – Sub 6 Resources
    Nov 22 at 5:13










  • there is some problem with your code for sure.
    – Vladyslav Matviienko
    Nov 22 at 6:24
















0














Even though there is a similar case here:



After click AdMob ads, I cannot return to my Android app by back button



the code proposed didn't solve my case. So I am posting this if there's somebody with fresh ideas to solve this.



I have coded an app for Android. Now I am trying to add ads to this app.
I am implementing the ads from Appodeal. When I show an ad type called MREC (which is a square-like banner) on my main activity, if I click
on the ad, it will open a tab in the default browser of the device.



The problem arises when I press the square button on the device (the menu that displays the current running apps): it displays the browser and
also my own app as active. If I select my app, Android wont let my app come to the forefront, instead it shows the device background or the
recently opened browser. It's like the browser has taken over the "identity" of my app.



So, why I cannot return to the activity screen where the ad is located, and from where the click launched a browser tab?



One more thing is that in the sample apps that Appodeal provide, there is no code in onResume, and there isn't any different code from the
Appodeal SDK in the manifest, and yet, the app returns correctly to the main activity after coming from the browser tab. I am also trying to implement Admob ads, and the same effect happens as described in this post.










share|improve this question




















  • 1




    Please post your activity code so we can see if there are any issues.
    – Sub 6 Resources
    Nov 22 at 5:13










  • there is some problem with your code for sure.
    – Vladyslav Matviienko
    Nov 22 at 6:24














0












0








0







Even though there is a similar case here:



After click AdMob ads, I cannot return to my Android app by back button



the code proposed didn't solve my case. So I am posting this if there's somebody with fresh ideas to solve this.



I have coded an app for Android. Now I am trying to add ads to this app.
I am implementing the ads from Appodeal. When I show an ad type called MREC (which is a square-like banner) on my main activity, if I click
on the ad, it will open a tab in the default browser of the device.



The problem arises when I press the square button on the device (the menu that displays the current running apps): it displays the browser and
also my own app as active. If I select my app, Android wont let my app come to the forefront, instead it shows the device background or the
recently opened browser. It's like the browser has taken over the "identity" of my app.



So, why I cannot return to the activity screen where the ad is located, and from where the click launched a browser tab?



One more thing is that in the sample apps that Appodeal provide, there is no code in onResume, and there isn't any different code from the
Appodeal SDK in the manifest, and yet, the app returns correctly to the main activity after coming from the browser tab. I am also trying to implement Admob ads, and the same effect happens as described in this post.










share|improve this question















Even though there is a similar case here:



After click AdMob ads, I cannot return to my Android app by back button



the code proposed didn't solve my case. So I am posting this if there's somebody with fresh ideas to solve this.



I have coded an app for Android. Now I am trying to add ads to this app.
I am implementing the ads from Appodeal. When I show an ad type called MREC (which is a square-like banner) on my main activity, if I click
on the ad, it will open a tab in the default browser of the device.



The problem arises when I press the square button on the device (the menu that displays the current running apps): it displays the browser and
also my own app as active. If I select my app, Android wont let my app come to the forefront, instead it shows the device background or the
recently opened browser. It's like the browser has taken over the "identity" of my app.



So, why I cannot return to the activity screen where the ad is located, and from where the click launched a browser tab?



One more thing is that in the sample apps that Appodeal provide, there is no code in onResume, and there isn't any different code from the
Appodeal SDK in the manifest, and yet, the app returns correctly to the main activity after coming from the browser tab. I am also trying to implement Admob ads, and the same effect happens as described in this post.







android ads banner-ads appodeal






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 25 at 11:15

























asked Nov 22 at 5:09









Carlos Botero

6428




6428








  • 1




    Please post your activity code so we can see if there are any issues.
    – Sub 6 Resources
    Nov 22 at 5:13










  • there is some problem with your code for sure.
    – Vladyslav Matviienko
    Nov 22 at 6:24














  • 1




    Please post your activity code so we can see if there are any issues.
    – Sub 6 Resources
    Nov 22 at 5:13










  • there is some problem with your code for sure.
    – Vladyslav Matviienko
    Nov 22 at 6:24








1




1




Please post your activity code so we can see if there are any issues.
– Sub 6 Resources
Nov 22 at 5:13




Please post your activity code so we can see if there are any issues.
– Sub 6 Resources
Nov 22 at 5:13












there is some problem with your code for sure.
– Vladyslav Matviienko
Nov 22 at 6:24




there is some problem with your code for sure.
– Vladyslav Matviienko
Nov 22 at 6:24

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53424234%2fclicking-on-an-ad-opens-a-browser-but-i-cannot-go-back-to-the-launching-activit%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53424234%2fclicking-on-an-ad-opens-a-browser-but-i-cannot-go-back-to-the-launching-activit%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Contact image not getting when fetch all contact list from iPhone by CNContact

count number of partitions of a set with n elements into k subsets

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks