Have multiple channels open on one project in Agora for enterprise project? - flutter

It's a bit hard to summarize my problem into a question, so bear with me. In the Agora documentation, they give usage examples that only utilizes one channel on a project that you create at the start of the documentation, or tutorial if you will (you create new projects at console.agora.io).
In my project, I need to be able to allow users to create "rooms" where they can send audio to each other, but the documentation only shows how to create 1 channel on your project, with only one temporary token provided. If I were to use the token in my program, then users would all connect to one huge global channel with every user on it, which defeats the purpose of creating rooms. I know that with the Android documentation here, you can just call createChannel and it will make a channel on your Agora project. I need to make more than one channel, so users can create their own and join other user's channels/rooms, so that should work, but how do I do this with Flutter? Switching the platform to Flutter on the documentation website shows an error. Is this not possible? How do I have multiple channels created on one Agora project with Flutter? Essentially the problem boils down to the question, how do I make a channel?

The new project that you create through Agora's console gives you an APP ID which basically helps to connect your account. While in your code you have a joinChannel() function - now this can take a predefined value in case you want only one channel or you can pass a variable for that channel name and that channel name can be read as an input.
You can refer to this code over here: https://github.com/Meherdeep/agora-group-calling

Related

What is the easiest way to fetch data dynamically from a cloud storage to a flutter app

I am looking for a way to fetch data to my flutter app which can be adjusted and modified dynamically after deploying the app. As an example, if I want to change the images of the carousel depending on promotions or launch new books to the digital library. I need an economic option to host the data in cloud storage and fetch it from there.
I have considered firebase as well as google drive, but have yet to find a good guide. being a beginner and having concerns about security I want some expert advice if possible.
*edit-
Seeing many a tutorial I assume there is no better way than linking file URLs from the
Cloud Storage. So to dynamically change those is it possible to refer the URLs to some excel sheet fields to obtain URLs. Those fields can certainly be adjusted then without any hard coding. but the question is how to refer to such a sheet file? *
I also want to segregate the users into paid and free users, I have successfully proceeded with the authentication with firebase but still don't understand(I do have some concepts but don't know where to do that) how to put them in groups and impose limitations on them about accessing the data. any guidance, links and helpful advice will be cordially appreciated.
According to what you are looking for, I highly recommend you to use Firebase Remote Config, which is a cloud tool that allows you to modify your app's functionality and appearance without forcing users to download an update. You define in-app default values that control the functionality and appearance of your app when you use Remote Config. Then, for all app users or for subsets of your user base, you may utilize the Firebase console or the Remote Config backend APIs to modify in-app default values.
Your program can control when updates are applied, and it can check for updates regularly and apply them with minimal performance impact.
Remote Config comes with a client library that takes care of essential functions like fetching parameter values and caching them while still allowing you to manage when new values are active and how they affect the user experience in your app.
Here is a tutorial that uses Flutter and Firebase Remote Config that could also help you.

Ionic Framework different databases

I am new to Ionic, currently learning to develop using Ionic. I just have a question, I don't know if it is possible.
My plan is to create an Ionic app, one application/code base only, for browser as admin, and mobile app for the user. I will limit their access based on the user.
Is it possible that I have two different database on my app?
On my browser I will use REST API to connect to MySQL.
On the generated mobile app, I will use an offline database.
Hope you can enlighten me. The goal is to develop a one application for web and mobile app. But I don't know if it is possible.
Thank you.
Your question is not very clear, I will try to answer according to what I understood.
You didn't mention the back-end, so I am assuming you are using the same data structure for both, e.g(user has id and name and phone, in both, identically)
In this case you can create a setting file where you will save your constant connection strings along with any necessary information(create a any-name.ts file in your root folder and just write down
export let example = {...}
and whenever you need, just import your any-name.ts and use the object inside.
If the data structure is also different, I thinks you will be doing massive works to maintain such an app, but the idea would be creating 2 of each functionalities having the same output but different inputs.
P.S in both cases I mentioned you will need to detect the platform to define which function/information is adequate.

Using other languages with Flutter

I have been working with flutter for a couple of months now and it seems that there isn't really too much to work on an app for back-end or advanced functionality. I love using Flutter to help me design the UI but I want to use another language to help me do some other stuff. For example, I want to display a full-screen camera page (almost like Snapchat) or like send a direct message to another user through the app. Do I even need another language to do stuff like this? I am not an advanced programmer. I just want to create simple applications that can process and store a little bit of stuff.
You can easily do the mentioned stuff in Flutter/Dart.
Check out Firebase Messaging for direct messages and SQLite to store information on user devices.
For saving data locally,
You can use SqlFlite, a plugin with the help of which you can easily store and manage your database.
For saving data on the backend, so that other users can also access it when necessary, like the one you mentioned in a comment (..food ordering app)..you can use Firebase
Firebase has all you need.
Link to firebase :- https://firebase.google.com/
When your data is stored on a cloud, you don't need to hard code anything, for example, about the food ordering app you mentioned, you can make use of variables, in which you can store the values. So that when the owner changes the price, it gets updated.

How do I create a charge on a Stripe customer from a connected account

I'm creating a type of ride-sharing application for iOS using Swift and Firebase Functions and would like to implement the following workflow:
Passenger requests ride from specific driver
Driver has 2 options
a. Driver accepts and the passengers card is charged
b. Driver declines and thats it
I've gone through pages and pages of Stripes documentation and Github to find the best example to go off, but can't seem to find one that fits what I'm after.
You can find an example here: https://stripe.com/docs/connect/collect-then-transfer-guide
There's also https://rocketrides.io/ which is a complete example, including code, of a ride sharing app.

Flutter/Dart: Communication between features in Clean Architecure

I'm new to flutter/dart and I'm trying to create a little application using a Clean Architecture design.
I read some blogs and several presentations of Uncle Bob's Clean Architecture before starting to code to get the most of it and now it's time to implement it.
I guess my application could be divided in 3 main features :
authentication
classes (get access to lessons/quizzes on specific subjects)
admin (manage user, create lessons etc..)
I started to implement the authentication feature following the clean pattern, that's to say with a domain, data and presentation layer and I guess I did it quite well. It's (almost) fully tested (I'm trying to do some TDD) and seems to work as I wanted.
Now comes the problem. I want to implement the classes feature. I wish it could be independent of the authentication but it's not the case... The classes feature need to get the authenticated user from the authentication feature. I searched a lot on the internet but I can't find how to implement Clean Architecture with multiple features that need to share some data.
So there are my 2 questions:
How to pass data from a feature to another ?
How to inject dependency in a feature that need data from another feature ? (I used get_it for the authentication feature and inject all dependencies in the main() method before building the app. Since it did not need any external data it worked well. Now it's seem not possible to do the same for the classes feature since it first needs to get some data from the authentication feature).
Thanks in advance for your answers.
Along with your 3 features you should add another called core and inside that folder you can add stuffs that need to be shared. It worked for me . Good luck
One option is if you instantiate classes after the user has already logged in, you can pass that data in as a constructor parameter.
More generally, Provider is probably the best dependency injection tool for flutter. If you "provide" the authentication class to the widget tree for the rest of the app, you can say at any point below it, Provider.of(context) to access it and any public field it has.
Hope you're still working on Flutter projects after that long time.
I've been fiddling around with Uncle Bob's Clean architecture, and I managed to implement it in Flutter few months ago.
It's perfect, it separates your code into components (modules if you're coming from a native Android development environment) and isolates your data sources, so if you want to change the way you make API requests for example, you'll only need to change the remote data source part in your app, and all your application should work as expected.
I have made a test app using Clean Architecture I just uploaded on github and added a humble readme that describes the basic architecture and components of the app, I'll work on written articles describing the code very soon.
For now you can access the repo from here
I'm trying to find an answer to this for some time now... My solution was to create some transformation methods in the model class. For example, I have an ProductModel in the home feature file (from where i can add products to the cart), and an ProductInOrderHistoryModel in the order history feature file. So in the ProductInOrderHistoryModel file I have a method called toProductModel that gets an instance of ProductInOrderHistoryModel and transform to a ProductModel. That way I can add a product to the cart directly from my history order page.
Probably it's not the best solution, and the Uncle Bom would be really mad at me. But it was how I manage to solve my problem...