Read my own emails using Microsoft Graph API in backend using java - java

I want to read and send emails using my own email Id.
I have created and app on portal.azure.com with Client ID and Secret ID/Value.
I want my java app to run in the backend and read emails and also send emails using Microsoft Graph API/SDKS.
I am struggling to get it done since two weeks, I am not getting any solution.
I also put another stackoverflow question but no one replied on it
Read and write Email using Microsoft Graph API Java
I can only provide delegated permissions on the app and not Application permissions which requires admin consent.

Related

How to implement multi-user app in Java/Android?

I wanted to write android applications in Java. Applications should work like this : people will be register and login in app. After login user can choose user with they want to co-operate, after that server will give this users the same set of data and each of users can chose some data and sent to server. After that server should chose part of the common data that users chosen before and sent this part again to every user.
I don't know how to implement this. I was thinking about socket or websocket but, i have not idea how it should be look.
Could you give me some advice ?
you would need an server. Parse Server or Firebase would meet your requirement, i prefer parse as its open source. You can rent it from amazon web services or host it free at back4app or host on your own. You can send queries , receive and set how your server collects it and works with it your you can do it manually.

Encrypting/hiding portions of the source code

I've made a simple mailing app that takes in email credentials and uses it to send emails of certain kinds to selected addresses. Problem is, I've had to input the credentials right into the code, so anyone who uses dex2jar can get the source code and get the email used for forwarding and easily make the app obsolete.
I imagine I'm not the only one facing this issue, so what are some ways to make my code secure?
No matter how good of a technique you use to hide the credentials, if it's in the code then it can always be found.
Instead of hard coding them in, you could perhaps let the user specify them when he starts the app? If that can't be avoided you could instead have a remote service that will do the sending and forward your request to that.
You can not both connect to an e-mail account and keep those same users out of said e-mail account. Consider using a hosted server as part of the project to securely connect to the e-mail account from the server level and process these e-mails remotely.

Is it secure to build android app that works with PHP API on browser?

I'm learning to build android apps using java & android studio.
For my app i need internet connection and a server side database, I'm already php developer so i tought to build a PHP web API and by json, send and recieve data from specific URL.
For example, any user that will register inside my app, i can send his data to:
(via POST or GET method.)
example.com/api/user_register.php
Is it secure? How can i get data and send to an existing domain in java?
I'm looking for something similliar to file_get_content() or CURL in PHP.
Also i need to build something like push notifications..
Creating an web API to access a MySQL Database for Android is expected as there is no direct connection to the database possible on Android.
I've done something similar with one of my own apps. How secure it is depends on how you make it and where your PHP API is. I.e. is the data being sent to/from HTTP or HTTPS. In my own app, I encrypt the post data on the device, post it to my PHP API which decrypts and processes the request.
It then builds a response and json_encodes it, which is then encrypted and sent back to the device, where the device decrypts it and processes the JSON result. All of this is also done over HTTPS so hopefully, its fairly secure.

Retrieve Outlook Meeting Room Locations using JAVA

I am trying to send an Outlook meeting invite using JAVA. I have managed to send the invite using JAVA mail API as discussed in this post
How to send an iCal meeting request using Java Mail, and receive the response
The problem is that here Location of the Meeting Room is hard-coded.
"LOCATION:Conference room\n"
I need to retrieve the available rooms from the Outlook and then select one of these rooms as my meeting room location.
You may find EWS (Exchange Web Services) helpful. See EWS Managed API, EWS, and web services in Exchange for more information.
Also you may try to automate Outlook. See How to automate Outlook from another program.

Storing / Retrieving App Data Online using Android

I am new to Java and Android. I am just beginning work on an app that will save information to a server that someone else from within the same company can retrieve using the same app from a different android device. I know how to simply store data on a server using simple php scripts but this is a bit more complex and involves one user writing information to the server, while another user can see / download it. Within a company there would be multiple users who have acceess to this data. So my question would be, whats the best way to implement a company-wide database that ONLY members of the same company can have access to? Sorry if this seems obvious to some of you. I am just getting started and I have 7 books on android programming and none of them describe how to do quite what I am trying to do.
To do this you need to use Android network services to access data. In other words to retrieve a networked database information your device will connect to your service with a specified URL and arguments. In turn, the service will reply with the required data, say may be in XML format. All your app needs to do is parse the XMl and display the date as desired.
Same thing applies to putting data into the server, in this case however the data will be sent as arguments to the network service URL and the service will handle the persistence to a database.
My advise is to do a Google search of the keyword "Android Network Services".

Categories