Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My Android App is Overriding The Lyft App?

Tags:

android

I built an Android app that is somehow taking over or overriding the Lyft driver app. Basically, whenever a user has my Android app downloaded, it somehow takes over her Lyft app. She will not get any ride requests from Lyft (even during the middle of a super busy time). Then, when she deletes my app, it works perfectly again. She immediately gets rides again. It is the weirdest thing I have ever seen. And this is not just coincidental, when she goes to kill her apps, it literally shows my app logo taking over the Lyft driver app. Photo Attached Notice how originally it has the Lyft logo. Then, when my app is installed, it has my logo for the Lyft app (my logo is just the default Android logo). She can even kill my app, and her Lyft and also Uber driver app do not work! The only way to fix it is to completely uninstall my app and restart her phone. Then, everything works perfectly. One important element is I do track the location all the time. I'm just not really sure where even to start with this bug, so any ideas are helpful. Thanks! The user is using a Galaxy Note 10+ with Android 10. None of our other Android users have told us about this problem. It seems to be a unique case for this phone.

Here are all my manifest and intents:

    <?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.danieljones.nomad_drivers">

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.ACTIVITY_RECOGNITION"/>

    <application
        android:requestLegacyExternalStorage="true"
        android:name=".parse.Parse"
        android:allowBackup="true"
        android:fullBackupContent="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity
            android:name=".checkIn.CheckInActivity"
            android:label="@string/title_activity_check_in"/>
        <activity android:name=".insurance.analysis_activity.ZendriveAnalysisActivity" />
        <activity android:name=".fare.breakdowns.FareBreakdownActivity" />
        <activity
            android:name=".navigation.HomeNavigationActivity"
            android:label="@string/title_activity_home_navigation"
            android:screenOrientation="portrait"/>
        <activity android:name=".welcome.LoginActivity" />
        <activity android:name=".welcome.special_code.CodeActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".new_rides.ride_detail.NewRideDetailActivity" />
        <activity android:name=".rides_lists.ride_detail.RideDetailActivity" />
        <activity android:name=".personal_rides.ride_detail.PersonalRideDetailActivity" />
        <activity android:name=".review_list.ReviewActivity"/>
        <activity android:name=".user_profile.driver_card.EditProfileActivity" />
        <activity android:name=".user_profile.edit_form.EditProfileFormActivity"/>
        <receiver android:name=".insurance.zendrive.MyZendriveBroadcastReceiver" />
        <activity android:name=".archived_rides.ride_detail.ArchivedRideDetailActivity" />
        <service
            android:name="com.parse.fcm.ParseFirebaseMessagingService"
            android:permission="false">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT"/>
            </intent-filter>
        </service>
        <receiver
            android:name=".push_notifications.ParseCustomBroadcastReceiver"
            android:exported="false">
            <intent-filter>
                <action android:name="com.parse.push.intent.RECEIVE" />
                <action android:name="com.parse.push.intent.DELETE" />
                <action android:name="com.parse.push.intent.OPEN" />
            </intent-filter>
        </receiver>
    </application>
like image 395
Daniel Jones Avatar asked Feb 28 '20 21:02

Daniel Jones


People also ask

What's wrong with my Lyft app?

Update your phone settings Turn off Wi-Fi: If your phone auto-connects to a Wi-Fi hotspot, it'll try to run on Wi-Fi instead of data. This slows down your connectivity, so turn off Wi-Fi while you're using the app. Turn off Background App Refresh: Some apps check for updates even when you don't have them open.

What phone app works with Lyft?

The Lyft app is available for iPhone and Android smartphones. Because the app requires a cellular connection, we don't support tablets or wifi-only devices (for example, the iPod Touch). Read Phone software recommendations and settings for operating system info.


1 Answers

I believe your issue is related to your defined name element in your Manifest.xml, specifically, the one underneath the application tag.

You have yours defined as: .parse.parse, which seems rather odd to me. Looking at this link from the parse platform, I think that's what you are declaring as your app's name.

This name element, though it may seem unimportant, is actually where your application is generating the Application level Context from, or in this case, where the external Intents are being discovered.

It's highly likely that the system cannot distinguish which one to pull and it is therefore pulling yours over Lyft when it can.

To resolve this, just declare your own class that extends the Application class somewhere in your project like this:

public class MyApplication extends Application {

    private static MyApplication sInstance;

    @Override
    public void onCreate() {
        super.onCreate();
        sInstance = this;
    }

    /**
     * Get an instance of the application. 
     *
     * @return {@link MyApplication}
     */
    public static synchronized MyApplication getInstance() {
        if (sInstance == null) {
            sInstance = new MyApplication();
        }
        return sInstance;
    }

    /**
     * Get context
     *
     * @return Context
     */
    public static synchronized Context getContext() {
        return getInstance().getApplicationContext();
    }
}

Then just update your Manifest to look like this:

 <application
        .
        android:name=".MyApplication"
        .
        .
        .>
...

And it should function properly.

If you are still having troubles, update your question with more info and we can diagnose it further.

like image 74
PGMacDesign Avatar answered Oct 16 '22 22:10

PGMacDesign