• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Recording internal audio without recording from the microphone

Hi, this is my first post to Android Forums.

I have an Android tablet, and occasionally I'd like to be able to record something I'm listening to. However, every recorder app I've tried also records what the microphone is picking up as well. This means that to get a good recording, I have to be in completely silent room, which is not usually possible.

I've looked up two solutions but they don't seem to work. With the first, you withdraw permission to use the microphone using Settings, but when I do that, the recorder app justs says it can't work until permission is restored. With the second, you use a microphone blocker app, but I've found that if you do, you get a similar message from the recorder app, saying in effect that it can't work until I've disabled the blocker app.

With Audacity on my PC, it's simple to record what's coming through the sound card without picking up sounds from my room, but I'm still trying to do this with Android. Can anyone advise me please? BTW, my tablet is a Google Nexus 7 (2013 version). Thanks.

Creating windows with WindowManager is slow

I have to create several windows in AccessibilityService. I'm doing it now with next code:
WindowManager wm = (WindowManager) getSystemService(WINDOW_SERVICE); wm.addView(view,params);
But the creating\removing windows needs 800-1000ms for creating simple window for now. I've already tried adding WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, but it didn't help.
Maybe there is some tips\tools to make it faster?

Cannot get actual file path from downloads category of File Chooser

I have created an Android Media Player and I have run into a dilemma. I have created a file picker for the mediaplayer but the File chooser intent built into android does not allow me to get actual file path in such format "/storage/emulated/0/etc./" instead it returns the URI path to the file being played. I have created a function to get the real file path for files chosen through file chooser intent which is list below. The short of it is that any file chosen from the recent tab or downloads section of the File Chooser intent it will not get the real file path for any file chosen from those categories within the File Chooser. Is there any way to get the real file path for files chosen from the File Chooser instead of URI's?

Code:
 public static String removableStoragePath;
    public static String sdPath, sdCardLabel;
    public static boolean sdCardPathDetection;
    public static int dirCounterSD;
    public static ArrayList<Integer> iterationCounterLocationsSD = new ArrayList<Integer>();

    @SuppressLint("NewApi")
    public static String getPath(Context context, Uri uri) {
        final boolean needToCheckUri = Build.VERSION.SDK_INT >= 19;
        String selection = null;
        System.out.println("URI SCHEME: " + uri.getScheme() + "getDocumentId: " + DocumentsContract.getDocumentId(uri));
        String[] selectionArgs = null;
        // Uri is different in versions after KITKAT (Android 4.4), we need to
        // deal with different Uris.
        if (DocumentsContract.isDocumentUri(context.getApplicationContext(), uri)) {
            if (isExternalStorageDocument(uri)) {
                final String docId = DocumentsContract.getDocumentId(uri);
                final String[] split = docId.split(":");
                final String type = split[0];
                File fileList[] = new File("/storage/").listFiles();
                for (File file : fileList) {
                    if (!file.toString().contains("self") && !file.toString().contains("emulated")) {
                        sdPath = file.toString();
                        System.out.println("SD PATH SUCCESSFULLY IDENTIFIED!: " + sdPath);
                    }
                    sdCheck(uri);
                }
                System.out.println(removableStoragePath);
                return removableStoragePath + "/" + split[1];

            } else {
                if (isMediaDocument(uri)) {
                    String pathUtil = uri.getPath();
                    System.out.println("Media document: " + pathUtil);
                    final String docId = DocumentsContract.getDocumentId(uri);
                    final String[] split = docId.split(":");
                    File fileList[] = new File("/storage/").listFiles();
                    for (File file : fileList) {
                        if (file.toString().contains("self") || file.toString().contains("emulated")) {
                            sdPath = file.toString();
                            System.out.println("SD PATH SUCCESSFULLY IDENTIFIED!: " + sdPath);
                        }
                        sdCheck(uri);
                    }
                    System.out.println(removableStoragePath);
                    return removableStoragePath + "/" + split[1];
                }
            }
        }
        if ("content".equalsIgnoreCase(uri.getScheme())) {
            String[] projection = {MediaStore.Images.Media.DATA};
            Cursor cursor = null;
            try {
                cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs, null);
                int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
                if (cursor.moveToFirst()) {
                    return cursor.getString(column_index);
                }
            } catch (Exception e) {
            }
        } else if ("file".equalsIgnoreCase(uri.getScheme())) {
            return uri.getPath();
        }
        return null;
    }

    public static void sdCheck(Uri uri) {
        System.out.println("SD CHECK IS WORKING!");
        for (int i = 0; i < uri.toString().length(); i++) {
            char c = uri.toString().charAt(i);
            //Process char
            if (c == '/') {
                dirCounterSD += 1;
                iterationCounterLocationsSD.add(i);
            }
        }
        Object iterationArraySD[] = iterationCounterLocationsSD.toArray();
        int lastIndexPathSD = iterationArraySD.length;
        int lastIndexSlashSD = (int) iterationArraySD[lastIndexPathSD - 1];
        System.out.println("# Slashes: " + lastIndexPathSD + " Slash index: "
                + iterationArraySD[lastIndexPathSD - 1].toString());

        sdCardLabel = uri.toString().substring(lastIndexSlashSD + 1, lastIndexSlashSD + 10);
        if (sdCardLabel.toCharArray()[4] == "-".toCharArray()[0]) {
            sdCardPathDetection = true;
            removableStoragePath = sdPath;
        } else {
            removableStoragePath = Environment.getExternalStorageDirectory().getAbsolutePath();
        }
        System.out.println("SD Card Label: " + sdCardLabel);

    }

    /**
     * @param uri The Uri to check.
     * @return Whether the Uri authority is ExternalStorageProvider.
     */
    public static boolean isExternalStorageDocument(Uri uri) {
        return "com.android.externalstorage.documents".equals(uri.getAuthority());
    }

    /**
     * @param uri The Uri to check.
     * @return Whether the Uri authority is DownloadsProvider.
     */
    public static boolean isDownloadsDocument(Uri uri) {
        return "com.android.providers.downloads.documents".equals(uri.getAuthority());
    }

    /**
     * @param uri The Uri to check.
     * @return Whether the Uri authority is MediaProvider.
     */
    public static boolean isMediaDocument(Uri uri) {
        return "com.android.providers.media.documents".equals(uri.getAuthority());
    }
}

Drug Dealer Job - a indie developer mobile game

Hello there,

I am a indie developer from Germany and I made a few small games in the past. My actual game Drug Dealer Job is a bit bigger. You have to create a route in the city to provide the packages to your customers. But you have to choose a good route that you won't get caught by the police. You can upgrade your cars and your skills and unlock more cities.

Android Link: https://play.google.com/store/apps/details?id=com.DoitStudio.DrugDealerJob

A short Gameplay teaser I created:


I hope you like my game if you try it.
I would appreciate constructive feedback, whether positive or negative, to improve the app!

Thank you and stay safe:

Precious photos lost in failed move operation

Hi all, a year's worth of work photos regarding an archaeological project I'm managing has gone missing on my Galaxy A20, after my attempt to move them all to the cloud failed. There are 700 jpeg photos that I pray are somewhere on my phone, despite no longer being available in Gallery.

Is there someone who can advise please just how I can locate where to salvage my photos?
Thanks so very much, in advance.

Leeson

Orby TV anyone?

I've heard about Orby TV and decided to check them out. Frankly, they sound too good to be true!

Their $40/month package includes 150-something local channels--most of which I don't get with DirecTV. It also includes the specific, small handful of cable channels I routinely watch. It would be completely satisfactory for me.

I can't tell from their site if their DVRs are whole-house; that's a very important feature for me.

Even factoring in the cost of installation--which I deduce there is, since they install the dish, but you own it--and additional charges for DVRs/receivers, it still looks better, price-wise, than DirecTV. But I don't know! I haven't changed providers since 1993, and I'm a bit wary.

DirecTV may be overpriced, but its service is excellent, both in terms of the actual service/programming and its US-based customer support. I don't want to lose that caliber of service.

Does anyone have personal experience with Orby? Would you recommend it?

[FREE] [GAME] Get 14! - a time killer puzzle game

Hi all! I am an unemployed IT guy, who has now some time for his love, mobile programming. Would you help me in testing this little game I wrote? It's in the Play Store, look for “Get 14!”, in quotation marks. Or you can use this link: https://play.google.com/store/apps/d...es.getfourteen
All feedback is much appreciated. I will gather your ideas, bug reports, and will use them to improve the game. Thank you!

Attachments

  • get 14 no text 2.png
    get 14 no text 2.png
    914.6 KB · Views: 154

Help Phone keeps freezing and rebooting

I will try to describe the issue here so that if someone had a similar problem can share their experience or help.

A few days ago, my Android phone started freezing and rebooting for no apparent reason. After each restart, only takes a few seconds while it is responsive to freeze again, not respond anymore and some seconds later reboots. It doesn't get out of this cycle.

I did a factory reset, which helped, it seemed to operate much faster and didn't freeze/reboot anymore. I was wondering what is causing the issue. I turned on wi-fi, entered wi-fi password, it connected to the internet.

Being connected to the internet doesn't seem to cause the issue, as I left it on, connected through wi-fi during a whole day, no problems happened.

Just some minutes ago, I decided to try adding my Google account again. As soon as I added my Google account, it went right back to the constant freeze/reboot cycle, so I'm thinking it's the Google account that causes the problem, why, I don't know. How to fix?

I just noticed on my Gmail that Google has a new feature, Google Meet, this way I know they are introducing new services and changes. What could be the explanation and solution to my phone's problem? Any input would be appreciated.

O.S. is Jellybean 4.1.1.

DATA TRANSF WITH DIFF PHONE#'S

I didn't need cell a phone for many months during which my TracFone service expired AND they gave away my phone number. I have a new phone with a new phone# and need to transfer my old data to it. Both are android phones.

Google sync isn't working, I'm guessing due to the different phone numbers. Both phones were wifi connected to the internet and both signed into my Google account with full backup engaged on both. No a whorck.

Anyone know how to transfer contacts, SMS texts, and other data to a new phone with a different phone#?

Much obliged.

Help Best phone for audiophile with expandable storage?

I use my phone primarily for four things: as a phone/text device, as a flashlight, as a spur of the moment camera (have a nice camera for planned occasions) but most importantly, for portable music.

The Axon 7 by ZTE was without a doubt the the best phone for this when I bought it 4-5 years ago. The sound quality was second to none. I recently "upgraded" my phone to the Axon 10 which had the perfect hardware for my needs but the software was so chock FULL of bugs which were never fixed that I hated it (I never got ANY of the messages for any group conversations for example). On top of that it was stolen a few months ago. So now I am in dire need a replacement. If they have cleared the bugs by now (the group messaging bug in particular) I may give the Axon 10 another try but that phone isn't even on the hardware list here so not sure anyone knows about that.

I don't need/want an overpriced Zazzy screen phone so Samsung and similar brands are not an option unless they are unexpectedly cheaper. Frankly why people want something beyond 1080p for something so small is beyond me. (My price range is no more than $700). What I need is a 256 GB phone with expandable memory because I am slowly going to change my library to flac rather than mp3. That is the kicker. Several nice phones out there with the hardware I need except none of them have expansion slots. (The Axon 10 can be expanded to 2TB). Any ideas?

Sync problem on exchange email on moto x

I've had this phone for a couple years, This morning my exchange email (hotmail) won't sync. I get this message: "You don't have permission to sync with this server. Contact your server's administrator for more information." This is my personal phone so there is no admin other than me.

Does anyone know what I can do to fix this?

Thanks.

AND NEVERMIND -- it has cleared up on its own. I don't understand, but my emails are coming through again.

Filter

Back
Top Bottom