I am new to android programming. I am designing an android app for my college. I have made a webview that loads up a webpage named events.html. how can i make it such that whenever new events are added to the webpage, a notification in the system bar of the app will appear about that events if the user is connected to the internet. Please help me. Many thanks in advance.
Store the HTML file in your app's database/shared preference/file (in Java object form will be more useful for later comparison).
Periodically check for a new file (at some interval), temporarily storing the result. This will likely be in an Android Service
Compare the temporary file to the one you had stored previously.
If the two files are different, then use NotificationManager to create a new notification
Without all of this, it looks like you would need to have a server with push notifications (or Google Cloud Messaging) available that pushes notifications to your college's app users whenever that is a new event. This is an expensive (more demanding option compared to above).
Related
Totally new to Azure and the services it offers, I face many questions about the "Speech" service and the bots that can be created on the Microsoft platform. Currently developing an Android mobile application I'd like to realize the following behavior:
The user records a voice file from the app (using MediaRecorder), this part is ok
Once the recording is finished, this file is sent to Azure function(via an HTTP POST).
The file is translated into Text
The text is sent (step 7) to the bot which reacts accordingly by executing an HTTP request.
Scheme of the process I explained
First of all I wanted to know if this scenario is possible or if I have to use the Speech SDK on my Android application.
Moreover if this scenario is possible, how do I send the text to the chatbot? I've checked this link but it doesn't seem very relevant to me.
NB: My bot has been completely created using "Bot Framework Composer" for the moment, no code has been written, I just wanted to know if my scenario is plausible and above all possible.
Go through your steps, and I think it can be implemented. If you want to send text to bot, you can refer to this request.
Before that, you may need to start a conversation and get the conversationId.
I need to fetch live data in Android App from a NodeJS/MongoDB API. For exemple, I have a list of tasks on the Android screen (fetched from the API). Then one of this documents (tasks) have changed in the MongoDB, the Android screen needs to update the data on the screen once this data have been changed on the server.
Can anyone help with some workflow? I am not looking for code. Ideias (Arquitecture/Libs) only.
Thanks in advance!
You can do this in two way.
Use silent push notification.
When data change in server then server send push notification
to app.
App receive notification Then app get call API to update Data.
Your app sends a request(s) to server periodically (After some
interval of time)
Reference link for same: link1, link2
I have a requirement, wherein I have 4 android apps, which are sending notifications to a user, at a fixed time of the day. A user could have one, or more of these apps installed on his phone.
I want only one of the apps(any one) to show this notification to the user, because multiple apps popping up notifications is a bad user experience.
For this I need to share some data across the apps.
I was thinking of a mutex/lock based approach, the problem is, where do I store it?
Problems:
Shared Prefs: I don't know which app wrote the data first, and from which app's context should I read.
SQLite: Same Problem as above and app uninstalls need to be handled and SD card might be missing
Server: Mostly offline app, dont want to add internet permission just for this
I see files at a common location as the only way to store this information.
Is there any better way
As you said that the easiest ways is with file,
I did this before and i too wasn't able to find more easy way.
when you show the notification first time then Just make a new file anywhere which can be common for any app and then check if file is exist.
if it exist then don't show the notification and if not then show and make file again, also remember to delete the file from any of your app when day changed, use AlarmManager for this.
hope it helps.
I want to setup One to one Video with voice call using Open TokBox. I want to setup it in Android and Server Side is dotNET. I found sample project and it is working fine but it is like multi broadcasting. And It finds if any user is online.
Rather than this, I want that One user call another user from Android Device. And if that another user is online then he gets notification about call else it shows offline user. This can happen with many users same way.
Its like skype but only one to one. So, as I know I will need to create new session id at dotNET server side.
Please help me to perform this task perfectly.
Is it possible to edit contents of an android app through web site? For example, contents in a page (videos, texts) & layouts (location, size, colours).
Yes it is possible using like Client and Server approach where your Android app works like Client and your Website is like Server.
You can first download a data and store that data into SQlite and whenever you open a application every time app request to Server asking for New data.
You an achieve this using Sync Date & Time. Like whenever a website update there data then change Date & Time and when your request New data will check Date & Time. If Date & Time change then your app show update data message or New data available message. In this way you can achieved.
I think its not possible directly but sounds like you are about to use wrong pattern. The right pattern is a client-server one, where android app is a client and website with REST or any other custom API is a server. Application should request data from server and display it in a way you set up. So you will edit any data on a server and your app will receive changes on request.
I am not sure what you are trying to do but with any UI field, you can code it programmatically. So for instance, you have a button and want to be able to change the text on it, you can technically do this via a website:
You will need some sort of database management system that will control the content of the app. The app will just have to call the database to get all the data/fields it needs. You will pretty much be making a content management system for your app.