Share sound in my app

248
May 23, 2017, at 09:21 AM

My app is a soundboard and I want it is possible that you can share the sounds. This is my code which does not work.

final Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
shareIntent.setType("audio/mp3");
shareIntent.setPackage("com.whatsapp");
Uri recurso = Uri.parse("android.resource://" + PACKAGE_NAME + "/raw/" + R.raw.a);
shareIntent.putExtra(android.content.Intent.EXTRA_STREAM, recurso);
startActivity(Intent.createChooser(shareIntent, getString(R.string.text1)));

But the sound can not be sent. What do you have to use as a path where does it have to lead?

pls help me

Rent Charter Buses Company
READ ALSO
React native application using realm database tutorial

React native application using realm database tutorial

Can any one please post a good tutorial of realm usage with react nativeAny blog of sample project is highly appreciated

373
Geolocation stacking up in Android

Geolocation stacking up in Android

In both Android WebView and Chrome, Geolocation is stacking up and then executed all at one for some weird reasonSee the following code and the following log:

289
Unity - Too many field references: 70613; max is 65536

Unity - Too many field references: 70613; max is 65536

My project uses plugins that OneSignal GooglePlayServices Adjust Google Analytics Unity IAP Facebook SDK

371
Android Studio 3.0 Canary 1: Gradle Sync Error

Android Studio 3.0 Canary 1: Gradle Sync Error

I'm getting this error in my Kotlin project:

460