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

App Inventor Button makes the to return to the main activity

Hey. I want to make a button which makes the app to move to another activity.
I did it a few times with this app with no problem, but for some reason, this simple button, when I click it, there is a black screen for half a second and it returns to the main activity.

Java:
  explanation.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent toExplanation = new Intent(getApplicationContext(), ChoiceExplanationActivity.class);

                startActivity(toExplanation);
            }
        });

This is what I'v done in the activity which the button is in.

Java:
public class ChoiceExplanationActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_choice_explanation);

        TextView choiceExplanation = findViewById(R.id.explanation);


        choiceExplanation.setText("ok");
    }
}

And this is the activity which it should lead too.
When I looked at the log when clicking the button, I found this line which I think is the problem.

Code:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.appdeveloping/com.example.appdeveloping.ChoiceExplanationActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference

Thanks for the help.

Android Auto not working with Google Pixel 3a XL

I've recently upgraded my phone from a Samsung Galaxy S 8+ to the Google Pixel 3a XL. My head unit is the Kenwood DDX9704S using the Maestro iDataLink for connectivity. I have gone through the set up on the Android Auto app before connecting my my head unit.

The issue is that I am receiving an error while plugging into my head unit, the head unit says that I need to Agree to the ToS prior to using and my phone just says that my car needs to be in park then it will resume.

I have already agreed to the ToS and I am still receiving that error. I've read online that it could be because the parking brake switch has a poor connection. I personally don't see how that could be the issue due to the fact that my S8+ did not have these issues on this head unit.

Any help or guidance would be appreciated.

No sound from phone speakers on Bluetooth

Up until about a month ago, if I connected my phone via Bluetooth to my car, my phone notifications still made sound on the phone. Then an app called Smart Things seemed to hijack my phone any time I used Bluetooth. Do I need to be using that app to play through the car speakers (which I do with podcasts, etc). I still want my phone to play the notifications.

I did turn off (force stop) Smart Things, but the notifications still aren't playing when on Bluetooth. Any ideas what I've done?

I don't know what makes my account so attractive, but...

I just got another email from AF asking me for 2 step verification with an email password. I looked up the IP and it was someone trying to hack my account from France. Maybe because I'm a moderator made it a fun sport for them? Believe me, there's nothing in my life worth hacking.

So, I changed my PW via lastpass to a 99 character password. That'll keep them guessing, no?

Note 4, can't send receive images

I just upgraded from a note 2 to a note 4 and moved my sim card over. I worked with carrier to set perimeters, but nothing I do will allow me to send or receive images. If someone sends me an image, the text app shows "multimedia message" with a download button. It never downloads. If i try with Facebook's messenger, a popup says blocked by carrier, but carrier denies it.
As an aside, this phone was originally on Verizon, and many of Verizon's apps can't be deleated, including the first screen when booted.

A new small icon appeared

Hi everybody, I love you all.
My device is galaxy A50 with android 9.0.
A few days ago I've noticed a small new icon at the left-down corner . the icon changes by opening apps. when I tap it the app info appears on the screen of the app on the icon.my question is:
1.does any one know why does this icon appear?
2.Is a built in one or a third party one?
3.what is the function of it?
4.Is it possible to remove it from the screen and how?

Help resolved, File Manager, manage files based on ID3 tags.

I’m using a Moto One with latest version of Android. Right now all my music files are in one directory. I’d like to separate them into different directories based on the mp3 ID3 ‘’genre’’ tag. Is there a file manager that can find files based on mp3 ID3 tags? I want to locate all files with particular ID3 genre tags and bulk move them to a different directory. I’ve searched on google and in the Play Store and didn’t find any apps that can do this. Anyone know of such an app? Thx,

AsyncThread cancelled even is success background opration onPostExecute not called

Hi,

i have problem with my application, i have following AsyncTask and even is
executed it goes to onCancelled instead of onPostExecute.
Java:
    private class UserRegisterTask extends AsyncTask<Boolean, Boolean, Boolean> {

        private final String mEmail;
        private final String mPassword;
        private final String mFirstName;
        private final String mLastName;
        private final String mAddress1;
        private final String mAddress2;
        private final String mCity;
        private final String mZip;
        private final String mState;
        private final ProgressDialog dialog;
        private final boolean mNewsletter;

        private boolean registered = false;

        public UserRegisterTask(Activity activity, String email, String password, String firstname, String lastname, String address1, String address2, String city, String zip, String state, boolean newsletter) {
            mEmail = email;
            mPassword = password;
            mFirstName = firstname;
            mLastName = lastname;
            mAddress1 = address1;
            mAddress2 = address2;
            mCity = city;
            mZip = zip;
            mState = state;
            mNewsletter = newsletter;
            dialog = new ProgressDialog(activity);
        }


        @Override
        protected void onPreExecute() {
            super.onPreExecute();
            registering = true;
            dialog.setMessage("Registruji a přihlašuji, prosím čekejte...");
            dialog.setCanceledOnTouchOutside(false);
            dialog.show();
        }

        @Override
        protected void onCancelled() {
            super.onCancelled();
            dialog.dismiss();
            registering = false;
            Toast.makeText(getBaseContext(), R.string.registration_cancelled, Toast.LENGTH_SHORT).show();
        }

        @Override
        protected Boolean doInBackground(Boolean... booleans) {
            registered = authService.register(mFirstName, mLastName, mEmail, mPassword, mCity, mAddress1, mAddress2, mZip, mState, mNewsletter);
            return Boolean.TRUE;
        }

        @Override
        protected void onPostExecute(Boolean success) {
            super.onPostExecute(success);
            dialog.dismiss();

            if (success && registered) {
                Toast.makeText(getBaseContext(), R.string.registration_success, Toast.LENGTH_LONG).show();
                redirectToHomepage();
            } else {
                email.setError(getString(R.string.email_is_already_registered));
                email.requestFocus();
            }
        }
    }

Navigation during a phone call

guys - i'm about to move from iphone (forced by company) back to android. While driving with android auto if you are on a phone call (everything wired in to the car) and also have google maps navigation, does google maps read aloud directions or simply beeps without disrupting the phone call and when it beeps, I can simply look at the screen to figure out the next turn

Pie problems!

Was very happy to finally get Android 9 (Pie) on my unlocked LG G7 Thinq about a month ago. Oreo was working great, so I should have been a little more skeptical.

And now I'm really regretting it!

Anyone have any solutions to these issues? (which came with Pie):

- The "WiFI Calling" switch in settings randomly turns itself off! I'm on T-Mo, so seamless WiFi calling is critical in my area inside some buildings. This is NOT a case of the phone deciding to not switch to WiFi, rather the virtual switch in settings MOVES ITSELF TO THE OFF POSITION. I find myself surprised to see "Emergency Calling Only" when I try to make a call, then find WiFi calling is turned off.

- "Do Not Disturb" ignores schedules. For the year I've used this phone, it flawlessly went into DND at 10PM, then came out of it at 6AM, as selected by the schedule in settings. No longer after Pie. I can turn on DND manually, but IT IGNORES ANY SCHEDULE.

- Battery drain is awful. I've cleared cache, then reset the phone to no avail. Before Pie, I'd see 6-8% drain overnight (doze mode, I guess). But after Pie, with the same setup, the battery will drop 15-20% overnight. Faster discharge during the day as well.

Terribly disappointed in LG. This is their flagship from last year. It took forever to get Pie, so you'd think it would be right. And I'm afraid that these problems will never be fixed.

Unity project with c++ dll 32 bit - Google Play Store 64 bit requirements

Hi,
I have Unity project with DLL prepared for architectures: x86, x86_64, armeabi-v7a. I haven no possibility to convert DLL to architecture arm64-v8a. However if I build apk for armeabi-v7a only, it works on 64bit device. But for Google Store I need to build it with arm64-v8a compatibility - this version of application doesn't work because there is error that 64 bit DLL not found.

Is there any possibility to solve this problem? Maybe there is some possibility to modify apk file after build (i.e. it would pretend 64bit package, but works as 32 bit)?

And why is it working on 64bit device when build with ARMv7 setting in build?

Thanks in advance for help.

Filter

Back
Top Bottom