• Breaking News

    Sunday, December 1, 2019

    Android Dev - Should I switch to mopub?

    Android Dev - Should I switch to mopub?


    Should I switch to mopub?

    Posted: 01 Dec 2019 07:59 AM PST

    I have an utility app and I'm currently using admob with banners. I'm working on switching to native ads and I just read about mediation and mopub.

    Some say mediation is always a better choice, but I read someone say mopub requires a certain amount of traffic otherwise it's not worth it. My traffic is still small but the app is constantly growing and it seems it could get big over time.

    But traffic aside, I'm a bit worried about the random account terminations with admob and I'd like to prepare for that, and if there's any revenue increase that'd be nice too.

    What do you guys think? Should I switch to mopub now for native ads, and use admob as well as other networks through that?

    (Kind of a self answering question but I'd like to hear some thoughts from experienced devs)

    submitted by /u/ZealousidealShoe
    [link] [comments]

    Rules around telling users to change settings

    Posted: 30 Nov 2019 11:22 PM PST

    I have essential notifications that need to be turned on for the app to function.

    If a user tries to go online whilst a certain notification channel is disabled, I show a Toast-like message saying:

    "Matches" notifications are disabled. Enable them in settings before going online. 

    and prevent them from going online.

    Is this against Google Play policy?

    submitted by /u/GerrardSlippedHahaha
    [link] [comments]

    Best practice for getting non onservable data from Room

    Posted: 30 Nov 2019 11:41 PM PST

    I have been learning how to use Android Room. For operations on the database they require the operation to not occur on the main thread, that makes sense to me. For getting data back, the examples use Livedata, allowing the UI change automatically when data is changed. I have found this very useful in most cases.

    However, when it comes to getting data out of the database not for UI, but for program logic purposes I find myself struggling. Using Livedata and listening for change seems incorrect and impractical. This causes the logic to go into the observe method and I may not need to run that logic everytime the data changes. The only other options I know to get the data out without LiveData is to either allow operations on the main thread, or create an async task and simply block till the task is finished. I have been using the async taks option but was wondering if there are better methods or best practices that I have missed.

    Thanks.

    submitted by /u/novaorionWasHere
    [link] [comments]

    Help me setup Google Play merchant account

    Posted: 01 Dec 2019 07:23 AM PST

    Like the title says, I want to setup a merchant account. I want to know more about the two fields that needs to be filled. The first is "Name" and the second "Business name". Here are my questions

    1. Which one of those will be visible to each user that buys my app, both?
    2. I assume "Name" means my personal name but I highly don't want my real personal name to be visible to anyone except Google. So what options do I have (if any)?
    3. Can I use my developer name as "Business name" even when I don't have registered company?

    Thanks for your help.

    submitted by /u/drunkmax00va
    [link] [comments]

    Nested fragments onCreate gets called, but onViewCreated does not get called.

    Posted: 01 Dec 2019 06:50 AM PST

    So I am trying to nest fragments ,and it's not really working out. I am managing to add them into the childFragmentManager, and the onCreate gets called, but I cannot show them, the onViewCreated does not get called, and I have no idea why.

    Here is the parent fragment:

    class MenuViewController: Fragment(), LoadingProtocol {

    private var loadingCircle : LoadingProtocol? = null private var circleActive = false private var materialViewController = MaterialTableViewController() private var videoTableViewController = VideoTableViewController() companion object{ var tabSelected = Tabs.Pdf var topicChosen = TriviaQuestion.Topic.anamnesis } override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { return inflater.inflate(com.madortilofficialapps.tilquiz.R.layout.fragment_menu_view, container, false) } override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) //loadingCircle = LoadingView(frame: CGRect(x: screenSize. width/2 - 50, y: screenSize.height/2 - 100, width: 100, height: 100)) childFragmentManager.beginTransaction().apply { add(R.id.fragmentFrame, videoTableViewController, "videoView") hide(videoTableViewController) addToBackStack(null) setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE) commit() } childFragmentManager.beginTransaction().apply { add(R.id.fragmentFrame, materialViewController, "materialView") show(materialViewController) addToBackStack(null) setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE) commit() } childFragmentManager.executePendingTransactions() videoTableViewController = childFragmentManager.findFragmentByTag("videoView") as VideoTableViewController materialViewController = childFragmentManager.findFragmentByTag("materialView") as MaterialTableViewController // childFragmentManager.beginTransaction().apply { // add(R.id.fragmentFrame, materialViewController) // show(materialViewController) // addToBackStack(null) // commit() // } videoTableViewController.delegate = this materialViewController.delegate = this tabHandler() videoTabButton.setOnClickListener{ view-> childFragmentManager.beginTransaction().hide(materialViewController) childFragmentManager.beginTransaction().show(videoTableViewController) tabSelected = Tabs.Video tabHandler() } triviaTabButton.setOnClickListener { view-> childFragmentManager.beginTransaction().hide(videoTableViewController) childFragmentManager.beginTransaction().show(materialViewController) tabSelected = Tabs.Quiz tabHandler() } PDFTabButton.setOnClickListener { view-> childFragmentManager.beginTransaction().hide(videoTableViewController) childFragmentManager.beginTransaction().show(materialViewController) tabSelected = Tabs.Pdf tabHandler() } } fun tabHandler(){ when(MenuViewController.tabSelected){ Tabs.Quiz -> { triviaTabButton.setColorFilter(ContextCompat.getColor(context!!, com.madortilofficialapps.tilquiz.R.color.lightGray)) videoTabButton.setColorFilter(ContextCompat.getColor(context!!, com.madortilofficialapps.tilquiz.R.color.darkGray)) PDFTabButton.setColorFilter(ContextCompat.getColor(context!!, com.madortilofficialapps.tilquiz.R.color.darkGray)) } Tabs.Video -> { triviaTabButton.setColorFilter(ContextCompat.getColor(context!!, com.madortilofficialapps.tilquiz.R.color.darkGray)) videoTabButton.setColorFilter(ContextCompat.getColor(context!!, com.madortilofficialapps.tilquiz.R.color.lightGray)) PDFTabButton.setColorFilter(ContextCompat.getColor(context!!, com.madortilofficialapps.tilquiz.R.color.darkGray)) // transaction.replace(com.madortilofficialapps.tilquiz.R.id.fragmentFrame, videoTableViewController).commit() //if (!videoTableViewController.isLoaded()) { // startLoading() //} } Tabs.Pdf -> { triviaTabButton.setColorFilter(ContextCompat.getColor(context!!, com.madortilofficialapps.tilquiz.R.color.darkGray)) videoTabButton.setColorFilter(ContextCompat.getColor(context!!, com.madortilofficialapps.tilquiz.R.color.darkGray)) PDFTabButton.setColorFilter(ContextCompat.getColor(context!!, com.madortilofficialapps.tilquiz.R.color.lightGray)) // transaction.replace(com.madortilofficialapps.tilquiz.R.id.fragmentFrame, materialViewController).commit() // if (!materialViewController.isLoaded()) { // startLoading() // } } } } //MARK - LoadingProtocol Functions override fun finishLoading() { print("finishLoading") if (circleActive){ //loadingCircle!.removeFromSuperview() circleActive = false } } override fun startLoading() { print("startLoading") if (loadingCircle != null){ circleActive = true //this.view.addSubview(loadingCircle!) } } // MARK: - Navigation 

    // override fun prepare(for segue: UIStoryboardSegue, sender: Any?) { // if (segue.identifier == "tabBarToHome"){ // MenuViewController.tabSelected = Tabs.Pdf // } //}

    }

    and here is one of the nested fragments:

    class VideoTableViewController: Fragment(), refresher {

    // private var playerView : PlayerView? = null public var topic = MenuViewController.topicChosen private val model = MenuBarDatabaseFacade() private var Videos : MutableList<Video> = mutableListOf<Video>() var videosLoaded = false var delegate : LoadingProtocol? = null

    override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) Log.d("aaaaaaa", "bbbbbbbbbbbbb") //var playerView = view!!.findViewById<com.google.android.exoplayer2.ui.PlayerView>(com.madortilofficialapps.tilquiz.R.id.playerView) } override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) Log.d("aaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaa") topic = MenuViewController.topicChosen prepareVideoDatabase() videosRecyclerView.layoutManager = LinearLayoutManager(activity) videosRecyclerView.adapter = VideoTableViewAdapter(Videos) { position -> //findNavController().navigate(R.id.action_MainMenuFragment_to_MenuViewFragment) playVideo(position) } } fun prepareVideoDatabase(){ this.model.videoDelegate = this Videos = Video.getVideos(topic) model.getVideos(topic) } override fun refreshUI() { Videos = Video.getVideos(topic) videosLoaded = true if (delegate != null){ delegate?.finishLoading() } //reloaddata } //MARK play videos fun playVideo(position : Int) { if (Videos[position] != null){ val selectedVideo = Videos[position] val videoPath = selectedVideo.videoURL //val videoPathURL = URL(string: videoPath) //player = AVPlayer(url: videoPathURL!) //videoPlayerController.player = player //this.present(videoPlayerController, animated: true, completion: nil) } } //MARK Get functions fun isLoaded() : Boolean{ return videosLoaded } 

    }

    As you can see I have a log in the onCreated and onViewCreated. The onCreated gets called as soon as I open the parent fragment, but after that nothing happens. Any idea how I can fix that?

    submitted by /u/dannyjayes1
    [link] [comments]

    How to add ML models in android studio?

    Posted: 30 Nov 2019 07:40 PM PST

    Hi. I have a tensorflow model ready. I know that we have to convert tensorflow file to tflite. But there is no step by step explanation anywhere about how to do this and how and where to add the model in android studio. Any guide in the right direction or any tutorial depicting the same will be appreciated. Thanks!

    submitted by /u/skeptic_mind7
    [link] [comments]

    Is it possible to pass a list of objects one by one to make simultaneous retrofit calls?

    Posted: 01 Dec 2019 03:58 AM PST

    Hello,

    I have a list of objects that I retrieve from storage, the objects each contain 2 strings that will be used as parameters to be passed to a retrofit request. For each object I need to make a separate call to the Api. I need to have all the responses ready before loading them to the UI. Any suggestions on how I should go about doing this? Is this possible or recommended? Is there a better way of doing something like this? Do I need to use RxAndroid?

    submitted by /u/VisualDeveloper
    [link] [comments]

    mDNS

    Posted: 01 Dec 2019 03:33 AM PST

    What is the current status of mDNS on Android?

    submitted by /u/MartynCurrey
    [link] [comments]

    Java console app conversion tips

    Posted: 01 Dec 2019 12:06 AM PST

    I'm trying to convert my Java console app (runs in terminal) to an Android app with a nice GUI.

    Do any of you have advice or articles that could help me out?

    Specifically:

    • I've created my screens/activities
    • I've imported my Java console files into Android separately
    • I'm struggling with figuring out how to link my original java files into the new Android java activity files.

    Any help/articles would be greatly appreciated. I know this is a novice question, but for some reason I can't Google my way to an answer.

    submitted by /u/shittycomputerguy
    [link] [comments]

    Should I start learning any additional language with Android Native?

    Posted: 30 Nov 2019 09:32 PM PST

    I've been learning Android Native for more than 2 months and I'm getting better at basics but now when I see the market here (in India) and specifically in my city there is a very little demand for Android native devs. I have a little history with js. So, Should I learn languages like React Native or any other beside native?

    submitted by /u/sastasherlock
    [link] [comments]

    Implementing login restriction to a single device.

    Posted: 30 Nov 2019 09:13 PM PST

    I have to implement a feature, allowing the user to login only from a device that they first used for logging in.

    I basically want to bind a user to a device. How can I uniquely identify a device; a fool proof and practical approach.

    Where specifically do I start ? Any helpful feedback and resources are appreciated.

    submitted by /u/nalphadev
    [link] [comments]

    Mopub GDPR dialog

    Posted: 30 Nov 2019 04:44 PM PST

    Looking into using mopub, but is it just me or the GDPR dialog would be terrible UX? It's fullscreen and it has yes/no buttons (as opposed to e.g., "show me tailored ads"/"show less personalized ads"), so 99% users will automatically click "no" without even reading. It's also terrible to have as the first fullscreen thing on app launch, it'd be much better if it was an in-app dialog.

    Is there an alternative dialog or is that the only one? Is everyone using mopub really showing this on app launch in their app?

    submitted by /u/ZealousidealShoe
    [link] [comments]

    Remove my account from old projects in Google Play Console

    Posted: 30 Nov 2019 09:35 AM PST

    I have two projects I was a part of that both apps were removed from violating Google Play policies. This happened around 3 years ago and I think I did not receive any strikes on my personal account (is there a way to actually check this?). Anyway, I would very much like to clean up my account and not have any remaining connection to these projects but there are no options to remove a dev account from a project not owned and also I have no way to contact these old clients. Is there anything I could do? If an app is removed due to policy violation can it still harm me in any way in the future?

    submitted by /u/tiago7s
    [link] [comments]

    Service (event bus subscriber) not receiving post from Activity

    Posted: 30 Nov 2019 06:24 PM PST

    database for kotlin

    Posted: 30 Nov 2019 11:42 PM PST

    I want to create a kotlin android app, and a web site for my app. My question is, how can I make a database that I can use in both platforms?

    I was thinking of making a node js app and consuming its API by a HTTP request from both apps, is that the right way to do it?

    submitted by /u/mrkinix
    [link] [comments]

    Open my app when QR-Code is scanned

    Posted: 30 Nov 2019 09:42 AM PST

    I'm trying to figure out a way to have a qrcode open my app to a specific activity. Is this possible? I've looked on stackoverflow and found the answers mainly answering how to create a qr-code which is less than helpful.

    submitted by /u/Stem3576
    [link] [comments]

    How to get the best match of multiple-resources, each with different qualifiers?

    Posted: 30 Nov 2019 03:04 PM PST

    Android has a built in algorithm to get which resource to use in case there are multiple being offered, each with a different qualifier (see table 2 here).

    I want to mimic this algorithm, or even use it directly on simple strings.

    Meaning that if I'm on a device with some specific configuration, and provide it with some strings that each is the resource with the qualifier, it will tell me which to use.

    Example of an app icon : I'm on a device with screen density of XXHDPI and on Android Q, and the input I send it is those strings : "res/mipmap-mdpi/ic_launcher.png" , "res/mipmap-xxhdpi/ic_launcher.png" , and "mipmap-anydpi-v26/ic_launcher.xml" .

    On this case, it will tell me to use the "ic_launcher.xml" option.

    How can I do this? Should I go over the table and implement identification of each, by this order?

    The reason I ask this question is that sadly Google is planning to ruin storage permission (use SAF instead), which means I won't be able to parse APK files normally outside of the app's path, so I try to use workarounds to get app-icon and app-name, such as using an APK parser library, and even creating VectorDrawable out of a binary XML content

    submitted by /u/AD-LB
    [link] [comments]

    Help! Can't Search My App/Game on Play Store.

    Posted: 30 Nov 2019 09:01 PM PST

    I've just published an app/game on Playstore, and it's already in "Published" status for a week now, but I can't still search my app on the Playstore. I tried every way of searching it, using the full name of the app, my developer name, package name of the app (I don't know if this works though).

    My app is very simple and common Math Game, and I know that there are a lot of Math Games out there and mine might be overshadowed by all of those, but my app really doesn't show up even up to the end list of the search results.

    Does it really take that much long for a newly published app to be searchable? or there is something I missed when publishing it?

    The link of the app is working though, I've tried downloading it directly from the link an its working just fine.

    Here is the link: https://play.google.com/store/apps/details?id=com.reueljohn.numerals.mathgames

    Feel free to try it and rate it if you like, Thank You

    submitted by /u/Leur_Ami
    [link] [comments]

    How To Create Menu Attachment Popup Like WhatsApp on Android

    Posted: 30 Nov 2019 09:00 AM PST

    Well, I think the popup menu on WhatsApp is creative. My inner curiosity kicks in and voila https://medium.com/@rifqi416/how-to-create-menu-attachment-popup-like-whatsapp-on-android-d4d45a38e1c4. It's not 100% the same but I would say it's close enough with the real one.

    repo: https://github.com/rifqimfahmi/Attachment-Menu-Like-WhatsApp

    submitted by /u/rifqimfahmi
    [link] [comments]

    Load Video from listview to VideoView programmatically

    Posted: 30 Nov 2019 12:07 PM PST

    How would you programmatically load a chosen video from a listview into a videoview without using exoplayer library?

    submitted by /u/Televurr
    [link] [comments]

    No comments:

    Post a Comment