Jump to content
cagatay

How to Autorun an App at Startup

Recommended Posts

Hi,

We have developed a game with Unity 3D, and put into Tinker board 2/4G that runs Android 11 and we would like to make our game automatically run at startup. We could not find out how to make it autorun. In application settings / all permissions window, I see a permission called "Run at Startup", but there is no switch to make it on/off. How can we put an app on startup in Android 11?

Best regards

Cagatay Undeger

Share this post


Link to post
Share on other sites

Hi,

This is a simple step to resolve you solution which i read from apkstates.com, so 1st of all you Press Windows logo key + R, type shell:startup, and then click OK while the file location is open. The Startup folder is now visible. The shortcut to the app should be copied and pasted into the Startup folder from the file location.

Edited by jamesbro

Share this post


Link to post
Share on other sites

In my case I created a launcher app in AndroidStudio and replaced it,  and called it in onPostCreate() as follows to call a target app at startup.

private void launchApp() {
     String packageName = "com.mycompany.title";
     String className = "com.unity3d.player.UnityPlayerActivity";
     Intent intent = new Intent();
     intent.setAction(Intent.ACTION_VIEW);
     intent.setClassName(packageName, className);
     startActivity(intent);
}

Share this post


Link to post
Share on other sites

Autorunning an app at startup means configuring your computer to automatically launch an application when it starts up. This can be helpful for programs that you use frequently and want to start without having to manually launch them every time you turn on your computer. Here are the steps to autorun an app at startup on a Windows computer:

  • Press the Windows key + R to open the Run dialog box.
  • Type "shell:startup" (without quotes) and press Enter. This will open the Startup folder.
  • Find the shortcut to the app you want to autorun at startup.
  • Right-click on the shortcut and select "Copy".
  • Right-click on an empty area within the Startup folder and select "Paste". This will create a copy of the shortcut in the Startup folder.
  • Restart your computer to confirm that the app launches automatically at startup.

Note that not all apps may have an option to autorun at startup, and some apps may have their own settings to enable or disable this feature. Additionally, autorunning too many apps at startup can slow down your computer's boot time, so be mindful of the apps you choose to autorun.

If you want to know about mod games/apps, then visit https://modrar.com/

Share this post


Link to post
Share on other sites
On 1/19/2023 at 3:41 PM, jamesbro said:

Hi,

This is a simple step to resolve you solution which i read from Zuckerberg Games so 1st of all you Press Windows logo key + R, type shell:startup, and then click OK while the file location is open. The Startup folder is now visible. The shortcut to the app should be copied and pasted into the Startup folder from the file location.

 

Share this post


Link to post
Share on other sites
Posted (edited)

Hi, you can simply try that on .bashrc

1. open sudo nano /home/linaro/.bashrc 

2. Just go down and add your executable r python file like this 

3. Press ctrl+o to write and exit using ctrl+x 

4.Now click new terminal it will run.

Eg. 

./filename (for exe) &

python3 script.py &

Edited by sathish

Share this post


Link to post
Share on other sites

The process for autorunning an app at startup varies depending on your operating system. Here are some general steps for the most common operating systems:

Windows:

  1. Press the Windows key + R to open the Run dialog box.
  2. Type "shell:startup" and press Enter. This will open the Startup folder for your user account.
  3. Right-click in the folder and select "New" > "Shortcut".
  4. In the "Create Shortcut" dialog box, browse to the location of the app  of Funciones de Cálculo you want to autorun and click "Next".
  5. Enter a name for the shortcut and click "Finish".
  6. The shortcut should now appear in the Startup folder. The app will run automatically when you log in to your user account.

macOS:

  1. Open System Preferences and click "Users & Groups".
  2. Click the lock icon in the bottom left corner and enter your admin username and password.
  3. Click the "+" button under "Login Items".
  4. Browse to the location of the app you want to autorun and select it.
  5. The app will now run automatically when you log in to your user account.

Linux:

  1. Open your distribution's Startup Applications manager.
  2. Click the "+" or "Add" button to add a new startup application.
  3. Enter a name for the app and browse to its location.
  4. The app will now run automatically when you log in to your user account.

Note that the exact steps may vary depending on your specific operating system and version. If you have trouble autorunning an app at startup, you may want to search for specific instructions for your operating system or consult with your system administrator.

Share this post


Link to post
Share on other sites

Hello there,

For my situation, I developed a launcher application using AndroidStudio and replaced it with the existing one. To initiate the target application upon startup, I utilized the following code within the onPostCreate() method:


 
javaCopy code
private void launchApp() { String packageName = "com.mycompany.title"; String className = "com.unity3d.player.UnityPlayerActivity"; Intent intent = new Intent(); intent.setAction(Intent.ACTION_VIEW); intent.setClassName(packageName, className); startActivity(intent); }

This code snippet ensures that the desired application, identified by the specified package name and class name, is called and launched appropriately.

Regards

Devid Lucas 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...