Skip to content

A simple podcast player in a flutter, part of the main commercial project.

Notifications You must be signed in to change notification settings

hooshyar/flutter_simple_podcast_player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple_Podcast_Player

gif 1 image 2

I created the project for myself to figure out how audio players work in flutter, without any kind of state management solutions or fancy widgets and whatever that make me not understand a project in few hours.

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Prerequisites

Clone repository git clone https://github.com/hooshyar/flutter_simple_podcast_player.git

and open pubspec.yaml

run flutter packages get

open lib/config.dart and change "podcastList" to your list of favorite podcasts

final List<String> podcastList = [
  'joerogan',
  'the daily',
  'chawg',
  '1619',
  'Ted Radio Hour'
];

run app on a simulator flutter run on error do the following setup for each platform

Platform specific configuration

Android

add these for playing audio in the background

<manifest ...>
  <uses-permission android:name="android.permission.WAKE_LOCK"/>
  <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
  
  <application ...>
    
    ...
    
    <service android:name="com.ryanheise.audioservice.AudioService">
      <intent-filter>
        <action android:name="android.media.browse.MediaBrowserService" />
      </intent-filter>
    </service>

    <receiver android:name="com.ryanheise.audioservice.MediaButtonReceiver" >
      <intent-filter>
        <action android:name="android.intent.action.MEDIA_BUTTON" />
      </intent-filter>
    </receiver> 
  </application>
</manifest>

iOS

If you wish to connect to non-HTTPS URLS, add the following to your Info.plist file:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSAllowsArbitraryLoadsForMedia</key>
    <true/>
</dict>

Insert this in your Info.plist file for Audio service:

	<key>UIBackgroundModes</key>
	<array>
		<string>audio</string>
	</array>

About

A simple podcast player in a flutter, part of the main commercial project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published