Closed Nick-infinity closed 5 years ago
Hello, yes you can implement Banner ADS in the library. I'm busy with my personal projects, but if I get free time, I'll implement and update the library. Till then, you can head over to Developers.google.com for code snippets & tutorial.
@sadiqrazasyed Thanks a lot for your enhanced dashboard and quick reply. Kindly consider addition of native ads and banner ads too in your free time.Till then I will try adding them.
@sadiqrazasyed Bro I need one small help. Idk how to enable the "crop" check box in android 8 devices. Crop button is being shown in below API 27 devices but not in API 27 device . I am talking about crop button in the apply section
I compared my library with Dani's and it's up to date. You can see the line #84 here for the commit.
public WallpaperBoardConfiguration setCropWallpaperEnabledByDefault(boolean enabled) {
mIsCropWallpaperEnabledByDefault = enabled;
return this;
}
It's enabled by default. Can you check Dani's library & see if it's working or not?
@sadiqrazasyed Hello again , I have tested it with the Danis library but I'm getting the same result. No crop option in Oreo devices but in below Oreo devices crop option is there.
From crop option I mean this-
Crop checkbox - on API 27 below device https://photos.app.goo.gl/ZzrKRc1Wq3zUi18Q9
Oreo device - Crop check box not shown- api27(oreo) https://photos.app.goo.gl/1r73qakbjsHKwpXc9
Can you please check this line #168
PS: I have tried setting #168 Boolean to true. But same result
@Nick-infinity @Nick-infinity I have fixed the issue , the bug for which the crop option was disabled has been fixed by Google and now there is no crash in android Oreo devices on setting croped wallpaper.
To enable the crop button on Oreo again Check out
Line #114 Here:
And comment out the if condition and leave the code inside it as it is.
To set the crop option enable by default on Oreo devices
Check out line #169 Here
and remove line #169 , #170 and #171
PS: I have added banner ads and pro button in navigation drawer.
@sadiqrazasyed There's only one issue left for me now that I can't solve and need your help. I have set the remove ads button at top position in navigation drawer. And now when ever I click on any item in navigation drawer example "favourites" the favourites gets opened but the "wallpaper" gets highlighted in navigation drawer instead of "favourites" . One previous item gets highlighted. Do you know how to set the correct position of highlighted text or which file to look into to change the positions
I wanna ask in which file are the positions of the items in navigation drawer defined
I'm glad you found a fix yourself. Coming to your query, have you written an activity for "remove ads" or an Intent which opens Play Store? Android Material Drawer generally starts with the first activity (first menu on the drawer) which causes this. I suggest you bring the "remove ads" menu right below "donate" and it should work just fine.
Example - Inside WallpaperBoardActivity.Java
else if (id == R.id.navigation_view_donate) mPosition = 4;
else if (id == R.id.navigation_remove_ads) {
String url = (getString(R.string.pro_app_url));
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
return false;
}
And inside menu_navigation_view.xml
<group android:id="@+id/optional"
android:checkableBehavior="single">
<item
android:id="@+id/navigation_view_donate"
android:icon="@drawable/ic_drawer_donate"
android:title="@string/navigation_view_donate"/>
<item
android:id="@+id/navigation_remove_ads"
android:icon="@drawable/ic_remove_ads"
android:title="@string/navigation_remove_ads"/>
Lastly, dashboard_strings.xml
<string name="navigation_remove_ads">Remove Ads</string>
<string name="pro_app_url">https://play.google.com/store/apps/details?id=xyz</string>
But if you really want it to be on top, then I'll have to import the project again and see how Dani has implemented the drawer but I'm currently working on a client project so give me some time or just try what I said.
Cheers.
@Nick-infinity can u plz tell me how u add banner ad and is it working properly ??? plz
@sadiqrazasyed plz add banner add its too long now u r not active plz fix that final problem
@Nick-infinity which exact xml should i use for adding the banner addd??
Is banner ads going to be added soon? with the way current ads work its really hard to make any money out of ads even on apps with like 10k+ active users. i just wanted to know if you will make soon or i just have to start doing it myself?
May I know if it's possible to add the option of banner ads or not. And what's the reason of not adding it in first place.
I would like to add banner ads in between of wallpaper scrolling. Can you pls provide me with links of some tutorials to do the same.