-2

I want to hide the flutter app means when somewhen install it on phone the app hides automatically. And if the person wants to open the app it need to dial something on dailpad(phone call pad) like i dail *04275# and app will launch automatically.

If you know the solution of the problem then tell me.

Zilaid
  • 464
  • 6
  • 22
  • 1
    I don't think this can be achieved from application level. You may need to modify framework code. – Parmesh Aug 19 '21 at 06:02

2 Answers2

0

thats not possible, as this is VERY insecure for user. you may create app without launcher Activity, then there will be no icon in menu, but still app is visible in system Settings (and may be uninstalled/force closed) and potential Service running in background MUST show sticky notification as long as it works

snachmsm
  • 17,866
  • 3
  • 32
  • 74
-1

You can try to the way discussed here

To Hide the App :

PackageManager p = getPackageManager();
ComponentName componentName = new ComponentName(this, 
com.apps.MainActivity.class); // activity which is first time open in 
manifiest file which is declare as <category 
android:name="android.intent.category.LAUNCHER" />p.setComponentEnabledSetting(componentName,PackageManager.COMPONENT_ENABLED_STA 
TE_DISABLED, PackageManager.DONT_KILL_APP);

and to create a shortcut in dialer

<receiver android:name=".MySecretCodeReceiver">
<intent-filter>
    <action android:name="android.provider.Telephony.SECRET_CODE" />
    <data android:scheme="android_secret_code" android:host="1711" />
    </intent-filter>
    </receiver>

And since you are using flutter , it would be really hard to manage these methods as they are only possible to be used using java and are registered using the manifest.If you still want to make the app , i would suggest you to use java or kotlin in android studio and not flutter ,dart.

austin
  • 517
  • 5
  • 16