Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8722679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:27:59+00:00 2026-06-13T07:27:59+00:00

I using the following code: String outputFile = /mnt/sdcard/mydir/myApp.apk File f = new File(outputFile);

  • 0

I using the following code:

 String outputFile = "/mnt/sdcard/mydir/myApp.apk"
 File f = new File(outputFile);

 if(!f.exists())
       f.createNewFile();

 // *** other code ***

But when the application reaches the line

 f.createNewFile();

nothing appens. The other code linees are not executed and no error occurs.

The activity from where I executed this code is configured in manfiest in this way:

 <activity android:theme="@android:style/Theme.NoTitleBar" 
        android:name=".ACT_ImpostazioniAvanzate"  android:screenOrientation="landscape">
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:scheme="content" />
            <data android:scheme="file" />
            <data android:mimeType="application/vnd.android.package-archive" />
        </intent-filter>
    </activity>

This activity is not the main activity, and in the manifest I obtain the following Waring:

 "Exported activity does not require permission"

What does this mean? May be related to my creation file problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T07:28:00+00:00Added an answer on June 13, 2026 at 7:28 am

    Your warning is unrelated to your issue with creating files.

    You don’t have the proper permission set to write to the external storage on the device.

    Add

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

    to your manifest above the <activity tag

    If you want more info about the warning in the manifest take a look at this answer here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using following code. mDbHelper.open(); String[] areasList = new String[51]; for (int i
I am using the following code String str=12345; byte[] b=str.getBytes(UTF-8); String str1=new String(b,UTF-8); System.out.println(str1);
I want to read Excel file in c# using following code string excelFileName =
Using the following code: string pat = @ENGL101_.*_(.*); Regex r = new Regex(pat, RegexOptions.IgnoreCase);
I am using the following code: string new = old.Substring(0,2).TrimStart('0') + . + old.Substring(2,2).TrimStart('0');
I'm using the following code: string tile = a1; Regex regex= new Regex(@/([a-z])(\d{1,2})/i); if
i am using the following code String keyword=request.getParameter(keyword); keyword = keyword.toLowerCase(); keyword.replaceAll( , );
From the book Groovy and Grails recipes I'm using the following code snippet: String
I'm using the following code to retrieve a json string from my webserver: var
I'm currently using the following code (C#): private static void PlayLoop(string filename) { Audio

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.