I'm trying to create an active reading application prototype for my course project in Android platform. I'm new to Android SDK, and I cannot figure out how to use WebView's native functions, because I need to use them to implement selecting / highlighting / copying texts using gestures. I saw that WebView has a function setSelection but it's private and I cannot use it.
But I think may be there is something that I miss. May be I need to use something else. Please, give me some suggestion, links, books where I can find useful information.
Related
I'm struggling to understand how am I meant to interact with the "graph" and "calculator" stuff from the mediapipe library. More specifically, I'd like to write some Android code that uses landmarks from the holistic (pose + hands in my case) solution, with the final goal of writing a flutter application that compiles both for Android and iOS.
I've managed to build a few of the sample apps (thanks to docker), and I think I roughly understand what the graphs do. However, I don't understand how to interact with them from within the code. The Hello World! for Android tutorial doesn't really explain this. There are examples that include this type of behaviour (e.g. here), but I don't really know where is all the required information coming from (e.g. how would I find out the right functions and string constants to get holistic landmarks?)
For example, in Python I could get data via something like holistic.process(image).pose_landmarks, and then compute e.g. position or angle of hips. And as far as I can see there are some similar Android API-s available, although not for all solutions - including holistic. So what if I don't want to wait for the API-s development, and want to use the graphs instead? That part is not so clear.
As a bonus, please do feel free to drop any links which further explain/document the "graph" and "calculator" stuff I've mentioned earlier, as I've not used anything like this before and find it a little difficult to google.
Thanks.
I've realised there are docs available: https://google.github.io/mediapipe/framework_concepts/framework_concepts.html
Not sure how I've missed this...
I'm using MuPDF to open and edit PDFs in my android application, but I need of some way to get the current page in a bitmap format.
I've been reading the code, but I've not succeed. Someone can help me?
We have a similar feature in our Android customizable magazine app, using muPDF: we generate page thumbnails in bitmap format.
This app is open source and available on Github. You can see there how we implemented this feature.
The MuPDF API is a C level one. It's certainly capable of doing what you want - see apps/mudraw.c for code that does this, or even doc/render.c.
In the example android viewer, we needed to be able to do some things from java. So, we wrapped up a small fraction of the API with jni and exposed that (see android/jni/mupdf.c). This does just enough for what we need, and nothing more.
If you want to get access to parts of the API that aren't exposed, (and it sounds to me like you do) then you'll have to wrap up that for yourself.
In an ideal world, we'd have it set up so that there was a direct mapping from java classes down to the underlying MuPDF API, but we haven't had the time/need to do that yet. If anyone out there is interested in doing such a thing, do get in touch...
I am about to decide which way to push our smartphone development.
I have read numerous articles about these technologies. I have also created test apps, but wanted to be 100% sure that I get this right.
I am not able to create EXACTLY the same look and feel like native app in PhoneGap because it runs in WebView Controler. And the webish look and feel is as far as I will get with this tech. correct?
(In the example app I have created with PG, the look might be similar, but there is a delay when i click on buttons and the animation is not so fluent as in native apps)
Latest Titanium seems to have changed its approach to WebView, to remedy that lack of look and feel of native apps. My question is (I havent tested this myself). Can I create EXACTLY the same look and feel of an native app with Titanium?
EXACTLY is the key word. I mean can a person tell a difference if app was created with Titanium? because I can definitely tell that app was created with PG.
Final goal is the UX, ppl sense this things, and on smartphones anything that is webish and is suppose to be appish is a bad UX i believe.
Thanks
Compared to PG Titanium is more Native like UI experience but it's kinda problematic for Android.Since it's originally intended for IOS.
Titanium for Android is pretty buggy and can mess you up and the thing that you have to come up with workarounds and if you cant find any then you are stuck.
But if you are okay with that and i can easily advise that Titanium is way to go though it's nearly native (not exactly) which close to exactly.I dont think an average user would understand Titanium .
2) yes, since titanium uses the original UI. your javascript code is wrapped to native Objective c code that creates native elements. only constraint is that your are not as flexible as with real native code written by yourself. but you can write native modules and add them to your projekt. so you're able to expand your project with custom UI too.
I need to create a graph for a page of an android app i am creating. I have looked everywhere on line, but i can't find a good tutorial for graphics and graphing? And i also don't want to use somebody else's code.
What methods am i supposed to use inorder to create a proper layout for lets say a line graph?
Can anybody recommend a tutorial for making a graph that is actually usefull?
Thank You in Advance
You can use the library chartdroid without having to worry about any copyright mess.
Otherwise go here for a tutorial that might help you write your own.
I implemented graphs a while back using the jQuery based JavaScript library flot to draw graphs on android in a webview. Graphs can be drawn using HTML and JavaScript files stored locally, or from the internet. You'll find some useful information to get you started here but i dont know of any tutorials, i think writing your own code from scratch to display graphs would be alot of work, i think you should consider using existing libraries!
I'm interested in incorporating the Android UI pattern called "Quick Action". Basically, it's a context menu that doesn't cover up the data that is being acted on. I'd like to implement this but I cannot find some sample code or an API to help me out.
Note this UI pattern is discussed in the YouTube video, http://www.youtube.com/watch?v=M1ZBjlCRfz0#t=15m20s.
Does anyone have an implementation of this or know what Google's standard is for adding this to an application?
Till the official Twitter app is open sourced by Google, you may want to take a look at this implementation:
http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/
Really easy to use and works great.
Interesting Question. Android uses this pattern in their Contacts-App. You can get the source using git:
git clone git://android.git.kernel.org/platform/packages/apps/Contacts.git
I did this and quickly grepped it, but I didn't get a conclusive result. I think that's done in "Contacts/src/com/android/contacts/ui/QuickContactWindow.java", but I am not completely sure.
I you google for QuickContact android, there are a lot of images that show exactly the kind of menu that you want, so it seems likely that it is indeed called QuickContact in that context.
Looking at the Documentation, I don't see any inherited classes that you could use to do this for something other than contacts.
So, a few starting points, but no solution from me ;-)
This open source project has the same look and feel for the quick actions popup as the twitter app:
http://github.com/ruqqq/WorldHeritageSite/tree/master/src/sg/ruqqq/WHSFinder
It helps to download the whole project because you need a number of drawables, images, and other resources from that project.
The main demo class is called WHSListActivity.java. The other classes you need is QuickActionWindow.java, and QuickActionItem.java.
After that, it's really easy and works great. I use it for my apps.