Month: April 2018

The latest player to play on mobile for music song i.e. Exoplayer

Exoplayer is an application level Media Player Library.ExoPlayer standard audio and video components are built on Android’s MediaCodec API, which was released in Android 4.1 .It is an adaptive audio and video streaming.Because ExoPlayer is a library, you can easily take advantage of new features as they become available by updating your app.I have been use MediaPlayer to stream a song but problem is song stream in approx all mobile except redemii and latest android 7 mobile thats why we use Exoplayer to stream song ,when we use Exoplayer to stream audio and video song there is no problem to play song.Exoplayer is very fast and smooth audio and video songs.

Feature of Exoplayer:

1>Exoplayer is an application level Media Player Library.

2>It works on all mobile to stream audio and video songs.

3>It is very fast and smooth player to stream an audio and video songs.

4>Ability to run the very same Player version on all devices.

How to use Exoplayer :

1>First add dependency in build.gradle:
dependencies {
compile ‘com.google.android.exoplayer:exoplayer:r1.5.3’
}
It is very important to  allow  import exoplayer in your activity.

2> Inintialise Exoplayer in onCreate method
ExoPlayer exoplayer;//It is declare globally in your activity.
exoplayer = ExoPlayer.Factory.newInstance(1);
In your activity First initialize Exoplayer in onCreate method
3>Write this code where you want to stream audio player

MediaCodecAudioTrackRenderer audioRenderer = null;
Allocator allocator = new DefaultAllocator(BUFFER_SEGMENT_SIZE);
String userAgent = Util.getUserAgent(localContext, “ExoPlayerDemo”);
DataSource dataSource = new DefaultUriDataSource(localContext, null, userAgent);
ExtractorSampleSource sampleSource = new ExtractorSampleSource(Uri.parse(_uri),
dataSource, allocator, BUFFER_SEGMENT_SIZE * BUFFER_SEGMENT_COUNT);
audioRenderer = new MediaCodecAudioTrackRenderer(sampleSource);
mediaPlayer.prepare(audioRenderer);

mediaPlayer.setPlayWhenReady(true);

Where _uri is Url of songs.

Method To Play ExoPlayer

public void playMedia() {
if (!mediaPlayer.getPlayWhenReady()) {
isPlaying = true;
isPause = false;
mediaPlayer.setPlayWhenReady(true);
}

}

This is the method to call for stream  a song and play.Inwhich isPlaying and isPause is a boolean value.

Method to pause media player:

public void pauseMedia() {
if (mediaPlayer.getPlayWhenReady()) {
isPlaying = false;
isPause = true;
mediaPlayer.setPlayWhenReady(false);
}
}

This is the method to call for pause a song.Inwhich isPlaying and isPause is a boolean value.

Method to stop media player

if (mediaPlayer.getPlayWhenReady()) {
mediaPlayer.stop();
}

This is the method to call for stop a song.

Conclusion:

Exoplayer is a powerful concept to stream an audio and video songs.It is very fast and smooth player.When we use Exoplayer Stream an audio and video song on all mobile,there is no problem in any mobile in stream a song.

Read More Media Streaming With Exoplayer

Android

Introduction:

The trends in iOS app development keep on changing year after year. It does create a major impact on the business of organization. Here are trends to follow in 2018 that each and every iPhone app development company needs to follow:

Apple HomeKit

HomeKit is basically Apple’s framework for home automation.Apple HomeKit provides to communicate as well as control connected devices and accessories in home using app.HomeKit framework allows users to configure accessories and create actions to control devices. User will create group and actions and trigger them using Siri app. Users can tell Siri to turn on the lights in the living room or open the garage door.Most of the companies are creating smart home product that will collaborate together in a secure and user-friendly manner.

HomeKit’s pairing process allows the use of iPads and Apple TVs as HomeKit hubs within the home. For instance, products that work on Apple’s HomeKit will get a major overhaul with the launch of Apple’s HomePod Smart speaker.

To use Home app, you need at least one iOS device with Home app installed.

Apple Pay

Apple Pay will continue to grow in 2018 and have a dramatic impact on commerce. Apple Pay is a digital online mobile wallet makes it easy for iOS users to make payments. it supports all the iOS devices including iPhone, iPad, iOS watches and mac laptops. Apple Pay is now supported at 50 percent of stores in U.S . It is now one of the world’s most accepted contactless payment technology.

The iOS developers can easily implement Apple Pay in their application.The service keeps customer payment information private from the retailer by replacing the customer’s credit or debit card.

Cloud-based Applications

iOS app developers are designing cloud driven mobile applications. With the growing demand for cloud technology, it is becoming effortless to get data without impacting internal phone memory. With cloud-based apps like Dropbox, Google Drive, various mobile apps are going to be cloud driven in the near future. Cloud based apps resolve the problem related to data security problems consistent in BYOD world (Bring Your Own Device).

There is perennial problem related to protecting sensitive data with regards to employee devices, which are not completely safe and secure. With Cloud, companies can be assured that data is safe and secure.

Advancement in Artificial Intelligence (AI) and Siri

Apple’s personal assistant Siri has gained prominence worldwide, bringing about a major change in Artificial Intelligence (AI) and contextual learning as Siri understands what people are searching and speaking.

IoT-Focused Apps Will Come to the Forefront

IoT is the buzz word and it is gaining prominence with each passing day. Investment, revenues and profits from IoT is growing at an exponential rate. iOS app developers are already building applications that can communicate with Internet-enabled devices.

As IoT companies continue to provide robust and sophisticated products in the market, iOS app developers will aspire to create value-adding apps that will help users get the most out of their IoT products.

Recognition of digital signals from the sensors deployed in IoT devices and secure exchange of information over Wi-Fi networks will be the areas of focus for iOS developers for 2018 and beyond.

Core Machine Learning

Core Machine Learning is one of the most widely discussed trends in iOS app development. It is a machine learning framework launched by Apple and has been proving effective for tasks related to Camera, QuickType or Siri.

With its robust library, the Core ML will offer communication applicable to all iOS devices. Moreover, it will also be useful in face detection understanding the language and developing the AI-based games. The developers will be able to build highly interactive apps.

Augmented Reality (AR) and ArKit

iOS app developers will be able to develop 3D and virtual reality-based mobile application with AR. In fact, ARKit will also receive ample support from Amazon’s Sumerian application platform. And ever since Amazon has collaborated with Apple’s ARKit, several businesses are exploring the same option. Thus, the present year 2018 will be fruitful for the AR and VR apps.

Would you like to share any trends that will revolutionize iPhone App Development? Share with us. We would love to hear from you.

Well, according to you, what is going to be trending for iOS app development in the year 2018? Share your thoughts in the comment section.

My Some More Blogs are:

How To Create TableView and Implementation of Its Delegate Method in Objective C

Facebook Integration Using Swift

 

Read More iOS App Development Trends in 2018

iPhone Mobile Development Trends