Controlling Mobile Devices Camera On A Mobile Site - java

We are developing a mobile web application which user's can reach via their mobile phones' browser. (It's not a mobile phone application, it's a web site for mobile phones) .
We want to get (upload) pictures directly from user's telephone's camera. How we can control user's camera ? I know it's not possible for mobile web site. But for example can we use Java for this? Or can we develop small plugins for mobile phones and trigger it, when user click on Capture a Photo link ?
Can you give any advices us please? Thanks !
(except this answer on this question :
can users take pictures and videos before and then select the file via
a browser dialog (if that is supported by mobile browsers) and select
those files to be uploaded)
Q&A's from comments :
1) Well what phone operating systems are you targeting? iOS, for example, has no ability to run Java.
Actually, we are targetting all OS.

iOS has no ability to access the camera from a website. You cannot load Java on iOS at all, either.
Android had the ability to access the camera from HTML demoed a while back, but I can't find anyplace noting that it actually made it into a release.
Blackberry as far as I know also has no such ability to access the camera from a website.
If you wish to use Java, you can develop an actual app for Android or Blackberry. iOS apps are written in Objective C.
However, using PhoneGap you can write an app in HTML5 & Javascript and it will create a native iOS (for 3GS or later) or Android app capable of accessing the camera.

Related

Android NSFileProviderExtension - like extension

I have to build an app for both android and ios. Among other things, the app provides cloud storage. Now, for ios I have implemented NSFileProviderExtension without providing a ui (basically letting the system handle it), and I can access and manage the cloud by entering the files app, selecting my app and then doing whatever needs to be done.
Now, I searched far and wide for an equivalent for this on android. I have a samsung phone, and when I enter the files app, under the cloud section I can see samsung cloud drive, google drive etc. , and I can manage files there just like I can in my app. But I have no idea what kind of provider I need to implement to achieve this. I have implemented DocumentsProvider, as it seemed to be the most likely candidate, but that doesn't appear in the files app.
I had the same question. My document provider is available in the stock Google "Files" file manager, and all non Samsung apps showing the system file picker but not in "My Files" on Samsung Galaxy phones.
The easiest way to check if your Document Manager working is to attach a file to Gmail (surely on an Android device with your provider installed).
So, hey Samsung! We need you adhering to the Android SAF too a.s.a.p.!

Codenameone Facebook share through the Simulator

Helle everyone,
I'm wondering if there is a possible way to share a text On my Facebook profile, even while using the codenameone simulator.
I did my researchs but all what I find is the share using the "ShareButton" component which only works when you launch the app with an actual device.
Greetings.
The share button doesn't really know about facebook. It places the text into a special OS hook which offers you venues where to share that data. That's great because that means it can work for other social networks seamlessly and it uses the native OS to do the posting. Zero setup.
Desktops don't have an API like that. If you want to explicitly share to facebook you can just do something like this which will launch the browser:
Display.getInstance().execute("https://www.facebook.com/sharer/sharer.php?u=" + Util.encodeUrl(textToShare));

How can I convert my gwt app thats hosted on app-engine into a installable mobile app?

Currently my app is created in Eclipse using GWT and Coded in Java. I have the app hosted on app-engine and all my data is saved in the browser using html5 storage. I want to have this app installable on an iPhone so I included "\<\meta name="apple-mobile-web-app-capable" content="yes" />\ " in my html file, and even included a custom icon etc for the iPhone.
Upon installing the app on my iPhone, everything works fine online but offline the app won't even load. I've been reading about manifests and yaml's but I cant get a clear picture of how to set my app up mobile, and have it save data locally on the phone (app cache).
Please help!
You need to start reading about HTML offline apps for iPhone. There are a lot of resources about this on the net, for example this and this.
mgwt - mobile GWT has a HTML5 Manifest Linker, see: http://code.google.com/p/mgwt/wiki/HTML5Manifest
This can be easily used to store your app locally.
Also stake a look at the mgwt settings class: http://code.google.com/p/mgwt/source/browse/src/main/java/com/googlecode/mgwt/ui/client/MGWTSettings.java
There you can find all the properties described in the tutorials Peter Knego described.

Start video chat without user interaction - Android

I am a total noob on this site so please be patient. I am trying to initiate a Video Chat/Call without any user interaction or confirmation.
I found this:
Uri imUri = new Uri.Builder().scheme("xmpp").authority("gtalk").query("call;type=video").appendPath(email).build();
Intent IM = new Intent(Intent.ACTION_SENDTO);
IM.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
IM.setData(imUri);
startActivity(IM);
from here: https://stackoverflow.com/a/8024626/1184256
This gets me very close, but I then have to click an "Invite" button to continue. Is there a way I can emulate a KeyEvent to click this button or skip the popup window entirely with root access?
I don't even necessarily need to use Google Video Chat if someone has found a different way to initiate a Video call to a certain contact via Skype, Vtok,Fringe, ooVoo or whatever without user interaction.
I have also found OpenTok which after building a sample server and client on my site I have found that it works on desktop browsers but not in Android browsers. Please don't steal/use my apiKey or sessionId.
I have also found libjingle which will allow me to use Google Talk's peer-to-peer voice and video chat. I am thinking this will be the way to go, but it means building a video chat app from the ground up and wrapping it around these libraries... yeah. Anybody done this already?
I know this is essentially a duplicate thread, but I have searched for days and days for an answer and this is the closest I have come to getting this done.
BTW the reason I need this without user interaction is for a Telepresence robot, thus there won't be anybody actually holding/using the phone when I initiate this call.
Please HELP!
You'd have to actually change the built in android app (Talk?) that receives this intent to automatically accept these types of intents. There's no way to do it from a standalone app for security reasons.
I don't think that live video streaming will work natively in Android Browsers, since they dont support WebRTC (Yet) and do not support flash. With that said, OpenTok has an Android SDK in beta that lets you stream live video from android phone to browser, another android phone, or even an iOS phone as long as everyone is connected to the same session. Like you said, this does not work over the browser and you would have to build a native app.

Blackberry apps: Native or webapps?

I have read the Blackberry documentation and it is possible to push a notification from a webapp. I am planning to create a Blackberry application that compliments to our webapps. But I am still left in the middle whether to develop a webapp or native Blackberry app. I have also look at how a webapp runs on Blackberry browser and it looks smooth.
From your experience does the native app offer something that the webapp doesn't? Bonus question, is Facebook and Twitter app on Blackberry a native app or a webapp? If it is a webapp, is it possible to make a launcher for the application on Blackberry?
Thanks for your help.
Facebook and Twitter are on both types. The web apps are just a website formatted for a small screen so anything you do in say asp.net will show on a blackberry web app if you program it to. The native app just feels like part of my phone. You can save data on the phone so if your app is a relating to news or something that would be stored I can read it offline or slow connectivity (camping, rural areas, etc...). It can also interact with other feature that blackberry offers such as contacts, email, media player, etc...
If you would like to save anything for the user to view without pinging the internet a native app would be preferred.
It's possible to create a launcher but I haven't created one so I'm not sure of the details. I would assume it's just an app that opens the browser to your URL.
One more thing about a web app would be if your application stores users settings (twitter auth key, etc...) they would need to be stored on your server and not the users phone adding more expense and maintenance.
Good Luck.
Widget is not supported for device software less than 5 , you combine both of web and native development by using browser field ,but you need to consider that its Java Script support is poor
Let's not forget that the blackberry browser is really bad as well. I don't know any BB users who would want to use a web application because of that.
When it comes to native apps, you have some choice however and you are not restricted to java (depending on which OS version you want to target). In addition to the mentioned Java, you can use Widget (link for resources) that behaves like a native app, but can be accessed like a web app.
I was just at innoTech and they had a whole session on this topic. But instead of recaping it let me just post the funny video they showed at the end which sums it all up.
Mobile Dev Rap Battle: Native Code vs. Web Apps

Categories