• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Clipboard function missing

Yeah same problem here haven't found any solution. Clipboard existed on all my previous samsung J1, J3, J5 I think. I have an M21 now and it's not there. When using the share function on a youtube video or something it says "Copy Link" where it would previously always say. "Copy to Clipboard." I really hate not having a clipboard so I hope someone has the answer.

InterstitialAd's broken Android Studio 4.1.1

New-ish android dev, 15 year experience C, C++, Java, script language dev.

Working with Android Studio 4.1.1 and trying to work out a basic scenario. I've built my main activity with just a button that feeds to a second activity that's a google admob interstitial ad.

The admob activity is just out of the box. I've not modified it from the template other than to give it a name.

Out the door it's using what I understand to be the old library:

import com.google.android.gms.ads.InterstitialAd

Which no longer exists. It should be...

import com.google.android.gms.ads.interstitial.InterstitialAd

Once I compile I get 8 errors. I'm assuming updates to the admob framework make this old template obsolete. I'm not sure what needs to be done to correct this. Is there an updated template I can snag, something that's communal knowledge, or does someone know what's missing from the outdated OOTB template that will get me working?

Here's the code, but I shouldn't need it as we're talking OOTB stuff.

Code:
package com.example.testapp

import com.google.android.gms.ads.AdListener
import com.google.android.gms.ads.AdRequest
import com.google.android.gms.ads.interstitial.InterstitialAd
import android.widget.Button
import android.widget.TextView

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import android.view.Menu
import android.view.MenuItem
import android.widget.Toast

// Remove the line below after defining your own ad unit ID.
private const val TOAST_TEXT = "Test ads are being shown. " +
        "To show live ads, replace the ad unit ID in res/values/strings.xml " +
        "with your own ad unit ID."
private const val START_LEVEL = 1

class ad1PostButtonPush : AppCompatActivity() {

    private var currentLevel: Int = 0
    private var interstitialAd: InterstitialAd? = null
    private lateinit var nextLevelButton: Button
    private lateinit var levelTextView: TextView

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_ad1_post_button_push)

        // Create the next level button, which tries to show an interstitial when clicked.
        nextLevelButton = findViewById(R.id.next_level_button)
        nextLevelButton.isEnabled = false
        nextLevelButton.setOnClickListener { showInterstitial() }

        levelTextView = findViewById(R.id.level)
        // Create the text view to show the level number.
        currentLevel = START_LEVEL

        // Create the InterstitialAd and set the adUnitId (defined in values/strings.xml).
        interstitialAd = newInterstitialAd()
        loadInterstitial()

        // Toasts the test ad message on the screen. Remove this after defining your own ad unit ID.
        Toast.makeText(this, TOAST_TEXT, Toast.LENGTH_LONG).show()
    }

    override fun onCreateOptionsMenu(menu: Menu): Boolean {
        // Inflate the menu; this adds items to the action bar if it is present.
        menuInflater.inflate(R.menu.menu_ad1_post_button_push, menu)
        return true
    }

    override fun onOptionsItemSelected(item: MenuItem) =
            when (item.itemId) {
                R.id.action_settings -> true
                else -> super.onOptionsItemSelected(item)
            }

    private fun newInterstitialAd(): InterstitialAd {
        return InterstitialAd().apply {
            adUnitId = getString(R.string.interstitial_ad_unit_id)
            adListener = object : AdListener() {
                override fun onAdLoaded() {
                    nextLevelButton.isEnabled = true
                }

                override fun onAdFailedToLoad(errorCode: Int) {
                    nextLevelButton.isEnabled = true
                }

                override fun onAdClosed() {
                    // Proceed to the next level.
                    goToNextLevel()
                }
            }
        }
    }

    private fun showInterstitial() {
        // Show the ad if it"s ready. Otherwise toast and reload the ad.
        if (interstitialAd?.isLoaded == true) {
            interstitialAd?.show()
        } else {
            Toast.makeText(this, "Ad did not load", Toast.LENGTH_SHORT).show()
            goToNextLevel()
        }
    }

    private fun loadInterstitial() {
        // Disable the next level button and load the ad.
        nextLevelButton.isEnabled = false
        val adRequest = AdRequest.Builder()
                .setRequestAgent("android_studio:ad_template")
                .build()
        interstitialAd?.loadAd(adRequest)
    }

    private fun goToNextLevel() {
        // Show the next level and reload the ad to prepare for the level after.
        levelTextView.text = "Level " + (++currentLevel)
        interstitialAd = newInterstitialAd()
        loadInterstitial()
    }
}

Here are the errors

...testapp\ad1PostButtonPush.kt: (62, 16): Cannot create an instance of an abstract class
...testapp\ad1PostButtonPush.kt: (63, 13): Val cannot be reassigned
...testapp\ad1PostButtonPush.kt: (64, 13): Unresolved reference: adListener
...testapp\ad1PostButtonPush.kt: (69, 17): 'onAdFailedToLoad' overrides nothing
...testapp\ad1PostButtonPush.kt: (83, 29): Unresolved reference: isLoaded
...testapp\ad1PostButtonPush.kt: (84, 34): No value passed for parameter 'p0'
...testapp\ad1PostButtonPush.kt: (97, 25): Unresolved reference: loadAd

Reviews A10e is a winner!

I have owned the Galaxy A10e for three months. My carrier is Tracfone which piggy-backs Verizon in my neck of the woods. I just say that IMHO the A10e is an amazing little smartphone. I have owned a J3 and a J7 Skypro. I like their screen dimensions. However there was a good deal at $70.00 for a new A10e and I decided to drive to the store and buy it. I really like it!

Yesterday the OS was updated to Android 10. Didn't know that was going to happen. All things work great with the phone and my carrier. My cost is about $120.00 a year to use data, calls and texts.

The phone is just the right size for me and I carry it in a belt-holster, which is just the right size for the 5.8" screen of the A10e.

I think in terms of budget phones combined with Tracfone this is a winner!

Even at 4G it's going to be around IMHO for years to come. I don't want phones with over 6" screens. I will probably buy another one of these just as a backup. Small smartphone are going the way of the dinosaurs. However, the smartphone flips are interesting but the pouch I have is rugged and fits all my business cards behind the phone.

I hope this helps anyone sitting on the fence. It's a darn good phone for under $100.00.

System in Settings

Ah, that is a setting in maps. Do you connect to your car via bluetooth? If so, you need to have the car radio on media to hear the commands through the car speakers. If you want the sound to come through your phone speaker follow the steps below:
  1. go to the maps app
  2. tap your avatar at the right end of the search box
  3. tap the gear icon for settings
  4. scroll down to Navigation settings
  5. toggle the option to "Play voice over bluetooth
You will also notice some other voice options in there that may be of interest.

Help Has Google Play Stopped? Read THIS...

Ever since Play store changed Interface and got rid of hamburger menu I have been experiencing weird annoying problem.
Let's say I type something in search bar, I instantly get the search results suggestions , I click on the suggestion I get the results, but then if I wanna add something to my search request in the bar ,another word,number or even space,as soon as I add another single character the Play store crashes.
I tried all the usual fixes, clearing data ,cache,uninstalling Play store,Play services,download manager.After Play store gets automatically reinstalled,for a while I get Interface with the hamburger menu but then it gets changed to new interface after few hours and the problem returns.Any tips would be appreciated, even though done probably all of the solutions, except factory reset.
Running non rooted LG velvet 5g on Android 11.

Filter

Back
Top Bottom