QuickBlox add server logic - quickblox

Is it possible to add server logic in QuickBlox? For example, I want to send a message to all existing chat rooms in my app every 20 - 30 seconds. The only way I see now is to place my program on another server, that will register as another user and connect to all existing rooms, sending messages. Is there any other way? Thanks.

There is no way to upload custom code to QuickBlox server now,
As a workaround - write simple script (in python, ruby) which will do that, upload it to some server (or home PC), run it on CRON. Does it work for you?

Related

How to set up a server for my app

At the moment I am making an app. I am relatively new but have experience with a lot of different languages like PHP and SQL. My app needs to communicate with a server to post/retrieve data for everyone to see. People also need to be able to login and register. Right now I am using parse because it gives a lot of the requirements in an easy package but parse is retiring soon and I have no experience with setting up my own server.
I was thinking of making my own 'server' from an old computer but not use parse because it will no longer support push notification. Then of course the app needs to communicate with this server. I started looking online and found a lot of terms but not a real clear explanation on how to proceed. I need it to be able to communicate with iOS and Android. Furthermore I was wondering how to execute a script on the server itself. I want to do something with time, once someone uploads something it needs to disappear after 48 hours, but of course it also needs to do this even if the app isn't active on a smartphone
Can anyone tell me how I need to proceed, what to use and where i can find useful info.
My plan for now is creating my own server with something like MongoDB but then i still need something called a backend and different SDK's to communicate with the apps. Maybe its possible to install parse on my own server and add something so i can still use Push and run a script on the server itself.
All help would be very much App-reciated ;)!
The reason of a backend service or framework is to let developer focus on front end app development. Maybe you can check other options like firebase, meoter, or even leancloud. Don't be hurry jump to the decision to make your own backend.
Parse Server is already supporting Push Notifications. I think should keep using Parse. It will become the best framework for backend and API development in a short time. You can also use services like https://www.back4app.com that helps you in all process of configuration of your server.
Do you mean by create your own server running a personal derver pr you mean create your own back end application?

How to write a program to automatically download a file from email

I have an email account (like gmail or something) that gets a daily email with a file attached to it that has some data in it. Is there a way to have a program check the email everyday, say at midnight or something, download that file, and store the contents into a SQL database?
I'm familiar with Java, JavaScript, PHP, HTML, and Python. Is there a way to do this using what I already know, or would it require some other technology?
I like to use Python for this kind of tasks, it's fast and minimalistic.
You can access mails using POP3 or IMAP protocol. Python contains modules to work with them: poplib and imaplib. POP3 is simpler, I advice to use it if you need just download mails and delete them after that.
IMAP is more advanced. Each message has it's own UID, that identifies messages. New messages have greater UID then old one, so every time you run downloading, you just need to store somewhere (in file, database) the greatest UID of messages you processed and use it to find newer messages when you will run downloading next time. See here example of working with IMAP from Python.
To schedule downloading each X hours, you can choose from these options:
Write application that download new messages, then sleep using sleep() function in infinite loop.
Write application that just download new messages and finish its work. Schedule its runs externally using Cron tool.
I developed such a solution in C# with Pop3client, don't know if it is the best though.
Here is an example doing it in Java:
pop3-client tutorial

Play framework, limit an action to be done once

I have a button follow on my website, you can toggle it on or off as much as you want.
Each time it sends a notification mail to the followed people. I don't want him to be spammed.
So I want Play Framework not to send this mail twice (twice in a day, for example)
Is there any built-in mechanism or any library of play framework to do it?
Thanks !
EDIT :
Preferably an external service, like Mailjet or mailchimp.
Just save notification to DB instead of sending it immediately - so user can decide how often he want's to get it.
Next use Akka scheduler for sending many notifications in single emails from time to time.

Sending files from server via email within app

I'm a little lost on how to achieve this problem.
We have a list of files brought into a app linking to the files stored on a remote server. Currently when the file is selected in the list, it opens up within safari which is fine. Once the file loads in safari you do have the option for forward from there, but my client wants to be able to it from within the app, rather than opening in safari.
We are using query mobile and phone gap to create the app. I was thinking about just creating a new mail, with a link to the file embedded in to the email.
Any ideas or help is welcome on this.
You may be much better off if you just have the mobile app make an Ajax call to the server to trigger the sending of the email and attachments? That would really reduce the complexity off the mobile app and decouple you from any issues that might occur based on different hardware or OS's.
So when the user is viewing the list of files, maybe offer them two buttons. View and Send. View would open in Safari as intended, Send would make a call to the server to do the heavy work.
http://yourserver.com/sendFilesToRecipient?file_id=XX&email_address=target#email.com
Then the server loads the correct file and sends it out, maybe responding the client app with a success/failure message.
Would that type of design solve the issue?
I have created a link:
Open File<br/>Email File
Which has seemed to do the job, opens up the default email client, with the set values in them.

Using URL Link To Send Params To VB.NET App

What I am looking for is using a URL link such as "MyApp://param=value" or "MyApp://mysite.com/?params=value" to open my application and read the params using GET. I do not want to use the click once method to do this, because I want the application to load up without the starting up bar at the topleft. I know it could be done but I could not find anywhere to do it at. You can see an example used over at curse.com where they use a link like "curse://curse.com/?etc=etc" to launch their app and download the item. Another example is with Ventrilo where you can use "ventrillo://etc" links to start vent and connect to a server. The reason I want this is because I plan to use it to give my customers a way to give their clients a way to connect to their servers with my software using a simple URL.
Since the question is about VB.NET, I’m assuming you are targeting Windows.
In that case, this can be done by registering a custom URL handler via the Windows registry.
Other operating systems have different ways of achieving this.