13

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> 
14
  • 3
    Start by including in the question your manifest and all intent filters. Commented Feb 28, 2020 at 21:26
  • Okay, I added the manifest. Commented Feb 28, 2020 at 21:41
  • 1) What versions of Android / devices is this occurring 2) Are you doing anything special programmatically with Context.registerReceiver() or PackageManager. See: How to create/disable intent-filter by programmable way? Commented Feb 28, 2020 at 21:59
  • 10
    Your customer might prefer for you to crop their name out... Commented Feb 28, 2020 at 22:02
  • 2
    some suggestions: 1. Ask her to install your App. Restart the device and then start using Uber/Lyft without opening your App and see it if that works 2. Device might have some kind of malware/virus. Ask her to do a factory reset and then perform the task. Commented Mar 3, 2020 at 3:39

1 Answer 1

2
+150

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.

Sign up to request clarification or add additional context in comments.

4 Comments

The android app instance can and should only be created by android os.. what is that getinstance suppose to do there? Besides you should never statically hard reference your application.. it confuses android system when it wants to clear unused apps from their runtime
Also, if app name starts with a .something it searches for the app class under ${packageName}.something so that too should not be the reason
Here is some reference material if you are curious as to the various purposes of this approach. github.com/codepath/android_guides/wiki/…
The link doesnt describe your approach.. I will bet my career that the new MyApplication() is never ever called, unless you run on a messed up custom rom. Also no where there they hold a static reference to the application

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.