I have developed a chat application using the Agora RTM API and I want to show the "on typing" animation in my application when a user starts typing anything.
So far, I've looked everywhere but I couldn't find any single link or doc referencing to an article that states that agora provides the "on typing" event.
Does agora provides it? Or maybe some method is available which lets you send custom events?
If not then can we do it some other way (For instance, socket.io) and even if we do that way, would that be efficient?
Or should we re-develop our chat system using socket?
Currently Agora RTM SDK does not have the related api. However, there is a work around: When a user A starts typing, you can send a signal through RTM to other users B & C who he is chatting with. On B & C end, when they receive that signal, they can display "A is typing" animation. Similarly, when user A stops typing, you can send another signal to notify B & C.
https://github.com/RyanLarge13/Personal_Portfolio
This is a link to a profile project I have been creating on github where I implement agoraRTM sdk. Viewcode/Javascript/agoraRTM.js you will find code that implements a typing animation. It took me a while to figure it out, but it works well. It might not be the best for production purposes, but for small applications it could do the trick. Look for a showTyping() function. And everywhere I might call it to understand how it is all working.
Basically what I did was listen for the key down even on my form and call sendMessage() every time unless event.key = 'Enter' this sets up a signal defined as undefined to be sent each time a key is pressed and the showTyping() function handles weather or not your animation needs to be displayed. I am sure there are many better ways to write it, but I have yet to find someone who has done it in this scenario. Good luck!! I hope my code is of some type of help.
Related
Is it possible to hook or add a trigger for when Google assistant is activated upon saying "Hey Google"?
Here's a scenario, I have a smart light and I want it to give feedback when google assistant is triggered by changing it into red for few seconds upon invocation of the phrase "Hey Google".
Not really.
Since you tagged this "google-assistant-sdk", you can make a device that uses the SDK and triggers when it responds to the hotword. But if you're building your own device, you can use other software that triggers based on the hotword without using the SDK.
Other than that - no, you can't do this. You can only be notified when your own Action or your Smart Home device is specifically invoked.
I know that there are some restricted api's or code that are not allowed to be in your app when you submit it to the app store.
How do you know what they are? Is there a way to check your app before you submit it to ensure you have not used such api's?
It is probably better to avoid this problem at the design stage, than trying to fix it later, so I was wondering if there is any tool in Xcode, or document to determine this.
The way Apple intends for you to do this is to use XCode's Validation feature. When you're submitting an app, you build for achiving (or Archive from the XCode menu). Then, you open up Organizer to see the archive you just created. At this point, you can press the Validate button in Organizer. That will perform a validation, without actually submitting the app. It will tell you if you're using Private APIs. Depending on how you use them, it might identify what the violation is:
There's definitely ways that code can fool this validation step, and "get away" with using Private APIs until the reviewer looks at the bundle. But, as far as I know, those ways would all be intentional methods of hiding Private API usage, and it sounds like you're trying to discover accidental usage.
If you fail this Validation test, then you might want to use something like AppScanner, mentioned in alan duncan's answer. But, for completeness, I wanted to make sure people knew that this Validation step is available in XCode, and checking for Private API usage is one of the things it's doing before you submit (and have to wait a few days to be told what you did wrong). Also, even if you don't use the Validate button in Organizer, but just use Submit, the tool is performing a Validation for you. The only difference is whether the bundle actually gets uploaded to iTunes Connect.
If you stick to documented interfaces as suggested above, you're fine. The only issue is with third-party libraries whose implementation may be opaque to you.
There is a Mac app called AppScanner that scans from private API usage. I have no experience with it, though.
You will get more information on Apple approval process from
App Store Review Guidelines for iOS apps (You must be a registered iOS developer for accessing this data).
iOS Human Interface Guidlines.
get the private API list.
use class-dump to process the Mach-O file, and get the processed string.
use regex to get the interface, class, or method in the string.
match the API to private API list.
then GOT it~
I opened a porject to do this, but because the reason of my company, canceled. very sorry for this.
How can an application perform stuff when its actually closed like google+?
I notice that I got a notification from huddle chat from the google+ app for iOS. But google+ was actually not active, it was closed. Same situation with Whatsapp, I always get push messages both if the app is closed or active.
This kind of behaviour seems for me to be impossible to implement. From other questions I know that we cannot register some kind of background process. How do this apps handle that?
Can I still listen form something when my app is minimized?
When my app is just minimized but not closed I know that a certain method is called. Can I perform a repeating update task, e.g. read geo data?
The apps you mentioned use something called Push Notifications which work regardless of your App being open/in the background/closed. They are notifications sent to the device when an action happens and most of the processing is done on the Server (The notifications are not generated by the App itself. A server pushes the Notification on).
Apple has a fantastic section on Executing Code in the Background when your App is minimised which should provide most of the answers you need. It even has a dedicated section on explaining the Geo Data capture which should help you in this case.
Hi I've used the shockwave flash com object to embed my flash file. I have buttons you can click on within the flash movie. Is it possible to get flash to notify my winform app which button has been pressed. It's developed using actionscript3. I'm using the latest vb.Net.
You can either use FSCommand, or use ExternalInterface. The later is better, although it may be harder to understand at first because of the format it uses, although if you've already solved the CallFunction (or SendFunction?) method argument, it's the same.
There are documentation and a sample C# project in Adobe's site, but I don't know the exact URL.
EDIT: To catch FSCommand and ExternalInterface calls there are two events you can subscribe to.
Also, you could also use sockets (either binary or XML).
That's a very open question as there would be many ways to do this depending on how your website and winforms applications are setup.
My initial suggestion would be to have your flash movie call some client side javascript on the button clicks. The javascript could post to a .Net SOAP webservice for instance which logs the button interaction to an associated database. Then your winforms application could finally check the database for the presence of new button click records.
This is just one high level suggestion based on the very high level question asked. If there's more specific information available then this can be refined.
Brian.
I am developing an application where in i want to alert the user if he receives a message from a contact.
I have been struggling for the same yet haven't found any solution to this.
I also wanted to know if the sdk 3.0 allows access to the call history..
There is no access to SMS messages from the application sandbox, and there is no access to call logs from the application sandbox. You can file a feature request with Apple, but I doubt you will see changes to this any time soon. You will not be able to provide any functionality in your app that depends on this information.
Similar question here regarding call history:
Reading call history in iPhone OS
Short answer is, not possible. I do not believe this has changed in 3.0.