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

Null Object Reference :/

Hi friends, I've created the following class.
Code:
public class Common {

    public static Location currentLocation;
}

I can see the location using Log.d in the activity I'm assigning a location to.

MainActivity.class (location assignment class)
Code:
private void BuildLocationCallBack() {
    locationCallback = new LocationCallback(){
        @Override
        public void onLocationResult(LocationResult locationResult) {
            super.onLocationResult(locationResult);

            //Common.currentLocation = locationResult.getLastLocation();
            Common.currentLocation = new Location(locationResult.getLastLocation());

            Log.d("Location", Common.currentLocation.getLatitude()+"/"+Common.currentLocation.getLongitude());
        }
    };
}

Okey. But when I copy and paste the same line of Log.d over a different fragment, I get the following error;

TodayFragment.java
Code:
Log.d("Location",
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_today, container, false);

    Log.d("Location",Common.currentLocation.getLatitude()+"/"+Common.currentLocation.getLongitude()));

    return view;
}

Result;
java.lang.NullPointerException: Attempt to invoke virtual method 'double android.location.Location.getLatitude()' on a null object reference

Null object reference error. What could be the problem? Can you help me. Thank you.[/code]

FireBrick Is FireSTUCK

After a couple of years of happy usage last night, my Firestick 2nd gen, got stuck on the home screen, and is now unresponsive to both the selector button, as well as the restart routine, (Holding down select and Play/Pause at the same time until it restarts).
I did a couple of hard restarts by unplugging it, and then plugging it back in, and it went through the entire startup routine, including the red "fire TV"" startup logo, and then it opened to the same frozen unresponsive uncooperative (Like my ex wife) screen.
I tried another remote, and that did not work either.
Just to see what would happen I blocked it on my network, since wifi blocking will take you to the "home is unavailable" firestick screen, which it did, but once I got there, the "Go to network settings" and "dismiss" options were unresponsive as well.
I don't mind having to reset it if I have to, but so far I haven't come up with a way to make it work.

All help appreciated.

Help Android Pie update is coming to the HTC U11 in late May

https://www.xda-developers.com/htc-u12-u11-plus-android-pie-q2-2019/

Over on Twitter, HTC now says that the Android Pie update is coming to the HTC U11 in late May and to the HTC U11+/HTC U12+ in June. It seems odd for the company to roll out the latest release to its current flagship after its previous generation flagship, but we don’t really expect much from the company that’s trying really hard to convince us it’s not dead. In August of 2018, HTC confirmed that all 3 devices (and the U11 Life) would receive the Pie update, but so far only the Android One-powered U11 Life has received the update.

* HTC may not have given up on smartphones just yet, but there is little left for consumers to stick around for. The Taiwanese OEM, which was once a contender for the pole position for the top Android smartphone brand, is now trying hard to attract new customers or even keep the old ones. HTC’s plans for 2019 included focusing on existing U12+ flagships as well as releasing new phones. This plan does not seem to be going as well as, despite the Android Pie announcement in August 2018, HTC has now confirmed that several of its devices will not receive Android Pie sooner than Q2 2019.

HTC’s update plans involved rolling out Android Pie to the HTC U11, U11+, U11 Life (based on Android One) and the U12+. Of these, only the U11 Life has managed to receive an update to Android Pie, despite launching with Android Nougat. The OEM has now taken more than 6 months to ensure that the update is “compatible” with its phones, which is a non-answer as devices like the HTC U12+ already come with a Treble-compatible partition setup. The tweet also does not confirm when exactly these updates would arrive, as the updates will be released “starting Q2’19“, which in turn means that there is no upper limit to when the last of these devices can receive the update.

HTC’s sad state of affairs has led the company to consider licensing its brand to Indian smartphone brands like Micromax, Lava, and Karbonn. The lack of updates will not really add up to be a selling point for its upcoming smartphone, assuming there is one still in the works.

https://www.gizbot.com/mobile/news/...android-9-pie-update-by-june-2019-059799.html

Contacts on Android 6.0.1

This should be really simple but it seems like a total scam. Just can't figure out how the perpetuator benefits from it.

Android 6.0.1 on a Samsung Galaxy J7 Sky Pro.

Need to buy a new phone.
All I want to do is backup my contacts. Text messages would be nice too but good God I can't imagine Lord Google allowing that.

Connected USB cable and copied everything to my pc.
No contacts.

Researched online and found some Google employee saying Contacts are in a SQLite file encrypted and only way to back them up is via a Google account.

So I log into the Google account from my desktop. Do everything I can to tell it to synch, backup, call it what you want, those contacts.
No contacts.

Searched everything I could find as to settings on the phone as to how to make this happen and did everything they said.
No contacts.

OK here we are better part of a day fighting something as stupid as backing up ONE FILE and zero progress.

WTF am I doing wrong?

WTF do I need to do to get my contacts backed up somewhere or to something so that I can go purchase a new phone?

Location object, null object reference error

Hi friends, I've created the following class.
Code:
public class Common {

    public static Location currentLocation;
}

I can see the location using Log.d in the activity I'm assigning a location to.

MainActivity.class (location assignment class)
Code:
private void BuildLocationCallBack() {
    locationCallback = new LocationCallback(){
        @Override
        public void onLocationResult(LocationResult locationResult) {
            super.onLocationResult(locationResult);

            //Common.currentLocation = locationResult.getLastLocation();
            Common.currentLocation = new Location(locationResult.getLastLocation());

            Log.d("Location", Common.currentLocation.getLatitude()+"/"+Common.currentLocation.getLongitude());
        }
    };
}

Okey. But when I copy and paste the same line of Log.d over a different fragment, I get the following error;

TodayFragment.java
Code:
Log.d("Location",
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_today, container, false);

    Log.d("Location",Common.currentLocation.getLatitude()+"/"+Common.currentLocation.getLongitude()));

    return view;
}

Result;
java.lang.NullPointerException: Attempt to invoke virtual method 'double android.location.Location.getLatitude()' on a null object reference

Null object reference error. What could be the problem? Can you help me. Thank you.[/code]

Help Samsung Tab 4 / How to flash or re-image

Hello,

I have a Samsung Tab 4 (SM-T530NU) that clearly needs to be re-imaged. Since I dont know anything about android re-imagining, I was wondering if someone would be wonderful and help me?

I am looking for a couple things:
- How do you re-image these (usb to computer)?
- What version should I image this sucker with?
- Anything else is cool to know, but mainly Thank You.

Mike

Parental control on Android 7.1

Simply: is the parental control on the play store a joke? You just go to the setting -> app, find the Google play store app, clear the cache and data and parental control is turned off without having had to give your parental control password. No security hole exploit, just use the options that are there. Or maybe I miss the obvious (but even in this case, I would guess I am not the only one). So simply what is this parental control about?!

Guest user pictures lost. Please help.

Hi all. I switched my Huawei p30 to a guest user so someone could use it to take photos at my wife's birthday party. Once I got it back I switched to my normal profile. This morning I went back to guest user but accidentally pressed "start again" instead of "continue" and now all the photos are gone. Is there anyway to recovery these? Please, I will be killed if I don't get these. Thanks

Message font size

For months I've been trying to figure out how to shrink the font size in messages. I knew it could be done because it kept changing size after my 10 month old grandson would play with the phone. I looked everywhere on the internet for an answer but couldn't find one all I could find was how to changebthebfintbsize on the phone its self NOT messenger. Well for all of you with the same issue, I have the answer. PINCH & ZOOM (in or out) will change the font size. Your welcome. Lol

Chair o' bed bugs

It's a really good chair except for that. I think it's leather. At least the color makes it easy to spot 'em. I gave it a good dose of Raid bedbug spray. Will that do it? I don't want to get rid of the chair, which is really comfortable and has a matching ottoman. Besides, I couldn't afford another one. Because of the cat there's probably no way to use a fogger.

'clock' virus

Hi. I am having trouble with a lot of pop up adds, I have therefore installed many malware and antivirus apps which have detected that a 'Clock' app has been installed which may be harmful. Not the stock 'Clock app' already installed. I think this is causing all the pop apps and slowing down my phone. All the Malware and antivirus apps have detected it and have uninstalled it. And then no more pop adds etc. However a few minutes late the app re installs itself over and over again no matter how many times I uninstall it. The icon is a green clock. Driving me mad. Any suggestions please.

My carrier (Vodafone) is showing me pop-up messages, any way to stop them?

So nearly every five minutes, I get this message from Vodafone as shown below. I've tried clicking on cancel and OK but that hasn't stopped these from coming. Clicking on OK took me to the "SIM 1 Toolkit" app, so this is probably coming from there? I can't disable this app however, and possibly this app needs to stay on for the SIM to work normally.

Is there any safe way to stop these from coming?

Screenshot_20190511-155543.png

The project 'android' may be using a version of Gradle that does not contain the method.

I have this error i don't know what to do.

The project 'android' may be using a version of Gradle that does not contain the method.

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

Help Group texting with iPhones

I have been trying for months to get group texting with some friends on iPhones to work. I have used Messages, Textra and Handcent with no luck. I have reset all the settings and even did a factory reset. Nothing. Virgin has reset all my settings at their end. I can send a text to multiple people, but the replies come back to only me. Most of my friends are iPhone users, and I need to chat with my kids teams. I don’t want to go back to an iPhone! Please help.

Filter

Back
Top Bottom