Android PowerPoint remote - java

I want to write an Android remote to PowerPoint. It means we can control the slides by using phone.
Where can I start from? Give me some hints please. I've just read the Android basics.

I think RemoteDroid will work pretty well for this purpose and it's a fairly complicated job to replicate.
http://remotedroid.net/

what I did was:
I use a .NET #C Client on the Windows Side and
A Java Servlet and XMLRPC Web App running on a Tomcat ("in the middle").
And of course a Android Client as the controler
My C# Client creates a persistent HTTP Connection to a Servlet. And the Android App is sending short HTTP GET Requests to the TomCat, stuff like goto3 or next (the request has also a kind of a Presentation ID as parameter). The Comands from the Android Device are dispatched to the previously opened Persistent HTTP Connection from the .NET Client.
In The .NET Client I use a local installed PowerPoint as an ActiveX/OLE Control. You can do pretty much everything programatically in over c# that is possible to do "by hand". Open a .ppt(x), start the SlideShow, control the Slideshow and of course it is also possible to edit the slides content. You can find a lot of examples by googling for Microsoft.Office.Interop.PowerPoint
I pair the .NET Client with the Android Phone by using a Generated QR Code. That QR Code I show in a generated PowerPoint Slide. All Work around the QR Code (C# and Android) is done by using code from the ZXing (Zebra Crossing) Project.
You can try it out, Instructions and Downloads are here. The App is called FonPrompt and can be found in Google Play.

Related

Mobile Sound Tracker Application Architecture

I have an assignment, but I can't seem to get my head around it. I've been tasked to create a mobile app on Android Studio using the microphone sensor to record audio (Parameters: Duration & frequency). The data/sample is then stored locally, perhaps using SQLite to store the id, date, time, location and sample. Let's say after 10 samples (this is where it starts to get confusing for me), the samples are bundled up and sent to the communication server which I believe OkHttp client is used in this case. The data gets sent to a local server (Apache?) and a website (Springboot) is used to retrieve the information and show the samples on Google Maps.
https://imgur.com/a/3cXzCQl
Link to application architecture is above. I have no doubt it is wrong, but would love some insight on it please. Also, I very new to all of this so I'm sure there are a lot of gaps in my message above. If you have any questions please feel free to ask!
Technologies I've been recommended to use:
Local Server: Apache
Website: SpringBoot
Communication tool: OkHttp
Android application: Android Studio

Using Android license verification serverside

I've been thinking about implementing of Google Play licence check on my Java server. Is that even possible? I haven't been able to find anything on this matter. I know Android LVL is written in Java, but I'm not sure if it can run outside of dalvik machine. Is there a posibillty of checking Google account name or some kind of device ID against Google Play to check whether an app has been bought in a Java server application?
The answer above is simply verifying response data (returned by google LVL on android device) on app server.
I think the question is asking if it's possible to call some google web API to do Google Play license check on its app server. But it seems like google doesn't open the web API interface to its licensing server, all LVL calls need to be done using its google play service framework on android device.
Yes it's possible, the java sources are out there and could be downloaded (and afaik, the jar is not dexed until you compile your application) - see some kind of manual over there at developers.android.com to read about how to get the sources
I've heard about a PHP project trying to attempt it, but using java should be no problem at all - you do the same things on the server, the manuals state for the client - and let the client sends the encrypted response from the market directly to the server via SSL (e.g. byte[] post)
You should get a UID from ResponseData.userId
Read some more in this blog post and more info and links in another SO answer

Using iOS iPad2 to Connect and Logon to Java Server Running HTTP Service

I am writing an iOS 5.1.1 app for the iPad2 using Xcode 4.4.1. I want to be able to locate a local http server running on Java.
Once I am able to connect to the http server, all I need to communicate with it is the url including the port.
My questions:
1) Should I use Bonjour or a DNS Server running on the http server to discover the http server itself?
2) I need to authenticate the iPad2 user with name and password to work with the http server once I discover it.
I need some help understanding how I would go about accomplishing these two steps including source code if available for the iOS 5 and Xcode 4.4.1.
1) Bonjour is pretty easy to tie in with Java apps. If you're particularly masochistic you can write your own Java-based mDNS (Bonjour) responders (I've done it, it's not rocket science), but the quickest way to get going is to use jMDNS in your http server to advertise its existence. I won't copy & paste the code samples but they suffice for most applications.
On the iOS side, NSNetService is your friend. Fundamentally it involves starting a responder in the background to look for services (i.e. your Java app), then calling a delegate when something appears/disappears:
id delegateObject; // Assume this exists.
NSNetServiceBrowser *serviceBrowser;
serviceBrowser = [[NSNetServiceBrowser alloc] init];
[serviceBrowser setDelegate:delegateObject];
[serviceBrowser searchForServicesOfType:#"_http._tcp" inDomain:#""];
There's a guide that explains it all. The protocol hasn't changed for 10+ years and you count on all modern iOS/OS X versions supporting it. The jMDNS library is pretty well battle-tested at this stage, too.
You might consider creating your own service type if you don't want it to be visible to other apps that search for _http._tcp., although this is just a cosmetic thing.
2) The simplest thing that'd work would be HTTP basic auth; you didn't say what kind of authentication your app supports or how you make HTTP requests on the client side, but this is pretty well covered already.

Syncing Android and Server

I don't know what this is called, but it is something like syncing android application and a Web server. Examples are RSS Feeds and Weather Forecast
Does anyone know the concept behind developing application? I mean how do you sync the Android phone with a web server. Is there any programming needed in the server side and the client side(Android)
Are there any programming books that tackles this subject? Thanks.
What should I do to connect to Server from eclipse - Android?
check the whole conversation here
The server should make the data available in a meaningfull parsable format (for machines). For example RSS/XML feeds, etc. Your application should poll frequently and updates the status/screen.

Make PHP execute and communicate with a Java application on a web server

I have a java application that will take the image as an input and output another image. I have a website with a popular host (PHP+MYSQL Hosting). I want to create a page on the website with PHP with a form where a user can upload an image which will then pass the image onto the Java application.
What I am planning on doing is when then user uploads the image, it gets stored in a folder on the web server. I will then call the java app on the server passing the url of the image as an argument and then the java app will output another image, let’s say, to a result folder. The PHP page after the execution will then display the result image on the browser.
Now my questions are:
Is it possible to execute java apps on popular webhosts (for example mine is WebHostingBuzz.com)?
The java app is fairly heavy as it does a lot of image processing. Should I offload the java app to another web server? If yes, are there any services that will run my java app?
(Optional) It’s a demo of my java app and I don’t want to store the images people upload. Is there a way where I can directly pass the uploaded image to the java app and output the image generated directly instead of storing it on the web server? I would prefer this because, if the image is big, I can make PHP stop the execution after a timeout.
How do I communicate with the java app from PHP for info on its execution, for example When PHP calls the java app, the page has to wait till the app finishes processing? I want the java app to send a response to the PHP page saying that the processing is completed and the page is redirected or refreshed accordingly.
I hope you get the idea, please suggest the technologies that I can use to implement this and also if you have a better idea, post it!
Thanks!
Now my questions are: Is it possible to execute java apps on popular webhosts (for example mine is WebHostingBuzz.com)?
It's technically possible. But the hosting has to install JRE at the host and give the PHP user sufficient OS-level and filesystem-level permissions. So you're really dependent on the hosting whether they provide this opportunity. Best is to just contact their support team and ask it.
If it is supported, you could just use shell_exec().
$result = shell_exec("java -jar /path/to/imageprocessor.jar " + $imagepath);
if ($result) {
// Shell execution succeed.
} else {
// Shell execution failed.
}
For asynchronous communication / background processing, the client has to fire an ajaxical request.
If it is not supported, consider porting Java to PHP. The GD image library has pretty a lot of functions which may be of use.
Google App Engine allows to host Java (and Python) web applications. The SDK and the basic account is free of charges. With the SDK, you could develop and test the application locally and then simply deploy to App Engine (NetBeans and Eclipse plugins are available).
Then the PHP app could send the data in a HTTP POST to the Google App Engine application and get the result in the response data.
Or the data is stored first in a database blob and a processing job is put in a task queue (a 'message queue'). This has the advantage that the PHP client request will return immediately after the data has been POSTed. Then, the PHP application could poll for the result data while Google App Engine processes the image. The PHP side would be more responsive this way.
Wouldn't it be easier to make your java app a web app, that PHP could call via an url in wich he would put the url of the image so java can download it?
like http://yourjavaserver/imageprocessing?imgurl=IMAGE_URL
and the java servlet would reply with the image file itlsef.
You can look for "java hosting" on google, to find a host for this, but it's more expensive than PHP hosting. Maybe the best choice would be to get a dedicated server which could host both PHP and java applications...
I think your best bet here is with your java app running as cron(or a deamon) that can load the file details from the database. This will require a (one or more) page-refresh on the users part after the generation is complete, at which point your script can recall the image from the database/filesystem.
I do not think you will be able to do this in real-time due to timeout restrictions on the PHP webpage. However, you could write a java applet that can take the file and process it before sending it to the server (or depending on how you intend to use it, perhaps you do not need to upload it after the transformation?).

Categories