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

  • SEARCH
  • Home
  • 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 8669647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:31:39+00:00 2026-06-12T18:31:39+00:00

I need again your help please!! I’ve an android application that write/read files to/from

  • 0

I need again your help please!!

I’ve an android application that write/read files to/from External memory.
I’ve written all riquired permissions in AndroidManifest but I still get an error access denied.

Hier my code:

private static File convertStreamToFile(InputStream is) throws IOException {

    String dir = Environment.getExternalStorageDirectory().getAbsolutePath();

// I have tried this one too but it didn't work!!
//   File root = new File (Environment.getExternalStorageDirectory(),"ekg_daten.zip");
    File root = new File(dir+ "/ekg_daten.zip");

    if (!root.exists()) 
    {
        root.mkdirs();
    }

//    File zippedDaten = new File(root, "outPut.zip");


    ZipInputStream zin = new ZipInputStream(is);
    ZipEntry ze = null;

    while ((ze = zin.getNextEntry()) != null) {                                           

        FileOutputStream fout = new FileOutputStream(root);

        for (int c = zin.read(); c != -1; c = zin.read()) {
            fout.write(c);
        }

        zin.closeEntry();

        fout.close();
    }

my AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.praktikum.androidcrestclient"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" />

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" >
    </uses-permission>
    <uses-permission android:name="android.permission.INTERNET" >
    </uses-permission>
    <uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" > 
    </uses-permission>
   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >  
    </uses-permission>
    <uses-permission android:name="android.permission.READ_CONTACTS" >  
    </uses-permission>


and my logcat


10-12 18:33:24.297: I/ActivityManager(79): Force stopping package com.praktikum.androidcrestclient uid=10034
10-12 18:33:24.537: I/installd(34): move /data/dalvik-cache/data@app@com.praktikum.androidcrestclient-1.apk@classes.dex -> /data/dalvik-cache/data@app@com.praktikum.androidcrestclient-1.apk@classes.dex
10-12 18:33:24.537: D/PackageManager(79): New package installed in /data/app/com.praktikum.androidcrestclient-1.apk
10-12 18:33:24.537: W/PackageManager(79): Unknown permission android.permission.WRITE_INTERNAL_STORAGE in package com.praktikum.androidcrestclient
10-12 18:33:24.790: I/ActivityManager(79): Force stopping package com.praktikum.androidcrestclient uid=10034
10-12 18:33:24.887: D/dalvikvm(79): GC_EXPLICIT freed 662K, 59% free 4335K/10375K, external 3511K/3903K, paused 67ms
10-12 18:33:24.947: D/dalvikvm(228): GC_EXPLICIT freed 4K, 51% free 2885K/5831K, external 5876K/7285K, paused 79ms
10-12 18:33:25.077: W/RecognitionManagerService(79): no available voice recognition services found
10-12 18:33:25.187: D/dalvikvm(235): GC_EXPLICIT freed 85K, 53% free 2755K/5767K, external 1625K/2137K, paused 228ms
10-12 18:33:25.277: D/dalvikvm(79): GC_EXPLICIT freed 216K, 59% free 4288K/10375K, external 3511K/3903K, paused 87ms
10-12 18:33:25.297: I/installd(34): unlink /data/dalvik-cache/data@app@com.praktikum.androidcrestclient-2.apk@classes.dex
10-12 18:33:25.307: D/AndroidRuntime(1938): Shutting down VM
10-12 18:33:25.317: D/dalvikvm(1938): GC_CONCURRENT freed 101K, 72% free 295K/1024K, external 0K/0K, paused 1ms+1ms
10-12 18:33:25.328: D/jdwp(1938): Got wake-up signal, bailing out of select
10-12 18:33:25.328: D/dalvikvm(1938): Debugger has detached; object registry had 1 entries
10-12 18:33:25.858: D/AndroidRuntime(1952): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
10-12 18:33:25.858: D/AndroidRuntime(1952): CheckJNI is ON
10-12 18:33:26.487: D/AndroidRuntime(1952): Calling main entry com.android.commands.am.Am
10-12 18:33:26.517: I/ActivityManager(79): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.praktikum.androidcrestclient/.MainActivity } from pid 1952
10-12 18:33:26.547: I/ActivityManager(79): Start proc com.praktikum.androidcrestclient for activity com.praktikum.androidcrestclient/.MainActivity: pid=1960 uid=10034 gids={3003, 1015}
10-12 18:33:26.587: D/AndroidRuntime(1952): Shutting down VM
10-12 18:33:26.607: D/dalvikvm(1952): GC_CONCURRENT freed 103K, 69% free 319K/1024K, external 0K/0K, paused 7ms+2ms
10-12 18:33:26.648: I/AndroidRuntime(1952): NOTE: attach of thread 'Binder Thread #3' failed
10-12 18:33:26.670: D/dalvikvm(1952): Debugger has detached; object registry had 1 entries
10-12 18:33:27.637: I/ActivityManager(79): Displayed com.praktikum.androidcrestclient/.MainActivity: +1s98ms
10-12 18:33:28.857: D/dalvikvm(157): GC_EXTERNAL_ALLOC freed 40K, 44% free 3469K/6151K, external 6952K/7268K, paused 44ms
10-12 18:33:32.627: W/KeyCharacterMap(157): No keyboard for id 0
10-12 18:33:32.627: W/KeyCharacterMap(157): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
10-12 18:33:33.006: D/dalvikvm(389): GC_EXPLICIT freed 7K, 54% free 2537K/5511K, external 1625K/2137K, paused 311ms
10-12 18:33:34.257: D/getrespond()(1960): service calling
10-12 18:33:34.726: W/System.err(1960): java.io.FileNotFoundException: /mnt/sdcard/ekg_daten.zip (Permission denied)
10-12 18:33:34.736: W/System.err(1960):     at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)
10-12 18:33:34.736: W/System.err(1960):     at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:232)
10-12 18:33:34.736: W/System.err(1960):     at java.io.FileOutputStream.<init>(FileOutputStream.java:94)
10-12 18:33:34.736: W/System.err(1960):     at java.io.FileOutputStream.<init>(FileOutputStream.java:66)
10-12 18:33:34.736: W/System.err(1960):     at com.praktikum.androidcrestclient.RestClient.convertStreamToFile(RestClient.java:181)
10-12 18:33:34.736: W/System.err(1960):     at com.praktikum.androidcrestclient.RestClient.executeRequest(RestClient.java:152)
10-12 18:33:34.736: W/System.err(1960):     at com.praktikum.androidcrestclient.RestClient.Execute(RestClient.java:112)
10-12 18:33:34.736: W/System.err(1960):     at com.praktikum.androidcrestclient.MainActivity.retrieveSampleData(MainActivity.java:37)
10-12 18:33:34.736: W/System.err(1960):     at java.lang.reflect.Method.invokeNative(Native Method)
10-12 18:33:34.736: W/System.err(1960):     at java.lang.reflect.Method.invoke(Method.java:507)
10-12 18:33:34.736: W/System.err(1960):     at android.view.View$1.onClick(View.java:2139)
10-12 18:33:34.736: W/System.err(1960):     at android.view.View.performClick(View.java:2485)
10-12 18:33:34.746: W/System.err(1960):     at android.view.View$PerformClick.run(View.java:9080)
10-12 18:33:34.746: W/System.err(1960):     at android.os.Handler.handleCallback(Handler.java:587)
10-12 18:33:34.746: W/System.err(1960):     at android.os.Handler.dispatchMessage(Handler.java:92)
10-12 18:33:34.746: W/System.err(1960):     at android.os.Looper.loop(Looper.java:123)
10-12 18:33:34.746: W/System.err(1960):     at android.app.ActivityThread.main(ActivityThread.java:3683)
10-12 18:33:34.746: W/System.err(1960):     at java.lang.reflect.Method.invokeNative(Native Method)
10-12 18:33:34.756: W/System.err(1960):     at java.lang.reflect.Method.invoke(Method.java:507)
10-12 18:33:34.756: W/System.err(1960):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
10-12 18:33:34.756: W/System.err(1960):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
10-12 18:33:34.756: W/System.err(1960):     at dalvik.system.NativeStart.main(Native Method)
10-12 18:33:34.766: W/System.err(1960): java.lang.NullPointerException

Please, can someone help!!

Thanks

  • 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-12T18:31:40+00:00Added an answer on June 12, 2026 at 6:31 pm

    First open the path, then add the file:

    Updated

    String dir = Environment.getExternalStorageDirectory(); // getAbsolutePath is not requried
    File path = new File(dir);
    File root = new File(path,  "ekg_daten.zip");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need your help and please give me some advice. From programming pearls I
I need your help again :) I'm trying to do a plugin with jQuery
Once again I need your Help, am thanking you as every time you helped
I need your help with this one again. I want to send special characters
I need your help again. This should be a function for php. I've got
i need again your help... I have this php code: <? if(isset($_POST['addnews'])){ $type =
I am a bit confused and need your help. I have a database that
I need your help again. So I have a simple list <ul> <li>First</li> <ul
Hey everyone, Again I need your help :D Is it possible to add the
I again need help by you, this time I struggle with covariance, contravariance, delegates

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.