Fix share app link

This commit is contained in:
h4h13 2019-05-22 08:33:19 +05:30
parent afd257f175
commit c4513eee9e
2 changed files with 26 additions and 28 deletions

View file

@ -12,7 +12,7 @@
android:theme="@style/Theme.RetroMusic.Light"
android:usesCleartextTraffic="false">
<activity
android:name="code.name.monkey.retromusic.activities.MainActivity"
android:name=".activities.MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@ -84,36 +84,36 @@
<data android:mimeType="vnd.android.cursor.dir/audio" />
</intent-filter>
</activity>
<activity android:name="code.name.monkey.retromusic.activities.AlbumDetailsActivity" />
<activity android:name="code.name.monkey.retromusic.activities.ArtistDetailActivity" />
<activity android:name="code.name.monkey.retromusic.activities.PlaylistDetailActivity" />
<activity android:name="code.name.monkey.retromusic.activities.PlayingQueueActivity" />
<activity android:name="code.name.monkey.retromusic.activities.AboutActivity" />
<activity android:name="code.name.monkey.retromusic.activities.tageditor.AlbumTagEditorActivity" />
<activity android:name="code.name.monkey.retromusic.activities.tageditor.SongTagEditorActivity" />
<activity android:name="code.name.monkey.retromusic.activities.SettingsActivity" />
<activity android:name=".activities.AlbumDetailsActivity" />
<activity android:name=".activities.ArtistDetailActivity" />
<activity android:name=".activities.PlaylistDetailActivity" />
<activity android:name=".activities.PlayingQueueActivity" />
<activity android:name=".activities.AboutActivity" />
<activity android:name=".activities.tageditor.AlbumTagEditorActivity" />
<activity android:name=".activities.tageditor.SongTagEditorActivity" />
<activity android:name=".activities.SettingsActivity" />
<activity android:name=".activities.LyricsActivity" />
<activity android:name=".activities.UserInfoActivity" />
<activity android:name=".activities.SupportDevelopmentActivity" />
<activity android:name=".activities.GenreDetailsActivity" />
<activity android:name=".activities.LicenseActivity" />
<activity android:name=".activities.PurchaseActivity" />
<activity android:name=".activities.EqualizerActivity" />
<activity
android:name="code.name.monkey.retromusic.activities.SearchActivity"
android:name=".activities.SearchActivity"
android:windowSoftInputMode="stateVisible" />
<activity android:name="code.name.monkey.retromusic.activities.LyricsActivity" />
<activity android:name="code.name.monkey.retromusic.activities.UserInfoActivity" />
<activity android:name="code.name.monkey.retromusic.activities.SupportDevelopmentActivity" />
<activity android:name="code.name.monkey.retromusic.activities.GenreDetailsActivity" />
<activity android:name="code.name.monkey.retromusic.activities.LicenseActivity" />
<activity android:name="code.name.monkey.retromusic.activities.PurchaseActivity" />
<activity android:name="code.name.monkey.retromusic.activities.EqualizerActivity" />
<activity
android:name="code.name.monkey.retromusic.activities.bugreport.ErrorHandlerActivity"
android:name=".activities.bugreport.ErrorHandlerActivity"
android:immersive="true"
android:label="@string/error"
android:launchMode="singleInstance"
android:screenOrientation="portrait"
android:theme="@style/ErrorHandlingTheme" />
<activity android:name="code.name.monkey.retromusic.activities.WhatsNewActivity" />
<activity android:name="code.name.monkey.retromusic.activities.bugreport.BugReportActivity" />
<activity android:name=".activities.WhatsNewActivity" />
<activity android:name=".activities.bugreport.BugReportActivity" />
<activity
android:name="code.name.monkey.retromusic.activities.LockScreenActivity"
android:name=".activities.LockScreenActivity"
android:noHistory="true"
android:screenOrientation="portrait"
android:showOnLockScreen="true" />

View file

@ -22,9 +22,9 @@ import code.name.monkey.retromusic.Constants.RATE_ON_GOOGLE_PLAY
import code.name.monkey.retromusic.Constants.TELEGRAM_CHANGE_LOG
import code.name.monkey.retromusic.Constants.TRANSLATE
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.model.Contributor
import code.name.monkey.retromusic.activities.base.AbsBaseActivity
import code.name.monkey.retromusic.adapter.ContributorAdapter
import code.name.monkey.retromusic.model.Contributor
import code.name.monkey.retromusic.util.NavigationUtil
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.list.listItems
@ -154,13 +154,11 @@ class AboutActivity : AbsBaseActivity(), View.OnClickListener {
}
private fun shareApp() {
val shareIntent = ShareCompat.IntentBuilder.from(this)
.setType("songText/plain")
ShareCompat.IntentBuilder.from(this)
.setType("text/plain")
.setChooserTitle(R.string.share_app)
.setText(String.format(getString(R.string.app_share), packageName))
.intent
if (shareIntent.resolveActivity(packageManager) != null) {
startActivity(Intent.createChooser(shareIntent, resources.getText(R.string.action_share)))
}
.startChooser()
}
private fun loadContributors() {