Ad-like popups in android application - java

Is it possible to have ad-like pop-ups without using 3rd party JAR (like AdMob, etc) inside my own adnroid application?
The requirement is to show a banner (referencing to a link, the ad is related with the app itself) within the android application when connected to the internet.
Thank you for your help in advance! :D

To show ad like popup you either you can use any 3rd party library or you can do it with your self using webview. Here you do not want to use third party library, so I suggest you to use WebView. Whatever your link contains, just show it in banner, like Javascript, Html or Ad Image, you can show it in WebView which will looks like a banner. For this you have to do one thing only and it is, you have to design webview and its position looks like Ad banner. That's it.

Related

React Native - Opening Android Image Gallery Directly

As the title states, I am wondering how to open the Android image gallery directly from my app. Every single package that is out there, including react-native-image-picker, react-native-image-crop-picker, and yes, even Expo's expo-image-picker all open the "Recents" area!
Opening the gallery MUST be possible, since apps like Whatsapp, Tinder, Facebook, etc. all have this functionality when choosing pictures.
Such a simple functionality - and yet after a month of on and off search I have come up with no solution. Can anybody provide me with a way to do this? Or guide me in the correct direction? At this point I am prepared to write native Android code or custom React Native to get this to work.
i found this library
react-native-multiple-image-picker
it will open camera roll not recent file

How to show dialog when app is in background in android app like collect app

image
I am sharing a link from another app like youtube to my app but Now it opens my app and then saves the link. My need is to not save the link without opening the app
There are two solutions:
You don't need dialog or anything like it. Just make the activity fully transparent, process data and finish it. Optionally, you can show Toast as a feedback. It would look and feel like everything is processed in the background.
You need dialog or some kind of UI. For this, you can use floating windows that you can show over other apps. Many apps use this approach such as Pocket, etc. There is complete guide on how to do it: https://localazy.com/blog/floating-windows-on-android-1-jetpack-compose-room

Android/Java - refresh activity like in gmail app

I don't really know how to name it. In android gmail app or google now, etc it's possible to refresh data by all content down and then release it. All data are refreshed, with nice animation.
I'm looking for solution how it's done and how can I do the same in my own application. Do you have any examples, tutorials etc? How to develop this kind of "pull to refhresh"?
[edit]
What is better - 3rd party lib or Android SDK functionality? I'm looking for look like closest to gmail app.
There is a SwipeToRefreshLayout in android which is used to to that.
https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html
Here is one of the tutorials
http://antonioleiva.com/swiperefreshlayout/
Read below lib for refresh your page :
https://github.com/chrisbanes/Android-PullToRefresh
This lib support :-
ListView
ExpandableListView
GridView
WebView
ScrollView
HorizontalScrollView
ViewPager
There is a Pull to refresh library which is mostly used. It is very easy to implement. From here you can download it.
Pull To Refresh for Android
Just import the library into your IDE, and add it your project as a dependency. An example is also included form which you can get coding related help.

Android WebView and html5 vids

Please, is there any way to force WebView to play html5 embedded vids? I spent two days tempting it (from just enabling js and plugins with hardware acceleration to using html5webview class) and made video tag working, but embedding with iframe only shows me preview.
Any suggestions, please?
Does it play if you click on it manually? There are all sorts of things that may go wrong with HTML5 video on the internet, on Android you also have to take into account the various permissions.
Try this first:
Load the webpage in a browser - does it work?
Load the webpage in the browser on the device, does it work?
Load the webpage in the webview, does it play when you click on it?
There should be an auto play property on the webview, but I know that one IOS at least that one is ignore and the video won't play until you click it.

Is it possible to add a facebook like button on a Java application?

I don't want a pop up, I want an actual Facebook like button, has anyone got any idea how I would go about it? Is it against Facebook policy?
Thank you
I don't think this is anything specific to Java. Just use whatever method of generating HTML you are using, and put the tags in to load the Facebook javascript SDK and put an fb:like element on the page.
Currently there is no API by which you can create a Like directly - the only way a user may "Like" something on Facebook is using their Like button code embedded in the standard way.
You can create your own actions on the timeline that look like a "like", you just need their permission. You can use OAuth to get that, google can help you find examples of Facebook clients in Java.

Categories