You have developed your application. Now it’s time to take it to market and secure your first paid customers. In this article, we will guide you through practical strategies, industry examples, tools to help you successfully acquire those crucial initial customers. We’ll explore valuable resources and actionable steps to ensure a strong entry into the market.
Define Your Target Audience:
To effectively market your application, start by clearly defining your target market. Consider factors such as demographics, user preferences, and pain points. For example, if your app is a project management tool, your target market might include small to medium-sized businesses in need of efficient task management solutions. So it is a step that should be taken into consideration at the planning stage. That is how you can show your target audience that your product is made exactly for them by specific UX/UI or by outlining the certain features of the platform.
Industry Example: Trello, a popular project management app, targets businesses of all sizes by offering a simple and intuitive platform.
Make an Irresistible Value Proposition:
Develop a compelling value proposition that communicates how your application solves a specific problem or fulfills a need. Highlight unique features and benefits that differentiate your app from competitors. Create a concise and persuasive message that resonates with your target audience.
Industry Example: Dropbox positioned itself as a cloud storage solution by emphasizing the ease of file sharing and collaboration. Their value proposition focused on eliminating the hassle of manual backups and ensuring accessibility from any device.
Implement a Freemium Option:
Consider offering a freemium option to attract a larger user base and convert them into paying customers. Provide a limited version of your app for free, with the option to upgrade to a premium version with additional features or enhanced functionality. This allows users to experience the value of your app before committing to a paid subscription.
Industry Example: Evernote/Notion, a note-taking app, offers a freemium model where users can access basic features for free, while premium features such as offline access and advanced search capabilities are available through a paid subscription.
Leverage App Store Optimization (ASO):
Optimize your app’s visibility in app stores by utilizing App Store Optimization (ASO) techniques. Research relevant keywords, craft compelling descriptions, and utilize appealing visuals to attract potential customers. Enhance your app’s discoverability by including relevant keywords in the title, description, and metadata.
Resources to Use: Tools like Sensor Tower, Mobile Action, or App Annie can provide insights on keyword rankings, competitor analysis, and optimization strategies.
Take Care of the Landing Page:
Build a user-friendly website that effectively showcases your app’s features, benefits, and user testimonials. Clearly articulate the value your app brings to potential customers. Include screenshots, demo videos, and social proof to enhance credibility and engage visitors. Incorporate strong calls-to-action that prompt visitors to download, sign up for the freemium option, or purchase your app’s premium version.
Industry Example: Grammarly, an AI-powered writing assistant, offers a comprehensive website that showcases the app’s features, customer testimonials, and a seamless download process.
Implement Influencer Marketing:
Partner with influencers or industry experts who align with your target market. Collaborate on sponsored content, guest blog posts, or social media campaigns to leverage their reach and influence. Engage influencers who can authentically endorse your app and provide valuable insights to their audience.
Industry Example: Calm, a meditation and sleep app, collaborated with renowned figures like LeBron James and Matthew McConaughey to promote their app, leveraging their brand credibility and expanding their user base.
Offer Limited-Time Promotions:
Create a sense of urgency and incentivize potential customers by offering limited-time promotions or discounts. Time-bound offers encourage users to take action and can attract early adopters. Consider offering exclusive discounts to early customers or providing additional features for a limited period.
Industry Example: Adobe Creative Cloud offers discounted annual subscription plans to students, encouraging them to purchase while they are still in school and fostering long-term customer loyalty.
Leverage Social Media Advertising:
Utilize social media platforms to reach your target audience effectively. Leverage the targeting capabilities of platforms like Facebook, Instagram, and LinkedIn to create tailored ad campaigns. Engage users with visually appealing content, customer success stories, and testimonials to generate interest and drive conversions.
Resources to Use: Facebook Ads Manager, LinkedIn Ads, and other social media advertising platforms provide robust targeting and analytics tools.
Implement a Customer Referral Program:
Encourage your existing customers to refer others through a customer referral program. Incentivize referrals with rewards, discounts, or exclusive access to new features. Leverage the power of social networks and word-of-mouth marketing to expand your customer base.
Industry Example: Dropbox offered additional storage space to users who referred friends, resulting in a viral customer acquisition strategy that propelled their growth.
Engage in Content Marketing:
Develop valuable and informative content to establish your app as an industry authority. Create blog posts, tutorials, case studies, or videos that address user pain points and provide actionable solutions. Share this content on your website, social media channels, and relevant industry forums to attract and engage potential customers.
Resources to Use: Tools like Buzzsumo, SEMrush, or Google Trends can help you identify popular topics and keywords within your industry.
Conclusion
Securing your first paid customers requires a well-executed marketing strategy tailored to your target market. Define your target audience, craft a compelling value proposition, and leverage resources like app store optimization, influencer marketing, and social media advertising. Engage potential customers through limited-time promotions, referral programs, content marketing, and the implementation of a freemium option. Remember to gather positive reviews and testimonials to build trust and credibility in the market. By implementing these strategies and learning from successful industry examples, you’ll be on your way to acquiring your first paid customers and establishing a strong foundation for future growth.
In today’s fast-paced digital landscape, you as a business might find yourself constantly looking for ways to streamline your operations and enhance customer experiences. One area that has been seeing significant advancements is chat app communication. With the rise of chat API (Application Programming Interface) services, companies can now integrate chat functionality into their existing systems quickly and cost-effectively. In this article, we’re going to explore how you can save time and money using chat APIs.
What is Chat API?
Chat APIs are software interfaces that allow developers to integrate chat functionality into applications or websites. These APIs provide a set of tools and resources, enabling businesses to leverage existing chat platforms’ capabilities and build customized chat solutions. Chat APIs can facilitate real-time messaging, chatbot interactions, multimedia sharing, and more.
What are the benefits of using Chat API?
Integrating chat APIs into your systems can bring several advantages, including:
1. Time efficiency
Chat APIs provide pre-built components and functionality, reducing development time significantly. Developers can leverage existing chat platforms’ features and concentrate on tailoring the solution to their specific requirements.
2. Cost savings
Building chat functionality from scratch can be time-consuming and expensive. Chat APIs offer ready-made tools, saving development costs and resources. Additionally, the maintenance and updates of the chat platform are handled by the API provider, further reducing operational expenses.
3. Scalability
Chat APIs are designed to handle a large volume of messages and users. As your business grows, you can seamlessly scale your chat solution without worrying about infrastructure limitations.
4. User experience
Chat APIs often come with advanced features like chatbots, multimedia sharing, and real-time notifications, enhancing the overall user experience. These features can be crucial for customer support, e-commerce transactions, and collaborative workflows.
How to use Chat API in your business?
1. Customer support
Imagine you want to provide real-time customer support on your website. By integrating a chat API, you can enable live chat functionality, allowing customers to interact with support agents directly. This way they won’t have to make phone calls (a real nightmare for so many of us, amirite?) or send emails, and get their issue resolved quicker. For your business, it means better customer satisfaction and higher retention rates.
2. E-commerce chatbot
An e-commerce business can leverage chat APIs to integrate chatbots into websites or messaging platforms. These chatbots can handle common customer inquiries, provide product recommendations, process orders, and even offer personalized shopping experiences. By automating these tasks, you as an e-commerce business can save time and reduce the need for human intervention, ultimately boosting efficiency and increasing sales.
Another popular implementation option of chatbots is in banking.
3. Collaborative team chat
In a collaborative work environment, communication is essential. By integrating a chat API into project management or collaboration tools, teams can communicate in real time, share files, assign tasks, and track progress. Without having to constantly exchange emails or face-to-face meetings (that sometimes can be emails). All these significantly speed up decision-making and increase team productivity.
4. Travel assistance
Travel agencies or booking platforms can enhance their customer service by integrating chat APIs. Customers can inquire about flights, hotels, or other travel-related services directly through the chat interface. Chatbots can provide instant responses, offer personalized recommendations, and even assist with booking and itinerary management. This saves time for customers who no longer need to browse multiple pages or wait for email responses = better user experience and better conversion.
5. Chat-based payments
Chat APIs can also facilitate secure and convenient payment processes. By integrating payment gateways into chat platforms, you can enable seamless transactions within chat conversations. This is particularly useful for e-commerce businesses, where customers browse products, ask questions, and make purchases. They can do it without having to leave the chat interface. It simplifies the buying process, reduces cart abandonment, and ultimately increases sales.
Which Chat API you can use?
Selecting the appropriate chat API provider is crucial for a successful integration. Factors to consider include reliability, scalability, security, ease of integration, documentation, support, and pricing models. It’s important to evaluate different providers and choose the one that aligns with your business requirements and goals.
Here are some best reliable Chat APIs we work with in Fora Soft:
Pros: Twilio is a widely recognized and trusted cloud communications platform. Their chat API provides robust features for real-time messaging, including channels, message history, and user authentication. It offers SDKs for multiple programming languages, making integration easier.
Cons: Pricing schemes can be a bit complicated, and costs can add up depending on the number of active users and messages. Some advanced features may require additional customization.
Pros: SendBird offers a powerful chat API with real-time messaging, push notifications, and rich media-sharing capabilities. It supports various platforms, including iOS, Android, web, and Unity. SendBird also provides chat moderation and analytics features.
Cons: SendBird’s pricing may be a bit higher compared to other providers, especially for larger-scale deployments. Some users have reported occasional performance issues during peak usage.
Pros: Firebase, a Google-backed platform, offers a chat API through its Cloud Firestore database. It provides real-time syncing, offline support, and easy scalability. Firebase also offers additional services like authentication and cloud functions, allowing for a comprehensive backend solution.
Cons: While Firebase Cloud Firestore is flexible, it requires more development effort to build custom chat features. It may not have all the advanced chat-specific functionalities provided by specialized chat API providers.
Pros: Communication channels. PubNub’s platform is highly scalable and can handle large volumes of messages and users.
Cons: PubNub’s pricing structure can be complex, and it may not be as cost-effective for smaller-scale deployments. Some users have reported occasional issues with documentation and support.
Stream Chat provides a feature-rich chat API with advanced functionalities such as channels, typing indicators, message threading, and reactions. It offers SDKs for web, iOS, Android, and React Native platforms. Stream Chat also provides an intuitive dashboard and comprehensive documentation.
Cons: While Stream Chat is known for its quality and ease of use, the pricing can be relatively higher compared to other providers. Some advanced features may require additional customization or integration effort.
When should you use Custom Chat?
While chat APIs offer significant advantages in terms of time and cost savings, there are situations where custom-made chats are a preferred choice.
Custom chat solutions provide businesses with the ability to create a chat system that is specifically tailored to their unique requirements and workflows. By building a chat solution from scratch, you have complete control over the design, functionality, and user experience of the chat interface. This level of customization can be especially valuable in complex or highly specialized applications where specific business needs or industry regulations must be met. Custom-made chats allow for the integration of specialized features, data sources, or third-party services that might not be readily available through a standard chat API.
In addition, if you have distinctive branding or user experience considerations you may find that a custom chat solution provides better flexibility. With a custom chat, you can align the chat interface with their brand identity, ensuring a seamless and consistent customer experience across all touchpoints. Customization also allows for the implementation of unique features or interactions that are tailored to the specific needs of your business and its target audience.
Furthermore, certain industries or sectors may have specific security or compliance requirements that necessitate a custom chat solution. Custom development allows for the implementation of robust security measures, such as encryption, user authentication, and data privacy protocols, ensuring that sensitive information is protected. Compliance with industry regulations, such as HIPAA for telemedicine or PCI DSS for payment processing, can also be better addressed through a custom chat system that is specifically designed to meet these requirements.
However, it is important to consider the trade-offs when opting for a custom chat solution. Developing a chat system from scratch requires significant time, resources, and technical expertise. It involves designing and building the entire infrastructure, including the backend, database, and real-time messaging capabilities. Custom development also requires ongoing maintenance and support to ensure the chat system remains secure, scalable, and up-to-date with evolving technologies.
Hopefully, this article can be a guide to you choosing the right solution for your product. And if you need professionals’ help both in implementing an API or building a chat from scratch, hit us up—we’ll be happy to assist. We’ll arrange a call to get to know your project better, and then will get back with primary analytics and cost-time estimations within a week. All—for free.
We’re thrilled to share an illuminating exploration into the ever-evolving landscape of digital marketing, specifically tailored to the dynamic realm of IT products. A while ago TechBehemoths, a leading platform for tech insights, invited Fora Soft to participate in a survey that aimed to unearth the most effective tools and channels in digital marketing for IT products. You can familiriaize with the entire study on the TB website, or look through the key tools we highlighted below and how the correlate with how we market the products we work on.
Strategic Social Engagement
Unsurprisingly, social media platforms continue to be the cornerstone of digital marketing strategies. The survey reveals that over 80% of the surveyed businesses actively use social media channels to connect with their target audience. Facebook and Instagram emerged as the top contenders, boasting the highest engagement rates among all platforms.
We reaffirm the power of the Meta platforms and others to engage tech-savvy audiences and recognize that tailored social strategies can effectively amplify the reach of IT solutions.
Content Diversification
Content remains king, with 72% of respondents emphasizing its crucial role in their marketing efforts. Beyond traditional written content, visual content like videos, infographics, and interactive content are gaining significant traction. This shift reflects the evolving preferences of today’s audiences.
Crafting compelling content lies at the heart of our digital marketing philosophy. For these needs, we have graphic designers, video editors, and a copywriter in our team always ready to power your product with top-notch content.
Strategic Email Endeavors
Despite the rise of newer marketing channels, email marketing remains a stalwart player. The survey showcases that personalized email campaigns have yielded impressive ROI for 63% of participants. It’s evident that a well-crafted email strategy can foster meaningful connections and conversions.
At Fora Soft, we’ve been consistently utilizing targeted email strategies to showcase the value of the products we work on to interested audiences.
SEO Mastery
Search Engine Optimization (SEO) is far from losing its relevance. Around 90% of those surveyed expressed their commitment to SEO strategies. This statistic underlines the enduring importance of organic search visibility in driving web traffic and brand visibility.
Fora Soft has always recognized the significance of SEO in the tech sector. This is what we primarily focus on marketing and promotion-wise.
Influencer Synergy
The survey highlighted the growing impact of influencer collaborations. Approximately 58% of respondents have leveraged influencer partnerships to extend their reach and tap into new audience segments. Authenticity and alignment with brand values are key factors driving the success of such collaborations.
It’s not that big of a trend as you can see and appears to be a quite controversial solution in some way. Still, for those of our clients who are ready to try new things and trust our expertise, we have people with an influencer marketing background in our team.
Our Dedication
The insights from this survey exemplify Fora Soft’s unwavering commitment to leveraging cutting-edge digital marketing strategies for IT products. As an expert in the field, we understand the nuances of the tech audience and craft campaigns that resonate with their aspirations.
To access a comprehensive dive into the survey’s findings and trends, we invite you to explore the detailed report provided by TechBehemoths. This resource promises to equip you with the tools and knowledge needed to navigate the digital marketing landscape strategically.
And for if you’d like to get your product developed, fixed, or promoted with us, contact our Sales. We’ll provide primary analytics and cost estimations for our work within a week for free.
The success of a multimedia platform often depends on the quality of its content. Therefore, there are numerous tools for content management, such as manual or automatic moderation to identify offensive content, copyright infringements, or automatic/manual processing of uploaded content. One of the methods of automatically enhancing content is silence trimming.
The task of isolating voice or sounds is quite challenging. In this article, we will explain how we explored solutions for this challenge during the development of our project, the BlaBlaPlay voice chat, and how to implement it in your iOS application.
[Theory] When do we need silence trimming?
For instance, you might have an audio file with segments where the volume is too low for human perception. In such cases, you may want to remove these segments from the file. Or, when recording an audio message, you might have some silent moments in the beginning while gathering your thoughts. To avoid rewinding through several seconds of silence repeatedly, it’s easier to trim them out. There are many similar cases, but the conclusion is the same—silence trimming improves the content and its perception quality.
We can implement it in different ways using various tools. Initially, we can identify two main groups of tools:
1. Manual removal—any audio editor has a basic function to select a segment for deletion or retention.
2. Automatic removal—these tools use auxiliary technologies to achieve the desired result. Let’s explore them in more detail.
[Theory] Automatic methods of silence detection
There are various methods, and the choice depends on the specific task faced by the developer. This is mainly because some tools allow isolating only the voice from the audio stream, while others work with both voice and background noises.
Detection based on sound level
Detection based on the sound level, or more precisely, its value, is the simplest and quickest method to implement. Therefore, it can be used for real-time audio streaming to identify silence. However, it is also the least accurate and fragile method of silence detection. The technology is straightforward:
1. Set a constant value in decibels, approximately equal to the threshold of human audibility.
2. Anything below this threshold is automatically considered silence and subject to trimming.
This method is suitable only when we need to identify absolute silence, and there’s no need to detect voice or any other background noises. Since absolute silence is rare, this method is not quite effective. Consequently, we can only use it for indicating the presence or absence of sound, not for processing silence.
Isolating voice from the audio stream
This approach works the opposite way—if there is speech, there is no silence.
Extracting sound from an audio stream is a non-trivial task and we can achieve it by evaluating the fragment’s sound levels or its spectrogram—a plot of sound level oscillations. There are two approaches to evaluation: analytical- and neural network-based. In our application, we used a Voice Activity Detector (VAD)—a speech detector to isolate voice from noise or silence. Let’s consider it as an example.
Analytical approach
When working with speech signals, frequency-time domain processing is usually employed. Among the main methods are:
The most effective method for voice extraction relies on the fact that the human speech apparatus can generate specific frequency bands known as “formants.” In this method, the input data consists of a continuous oscillogram (a curve representing oscillations) of the sound wave. To extract speech, it is divided into frames—sound stream fragments with durations ranging from 10 to 20 ms, with a 10 ms step. This size corresponds to the speed of human speech: on average, a person pronounces three words in three seconds, with each word having around four sounds, and each sound is divided into three stages. Each frame is transformed independently and subjected to feature extraction.
Dividing the oscillogram into frames
Next, for each window, a Fourier transformation is performed:
Peaks are found.
Based on their formal features, a decision is made: whether there is speech signal or not. For a more detailed process, refer to the work by Lee, 1983, “Automatic Speech Recognition.”
Neural Network Approach to the Assessment
The neural network approach consists of two parts. The so-called feature extractor is a tool for extracting features and building a low-dimensional space. The input to the extractor is an oscillogram of a sound wave, and, for example, using Fourier transformation, its low-dimensional space is constructed. This means that key features are extracted from a large number of features and formed into a new space.
Transforming high-dimensional space to low-dimensional space.
Next, the extractor organizes sounds in space so that similar ones are close together. For example, speech sounds will be grouped together but placed away from sounds of drums and cars.
Sound grouping scheme
Then, a classification model takes the output data from the feature extractor and calculates the probability of speech among the obtained data.
What to use?
The process of extracting sounds or speech is complex and requires a lot of computational resources for fast operation. Let’s understand when and which method should be applied.
Speech recognition approaches
So, as we can see, signal-level detection won’t be suitable if you need accuracy. Both analytical and neural network approaches have their nuances. Both require high computational power, which limits their use with streaming audio. However, in the case of the analytical approach, this problem can be addressed by using simpler implementations at the cost of accuracy. For example, WebRTC_VAD may not be highly accurate, but it works quickly with streaming audio, even on low-powered devices.
On the other hand, if you have sufficient computational power and you want to detect not only speech but also sounds like birds, guitars, or anything else, a neural network will solve all your problems with high accuracy and within an acceptable time frame.
[Practice] Example for detecting and trimming silence in iOS audio recordings
All iPhones are sufficiently powerful, and Apple’s frameworks are optimized for these devices. Therefore, we can confidently use neural networks to detect silence in streaming audio, employing a reverse approach: where there are no sounds — there is silence. For detection, we will use the Sound Analysis framework, and for audio recording and trimming — AVFoundation.
Receiving and sending audio buffers during recording
To capture audio buffers from the audio recording stream, we need an AVAudioEngine object. And to deliver the received buffers, we need to add an observer to the output of the connected audio node.
private var audioEngine: AVAudioEngine?
public func start(withSoundDetection: Bool) {
guard let settings = setupAudioSession() else { return }
do {
let configuration = try configureAudioEngine()
audioEngine = configuration.0
audioRecordingEvents.onNext(.createsAudioFromat(audioFormat: configuration.1))
} catch {
audioRecordingEvents.onError(AudioRecordError.creatingAudioEngineError)
print("Can not start audio engine")
}
configureAudioRecord(settings: settings)
}
private func configureAudioEngine() throws -> (AVAudioEngine, AVAudioFormat) {
let audioEngine = AVAudioEngine()
let inputNode = audioEngine.inputNode
let recordingFormat = inputNode.outputFormat(forBus: 0)
inputNode.installTap(onBus: 0, bufferSize: 4096, format: recordingFormat) { [weak self] buffer, time in
self?.audioRecordingEvents.onNext(.audioBuffer(buffer, time))
}
audioEngine.prepare()
try audioEngine.start()
return (audioEngine, recordingFormat)
}
Processing the buffer in the neural network and obtaining the result
The Sound Analysis framework comes with built-in recognition for 300 sounds, which is more than sufficient for our task. Let’s create a classifier class and properly configure the SNClassifySoundRequest object.
final class AudioClassifire
private var analyzer: SNAudioStreamAnalyzer?
private var request: SNClassifySoundRequest?
init() {
request = try? SNClassifySoundRequest(classifierIdentifier: .version1)
request?.windowDuration = CMTimeMakeWithSeconds(1.3, preferredTimescale: 44_100)
request?.overlapFactor = 0.9
}
}
When creating the SNClassifySoundRequest, it is crucial to use a non-zero overlapFactor value when using a constant windowDuration. The overlapFactor determines how much the windows overlap during analysis, creating continuous context and coherence between the windows.
Next, we need a class of observer that conforms to the SNResultsObserving protocol. All classification results will be sent to this observer.
enum AudioClassificationEvent {
case result(SNClassificationResult)
case complete
case failure(Error)
}
protocol AudioClassifireObserver: SNResultsObserving {
var audioClassificationEvent: PublishSubject<AudioClassificationEvent> { get }
}
final class AudioClassifireObserverImpl: NSObject, AudioClassifireObserver {
private(set) var audioClassificationEvent = PublishSubject<AudioClassificationEvent>()
}
extension AudioClassifireObserverImpl: SNResultsObserving {
func request(_ request: SNRequest, didProduce result: SNResult) {
guard let result = result as? SNClassificationResult else { return }
audioClassificationEvent.onNext(.result(result))
}
func requestDidComplete(_ request: SNRequest) {
audioClassificationEvent.onNext(.complete)
}
func request(_ request: SNRequest, didFailWithError error: Error) {
audioClassificationEvent.onNext(.failure(error))
}
}
Once the observer is created, we can create the stream for analyzing incoming audio buffers—SNAudioStreamAnalyzer..
After the AVAudioPCMBuffer is successfully recognized, an event AudioClassificationEvent.result(SNClassificationResult) will be received in AudioClassifierObserver.audioClassificationEvent. It will contain all recognized sounds and their confidence levels. If there are no sounds, or their confidence is less than 0.75, we can consider that the sound was not recognized, and we can ignore the result. This can be determined as follows:
Once the recording starts, and the first audio buffers are sent to the neural network for analysis, we need to start a timer. It will count the time until the first non-zero results appear. Note that the first results will not be obtained earlier than request?.windowDuration = CMTimeMakeWithSeconds(1.3, preferredTimescale: 44_100). So the initial timer values should take this into account.
private var recordSilenceTime: Double = 0.6
private var silenceTimer: DispatchSourceTimer?
private func processAudioClassifireResult(_ result: SNClassificationResult) {
let results = audioClassifire.detectSounds(result)
guard !results.isEmpty && !currentState.classificationWasStopped && silenceTimer == nil else {
startSilenceTimer()
return
}
results.forEach {
print("Classification result is \($0.description) with confidence: \($0.confidence)")
}
stopObservingClassifire()
}
When the first non-zero results appear, we stop the timer and, based on recordSilenceTime, we can trim a portion from the beginning of the audio recording.
private func processRecordedAudio(fileName: String, filesPath: URL) {
if recordSilenceTime > 0.6,
let trimmedFile = fileName.components(separatedBy: ".").first {
let trimmer = AudioTrimmerImpl()
trimmer.trimAsset(AVURLAsset(url: url), fileName: "\(trimmedFile)", trimTo: recordSilenceTime) { [weak self] url in
DispatchQueue.global().asyncAfter(deadline: .now() + 0.2) {
let record = AVURLAsset(url: url)
}
}
}
}
File trimming is done using AVAssetExportSession.
func trimAsset(_ asset: AVURLAsset, fileName: String, trimTo: Double, completion: @escaping (String) -> Void) {
let trimmedSoundFileURL = documentsDirectory.appendingPathComponent("\(fileName)-trimmed.mp4")
do {
if FileManager.default.fileExists(atPath: trimmedSoundFileURL.absoluteString) {
try deleteFile(path: trimmedSoundFileURL)
}
} catch {
print("could not remove \(trimmedSoundFileURL)")
}
print("Export to \(trimmedSoundFileURL)")
if let exporter = AVAssetExportSession(asset: asset, presetName: AVAssetExportPresetPassthrough) {
exporter.outputFileType = AVFileType.mp4
exporter.outputURL = trimmedSoundFileURL
exporter.metadata = asset.metadata
let timescale = asset.duration.timescale
let startTime = CMTime(seconds: trimTo, preferredTimescale: timescale)
let stopTime = CMTime(seconds: asset.duration.seconds, preferredTimescale: timescale)
exporter.timeRange = CMTimeRangeFromTimeToTime(start: startTime, end: stopTime)
exporter.exportAsynchronously(completionHandler: {
switch exporter.status {
case AVAssetExportSession.Status.failed:
if let error = exporter.error {
print("export failed \(error)")
}
case AVAssetExportSession.Status.cancelled:
print("export cancelled \(String(describing: exporter.error))")
default:
print("export complete")
completion(fileName)
}
})
} else {
print("cannot create AVAssetExportSession for asset \(asset)")
}
}
Results and Conclusion
Detecting silence or sounds in audio recordings becomes more accessible for applications that are not primarily specialized in professional processing without sacrificing the efficiency and accuracy of the obtained results. Apple already provides ready-made tools for this, so there’s no need to spend a year or more developing such functionality manually. Love neural networks.
Check out how it works in our BlaBlaPlay app or contact us to implement the silence trimming feature in your iOS application.
Team stability and continuous development are two factors that form a truly great and efficient team. And a great and efficient team creates high-quality products. To achieve this, many successful companies implement a mentoring system, and Fora Soft is no exception. We as well faced challenges in communication and tracking unforeseen situations, and we needed a tool to ensure regular feedback and the steady growth of our employees.
One of the potential approaches we considered was the “Buddy” system—a person in the company whose task would be to immerse newcomers in work processes. However, our goal was to provide professional development. Therefore, we decided that such a system would not be effective enough for us, as “Buddy” implies a more informal communication style than we desired. That’s how mentors emerged in Fora Soft.
What does a mentor do?
First and foremost, we defined the role and responsibilities of mentors in our company. Our goal was to relieve project managers of adapting and integrating new employees into projects. We decided that mentors would be individuals with a higher level of experience (at least middle level) who had already worked in the company for at least six months.
Their main task is to help new employees adapt during their probationary period and continue supporting them in their ongoing professional development.
Two stages of mentoring in Fora Soft
Each of our employees goes through a probationary period. For more details on this, read the article.
It is during the probationary period that newcomers get acquainted with their mentors. During this period, mentors:
Introduce new hires to the company and its work processes.
Explain the structure and methodologies of our work.
Ensure that the new employee understands everything and answer any questions if necessary.
Provide ongoing feedback on work progress, both in the moment and during individual meetings (every two weeks or more frequently).
Develop a development plan and monitor its execution.
Track the speed and quality of work and help in problem-solving.
By the end of the probationary period, the newcomer should have a good understanding of the company’s work processes, values, and culture. However, if a new employee wishes to continue the mentoring relationship even after the official completion of the probationary period, the mentor will:
Assist in resolving professional and software development-related issues.
Continue developing the development plan and monitor its implementation.
Provide feedback during one-on-one meetings on a monthly basis.
How does mentoring promote growth?
Mentoring is an indispensable component of the employee development framework at Fora Soft, contributing significantly to their professional advancement. This process is instrumental in several key ways:
Skill and Knowledge Transfer: Mentoring serves as a conduit for the transfer of essential skills and knowledge from seasoned employees to newcomers. This transfer is vital for equipping new hires with the competencies necessary to excel in their roles.
Accelerated Integration: For new employees, navigating the complexities of a company’s culture, workflow, and processes can be overwhelming. Mentoring accelerates the integration process by providing them with insights, tips, and guidance on how to adapt and fit into the team seamlessly.
Comprehensive Understanding: Through mentorship, new hires gain a holistic understanding of the organization’s work processes. They can explore not only the formal procedures but also the informal dynamics, which are often just as crucial for success within the company.
Feedback and Improvement: Regular interaction with mentors ensures that new employees receive constructive feedback on their performance. This feedback loop is essential for continual improvement, allowing individuals to refine their skills and refine their approach to their tasks.
Professional Development: Mentorship at Fora Soft doesn’t stop at the basics. It actively fosters ongoing professional development. As employees progress in their roles, their mentors guide them toward more advanced skills, helping them reach their full potential.
In summary, mentoring at Fora Soft is a dynamic and multifaceted process that goes beyond simple orientation. It’s a strategy that invests in the growth and success of each employee, ultimately benefiting both the individual and the company as a whole.
Additionally, the mentoring system encourages initiative and autonomy. This empowers Fora’s employees to not only successfully complete their tasks but also discover new innovative approaches to project challenges.
We strive to provide our clients with the best results in software development. Mentoring is one of the key factors contributing to achieving this goal.
Experience the quality of our development yourself—contact us to discuss your project. We will clarify the details and provide initial product concepts along with a rough estimate within a week.
At Fora Soft, following the world’s best practices, we strongly believe that the analytics stage is essential for launching a successful product—software or an app that meets users’ needs and benefits the business.
In this article, you will learn what Primary Analytics is, how the process goes, and what differentiates it from Comprehensive Analytics. We’ll also determine specific factors that will help you make an informative decision about which of the 2 suits better for your project.
Primary Analytics vs Comprehensive Analytics
Comprehensive Analytics is the best practice
Analytics is the first step in the development process that allows us to analyze the market, determine users’ pain points, document system functionality, and create wireframes that sharpen the future product’s image. This is a comprehensive process with many stages and peculiarities that gets you:
a wireframe—a clickable prototype of the future product, it looks like this. You are free to use it / it can be helpful to use when you’re looking for getting investments.
a user stories file— a detailed description of what each user can do in the system, for example,
an estimation of the time and effort required to develop the product.
That profound approach may take a significant amount of time. It might be a couple of weeks as the starting point and depending on the scope of work for the project.
Primary Analytics is a free quick estimation
If you don’t have much time for analytics and you need a rough estimation of product development as soon as possible, Primary Analytics is the solution.
You will get a prospect of your future product and a rough estimation for it within 4 to 7 days, completely free.
Primary Analytics as a Basis for Comprehensive Analytics
To define Primary Analytics flow, we’ll compare it to our usual Comprehensive Analytics flow and highlight the differences.
Primary Analytics vs Comprehensive Analytics
Primary Analytics produces results in a short time and makes a good basis for further Comprehensive Analytics saving lots of time. With Primary Analytics done, we can take off fast since we’ve already determined and described the system, the user flow, and all the key functionalities and have put them in order of priority.
What benefits do you get with Primary Analytics?
It’s a time and money saver
A strong advantage of Primary Analytics is that it can save both time and money. By having early estimations, you can plan the project’s economics from the start. This will help you decide whether to reduce or expand functionality scope and make informed decisions when prioritizing tasks.
Primary analytics takes up to 20 hours. This means that we can deliver the documented functionality of a future product along with rough time and effort estimation for further Comprehensive Analytics and product development in less than a week.
It speeds up product launch
By saving time with Primary Analytics, you can launch your product sooner. Trends in the market change rapidly, so being an early bird and entering the market first is crucial for gaining a competitive edge. Though it may seem that Primary Analytics and product launch are far away from each other, in fact, if the process is focused and streamlined from the very beginning, it becomes a basis for well-planned and speedy development.
It helps to make faster decisions
Seeing the full picture without getting distracted by details allows us to prioritize features effectively. It is also beneficial for Comprehensive analytics, as it mainly concentrates on detalization of the 1st priority features and communicates them into wireframes.
It enhances communication
In addition, Primary Analytics allows both clients and analysts to get to know each other and establish effective communication. Moving forward with an analyst who is already familiar with the product concept and business goals results in smoother processes in the later stages of analytics and development.
The Bottom Line
The introduction of Primary Analytics at Fora Soft has proven to be a game-changer for our clients. By offering a rapid and focused approach to the initial stage of product development, we provide significant benefits and advantages—more specifically, saving you time and money.
We understand that time is of the essence for our clients. Contact us for a free Primary Analytics service, where you get
to obtain a prospect of your future product
a rough estimation within a week.
In addition, you can compare our estimations with those of other companies’ developers. We are confident that our estimates will stand out, as they are based on our profound expertise and industry knowledge.
If you are unsure whether this flow is right for you or have any remaining questions, we are happy to provide further details and recommendations. We prioritize equipping our clients with the information they need to achieve their product development goals. Contact us to schedule a call and discuss your project.
A properly assembled team is half the success of a product. It’s important to us that only professionals work on your project. That’s why every developer at Fora Soft undergoes thorough a multi-stage training before joining your project. We make sure to assess the technical abilities of our employees as well as their skills for teamwork, meeting deadlines, and handling feedback correctly. Thanks to this selection process, we have managed to build a strong team.
In this article, we will explain how we select developers.
Fora’s CEO, Nikolay, says: “If you don’t love what you do, you’ll have to compete with those who do, and that’s a losing game.” Therefore, passion for the work is a key criterion for personnel selection at Fora Soft. We take this seriously and assess not only knowledge and skills but also alignment with our values: constant learning and development, being proactive, being a team player, and doing an awesome job.
Now, let’s delve into the details of the selection process.
Interviews
To join us, each of our employees has gone through a multi-stage selection process.
Resume submission.
Call with an HR rep. We ask several technical questions to assess candidate’s proficiency in the basic knowledge of the craft.
Technical interview. A department head or a senior specialist conducts it. At this stage, the questions are more in-depth, focusing on hard skills.
Test assignment. Regardless of the results of the test assignment, we always provide detailed feedback, including the assessed criteria, rights and wrongs, and recommendations for skill improvement (literature, useful links).
Final interview. If the candidate passes previous stages successfully, they meet our CEO. This is not just a formality—Nikolay personally approves those who will join our team.
Then we make an offer, agree on and wait for the first working day when we show the office, introduce ourselves, and introduce the new employee with a mentor.
So, interviewing process falls into following numbers:
We conduct interviews with 500candidates.
Out of 500 candidates, 20% pass the phone interview—100 people.
Out of 100 candidates, 40% proceed to the interview stage—40 people.
Out of 40 candidates, 30% go through the technical and test interviews with a developer—12 people.
Out of 12 candidates, 90% pass the final interview with the director—10 people.
We only hire 10 out of 500 people
Out of 500 candidates, we send offers to 10—that’s 2%.
But the selection process doesn’t end there.
Probationary Period
No matter the developer’s starting level, at Fora Soft, the probationary period consists of 3 stages:
Training
Assessment and Development Plan
Final Evaluation
We develop multimedia software (chats, video chats, augmented reality, video object recognition, etc.). There is a severe shortage of developers in this field. That’s why we grow our own talent and we are always ready to accommodate newcomers. The main thing is to love what you do.
So how do we do it? Now in detail.
First things first—Training
Our probationary period is designed in a way that developers don’t immediately join a project; they first go through a Trial by Fire. This is what we call a pet project, where newcomers gain skills for their future work, familiarize themselves with the media server, and create their first text and video chats. For a new developer, this is an opportunity to practice and learn the necessary technology in a “sandbox” environment. For us, it’s a chance to see how they handle new tasks and assess the effectiveness of our selection process. During the training, we evaluate three parameters: speed of execution, quality, and initiative.
On average, we allocate up to 80 hours for the pet project. If the newcomer doesn’t meet the deadline, we part ways. It’s important for us to work at the same pace and meet deadlines.
If a developer successfully completes the training, they are assigned to an ongoing project. There, we assess their teamwork skills.
During the probationary period, each newcomer is assigned a mentor so we can:
Monitor 4 performance parameters: quality, speed, teamwork, and initiative.
Familiarize them with the company’s internal processes.
Verify that the newcomer understands and assimilates information correctly.
Provide feedback on task completion and technical advice.
A mentor at Fora Soft is a more experienced employee, starting from Middle positions, who has been with the company for over six months and has gone through all these stages themselves. Therefore, mentors understand well what it’s like to be evaluated and to not know something. This helps to grow not only the newcomers but also the mentors themselves. Sometimes, in order to answer a mentee’s question, mentors have to google and learn something new themselves. In this way, they improve not only their hard skills but also their soft skills, which has a positive impact on teamwork.
Next—Evaluation and Development Plan
Evaluation takes place after one month of work on a project. It’s simply a meeting to assess skills, understand what knowledge the newcomer has absorbed well, and identify room for improvement. Based on what we learn and obtain, we come up with a one-year development plan, taking into account the technologies required for the specific project as the top priority. We also consider the newcomer’s desires to ensure that their learning experience doesn’t become monotonous as it was at school.
Wrapping up the probationary period
When we determine that the newcomer has adapted well, we finish the probationary period. Sometimes this happens before the standard 3 months. Before making the final decision, we ask the team to fill out an anonymous questionnaire and conduct a final interview. During the interview, we present the questionnaire results, recommendations, and comments from other employees. The newcomer then decides whether they want to continue working with their mentor according to the development plan or proceed independently. Often, newcomers choose to work with their mentor so they further provide useful materials, verify the assimilated knowledge, and conduct code reviews.
To sum up
At Fora Soft, we assign to your project only those who we have trust and are confident in, ensuring that you can be confident in the outcome. See it for yourself: get in touch with us to discuss your project and start working together. We will provide you with initial requirements, architecture, and a project cost estimate free of charge.
Writing code is just like solving a math problem: there’re many multiple ways you can do it, but there’s only one correct result. To make sure the solution you or another developer have chosen is correct, you can carry out a code audit. We do it as a service, but you can make it yourself. This article gives insights on how to do that and what to pay attention to.
What is code auditing
Code audit is a process of examining and assessing the quality of code. It helps identify potential issues in various aspects, understand the state of the written code, its reliability and weaknesses, prevent potential problems. The result of an audit is a detailed report that specifies the state of code categories, with explanations and examples.
Evaluation criteria:
At Fora Soft, we conduct code audits based on 8 key criteria:
Code Formatting — code organization and formatting
Best Practices — adherence to modern standards
Maintainability — ease of maintenance
Performance — code efficiency and speed
Architecture — quality of the overall design
Documentation — quality of accompanying documentation
Safety — code security
Efficiency — resource optimization
Now, let’s go into each criterion in detail.
Code Formatting
This refers to how the code is written. Each programming language has its own community-accepted standards, usually multiple standards for each language. The formatting and the code writing style in a project should be consistent throughout all its parts. When evaluating formatting, we check the indentation, spacing, line breaks, and overall module structure. When evaluating style, we focus on how variables, methods, classes, and files are named and written.
Why is consistent formatting important?
Inconsistent code formatting can lead to difficulties in reading and understanding the code, affecting the speed of onboarding new developers to the project. Additional hours mean additional budget expenses.
Code formatting: bad exampleCode formatting: good example
Best Practices
In this criterion, we check if the code adheres to modern software development principles. For example, we assess whether the code follows the single responsibility principle, where each module or class is responsible for a specific task or functionality. We also evaluate how effectively the code handles errors and logs them. Another important aspect is how the specific features of the programming language are utilized in the project.
Why is this important?
Meeting this criterion ensures high-quality code and system. Otherwise, there is a risk of decreased performance, difficulties in maintenance, and implementing new functionalities into the system. Security vulnerabilities may arise, and the scalability of the project may be limited.
Architecture: bad exampleCode architecture: good example. Each module is only responsible for 1 functionality
Maintainability
We assess how maintainable the code is, meaning whether its writing adheres to general rules that are language-independent.
Why is this important?
Software often requires constant changes, bug fixes, and additions of new features in response to evolving business or user requirements. Proper use of loops, conditions, absence of duplicated code segments, universality of written classes and functions, and their scalability make the task much easier. Otherwise, the code becomes harder to understand, more fragile, and prone to errors. Making changes or fixes will then require more time, which translates to increased expenses.
Architecture
In this category, we evaluate the modules, their cohesion, and configurability. We assess how well the code and the entire project are divided into modules or components. A good architecture should be modular, with weak coupling between modules, which simplifies system maintenance and expansion.
Why is it important?
If the code architecture is unclear, complex, and unstructured, it can hinder the process of maintaining and developing the system. Developers will face difficulties in understanding the functionality and logic of the code, as well as making changes.
Costs of fixing and modifying. Incorrect architecture may require significant changes and modifications to the code to fix issues or add new functionality. This increases development costs, time to market, and project management complexity.
Documentation
We check the quality, relevance, and presence of documentation. Documentation helps clients and future developers better understand the code and its functionality. Good documentation simplifies system maintenance, development, and integration. It usually includes:
A readme file that briefly describes the project’s essence, explains how to install and use the system, etc. It is important to include diagrams that explain the workings of complex modules.
Why is it important?
The absence of documentation poses a risk of knowledge loss, especially if there have been changes or reassignments within the development team. This hinders the understanding of the system’s operation and can lead to dependence on a limited circle of employees familiar with the code.
Security
We check the security of the code and identify vulnerabilities. Specifically:
Input data vulnerabilities. We check how user input data is handled, whether the system properly filters, validates, and escapes user input. We check for vulnerabilities such as SQL injections or script injections.
Authentication and authorization. We assess how authentication (verification of authenticity) and authorization (access control) mechanisms are implemented in the code. We check if secure password storage methods are used and if there are mechanisms to prevent password guessing or session ID guessing attacks.
Encryption and data protection. We check that confidential data (passwords, personal user information) is stored in encrypted form. We ensure that secure encryption protocols are used when transmitting data over the network.
Why is it important?
Neglecting code security increases the risk of:
Leakage of confidential user data or violation of their confidentiality.
System hacking or injection of malicious code. Violation of data integrity.
Loss of access to the system or service.
Financial losses or legal issues.
Damage to reputation and user trust.
Efficiency
In this aspect, we examine how effectively the code utilizes system resources, its performance, and algorithm optimization. We consider factors such as execution time, whether it justifies its size, memory leaks, caching (for repeated requests), and the use of appropriate data structures and algorithms.
Why is it important?
Potential risks of not meeting this criterion may include:
Low performance and long operation times.
Excessive resource usage (memory, processor time, and disk space).
Limitations in system scalability.
Instability and unpredictable behavior of the code when handling large volumes of data or high loads.
Deterioration of user experience and user dissatisfaction.
Outro
Code audit is not an easy task for you have to consider many parameters at once. However, it’s a necessary thing to do to make sure you’re not wasting time or money. And if you’d like some help with it, contact us. We’ll audit your product’s code, come up with solutions to how make it better, give recommendations and estimations. All for free.
The Picture-in-Picture (PiP) mode allows users to watch videos in a floating window on top of other windows. They can move it around the screen and place in any convenient spot. This feature enables users to keep an eye on what they are watching while interacting with other websites or applications.
We have previously covered the PiP implementation on Android with code examples. In this article, we will focus on iOS.
Picture in Picture is a must-have feature for modern multimedia applications
Here’s why:
1. Enhances multitasking. PiP allows users to simultaneously watch videos or view images in a small window while maintaining access to the main content or application interface. This enables users to multitask, e.g. watch a video while checking emails, sending messages, or browsing social media.
2. Improves user experience. The mode provides more flexible and convenient app navigation. This significantly enhances the user experience by eliminating the need to interrupt content playback or switch contexts completely.
3. Minimizes session interruptions. PiP enables users to continue watching or tracking content while performing other tasks. This helps reduce interruptions and ensures a smoother and uninterrupted workflow. For example, a user can watch a tutorial or a YouTube livestream while searching for information on the Internet or taking notes.
All these factors help retain users within the application and increase the duration of app usage sessions.
Peculiarities and difficulties of PiP on iOS
Apple envisages two scenarios for using PiP on iOS:
1. For video content playback
2. For video calls
The main issue is that for the video call scenario, prior to iOS 16 and for iPads that do not support Stage Manager, it is necessary to request special permission from Apple to access the camera in multitasking mode (com.apple.developer.avfoundation.multitasking-camera-access). But even after waiting for several months, as in our case, Apple may still not grant these permissions.
Therefore, in our mobile video chat app, Tunnel Video Calls, we decided not to use such a scenario. Instead, we adopted the approach where a video call and its content are considered as video playback.
PiP lifecycle on iOS
The Picture-in-Picture mode is essentially the content exchange between a full-screen app and PiP content from another app. The lifecycle of this exchange can be schematically represented as follows:
Stages of transitioning to the PiP mode on iOS
1. Video is playing in full-screen mode.
2. The user initiates an event that triggers the transition to PiP mode, such as pressing a specific button or minimizing the app.
3. An animation is launched to transition the video to PiP mode — the full-screen video shrinks into a thumbnail and moves to the corner of the screen.
4. The transition process completes, and the application changes its state to the background state.
Then, when it is necessary to bring the video back to full-screen mode from PiP mode, the following steps occur:
1. The app is in the background state and displays PiP.
2. An event occurs that initiates the transition from PiP to full-screen mode and stops the Picture in Picture mode – such as pressing a button or expanding the app. The app enters the foreground.
3. An animation is launched to transition the video to full-screen mode. The app enters the state of displaying the video in full-screen.
Here’s how it looks:
Steps to exit Picture in Picture mode on iOS
Implementing PiP for video playback
To enable PiP, you need to create an AVPictureInPictureController(playerLayer: AVPlayerLayer) object, and it must have a strong reference.
if AVPictureInPictureController.isPictureInPictureSupported() {
// Create a new controller, passing the reference to the AVPlayerLayer.
pipController = AVPictureInPictureController(playerLayer: playerLayer)
pipController.delegate = self
pipController.canStartPictureInPictureAutomaticallyFromInline = true
}
Next, you need to start playing the video content.
Implementing Picture in Picture mode in an iOS app for video calls using WebRTC technology is perhaps the most challenging part of the work. We would be happy to help you with it, so please reach out to us to discuss the details. Conceptually:
In this implementation, the camera will not capture the user’s image, and you will only be able to see the conversation partner.
To achieve this, you need to:
1. Create an AVPictureInPictureController object.
2. Obtain the RTCVideoFrame.
3. Retrieve and populate CMSampleBuffer based on RTCVideoFrame.
4. Pass the CMSampleBuffer and display it using AVSampleBufferDisplayLayer.
Here’s a sequence diagram illustrating the process:
Screen sharing is almost the basic function of video call platforms. Skype, WhatsApp, Telegram, Teams, Google Meet. All these systems have this feature.
You can enable screen sharing immediately when you create a new video call, in advance, before it actually starts.
However, we will take a glance at the most common case, when screen sharing starts after the call itself started.
To simplify the description of the screen sharing implementation, let’s say that we already have a ready-made application with WebRTC calls. Read more about the implementation of the WebRTC video call.
Steps for implementation will be the following:
Accessing screen content
Creating a video track with a screen image
Replacing the camera video track to the the screen video track
Displaying a notification of an ongoing screen sharing
Now each one in detail:
Accessing screen content
First we get access to capturing the screen content and device sound with Media Projection API:
val screenSharingPermissionLauncher = registerForActivityResult(
ActivityResultContracts.StartActivityForResult()
) { result ->
// Handle request result
val screenSharingIntent = result.data
if (screenSharingIntent != null) {
// Success request
}
}
val mediaProjectionManager = getSystemService(Context.MEDIA_PROJECTION_SERVICE) as MediaProjectionManager
val intent = mediaProjectionManager.createScreenCaptureIntent()
screenSharingPermissionLauncher.launch(intent)
When calling for screenSharingPermissionLauncher.launch(intent), a dialog window will appear. It will tell the user that media projection will access all the information displayed on the screen.
As a result of successful access to the screen content we get screenSharingIntent
Creating a video track with a screen image
Create videoCapturer, which will capture the image from the screen:
val mediaProjectionCallback = object : MediaProjection.Callback() {
override fun onStop() {
// screen capture stopped
}
}
val videoCapturer = ScreenCapturerAndroid(screenSharingIntent, mediaProjectionCallback)
Then create localVideoTrack:
val surfaceTextureHelper = SurfaceTextureHelper.create("CaptureThread", eglBase.eglBaseContext)
val videoSource = peerConnectionFactory.createVideoSource(/* isScreencast = */ true)
videoCapturer.initialize(surfaceTextureHelper,context, videoSource.capturerObserver)
videoCapturer.startCapture(displayWidth, displayHeight, fps)
val localVideoTrack = peerConnectionFactory.createVideoTrack(VIDEO_TRACK_ID, videoSource)
Replacing the camera video track to the the screen video track
To replace the video track correctly, implement the renegotiation logic for both call participants. When changing local media tracks, WebRTC calls onRenegotiationNeeded. It repeats the sdp exchange process:
val peerConnectionObserver = object : PeerConnection.Observer {
...
override fun onRenegotiationNeeded() {
// Launch sdp exchange
peerConnection.createOffer(...)
}
}
val peerConnection = peerConnectionFactory.createPeerConnection(iceServers, peerConnectionObserver)
Now to the video track replacing. Delete the camera video track from the local media:
localMediaStream.removeTrack(cameraVideoTrack)
Stop capturing the camera video:
cameraVideoCapturer.stopCapture()
Add screen sharing video track:
localMediaStream.addTrack(screenVideoTrack)
Displaying a notification about an ongoing screenshot
At the start of the screen sharing, it’s necessary to run the Foreground Service with the notification that the demonstration has started.
Create a ScreencastService and add it to AndroidManifest.xml. Also specify the foregroundServiceType parameter:
Before replacing the video trach from the camera with the screen sharing video track, launch ScreencastService:
val intent = Intent(this, ScreencastService::class.java)
ContextCompat.startForegroundService(this, intent)
Then, in ScreencastService (e.g. in onStartCommand()), call the startForeground method:
startForeground(NOTIFICATION_ID, notification)
Common issues with implementation
The app crashes on Android 10+ devices with the “Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION” error
Foreground Service ensures that the system will not “kill” the app during screen sharing. The Foreground Service notification will inform the user about the running screen sharing and will allow to quickly return to the application.
How to solve: do not forget to display the notification about the started screen sharing 🙂
There is no replacement for the camera video track to the screen one
This might occur if the recognition logic is not implement (correctly) on one or both callers sides.
How to solve: override onRenegotiationNeeded method in PeerConnection.Observer (method name on other platforms may differ). When calling onRenegotiationNeeded, the sdp exchange process must be started.
Conclusion
In this article we covered the implementation of screen sharing in video call and how you can:
Access screen content with MediaProjection API
Capture screen content with ScreenCapturerAndroid
Create a local video track with screen image
Replace the camera video track with the screen video track
Implement Foreground Service for displaying screenshot notification