I wanted to know if there is any feature in Android where I could select a word from a third party application and send or share that word to my application. I could store that word in my application for further processing.
Implementing a "share" action is easiest if you are targeting API level 14+ (Android 4.0), as documented here: Adding an Easy Share Action.
If you need to target an earlier API level, the process is a bit more involved, as documented here: Receiving Content from Other Apps.
(Note that while I normally consider link-only answers on Stack Overflow to be a poor choice, the process of implementing "share" actions is somewhat involved and fully documented on the Android developer site. This is a case where simply pointing you at the documentation seems like the most appropriate thing to do.)
Here is Android copy/paste desciption: http://developer.android.com/guide/topics/text/copy-paste.html.
But I don't think there is way to modify 3rd-party app's context menu to add custom option like share, without changing this app's source code or changing Android platform (to add your own sharing mechanism to context menu).
Related
I have a development environment where web apps can be hosted. We generally use angular for our web apps so ionic should already be a pretty close match.
What I'm looking for is a way to be able to take a web application in angular and basically "generate" the ionic app out of it. We can assume that the app has been "modified" to correctly import the ionic module(s) and the necessary code.
Other than that, the site must remain functional on a desktop client (but I assume this is not an issue) and we want to "generate" the apk (or whatever target environment is required) based on the original web app.
Ideally the generation should be triggered by basically right clicking in a menu and selecting "Generate APK". This means I'm looking for programmatic access to whatever API cordova/ionic has.
My google-fu is letting me down though because all I can find though is command line references, I would prefer to stay away from commandline-level integration unless absolutely required. Other than that any search for API just brings up the javascript API they expose, not any API they might expose to programmatically generate artifacts like an APK.
UPDATE: I don't mind a downvote (the question is rather hard to phrase correctly) but at least state why so I can improve upon it.
Building a native APK in command line should be possible using the Android Gradle toolchain. You can go thru the process in the IDE and then just replace the files for your created app with the newly generated files and invoke gradle. For other OS's this becomes harder e.g. for iOS using xcodebuild is pretty hairy and if you add into it complexities like hosting Macs in the cloud (required for xcode) and the changes Apple makes all the time...
We implemented pretty much that (and a lot more) for Java at Codename One, we also support including Cordova plugins which might work for you. We also provide white label services for 3rd parties.
Google Play Developer Program Policies says:
An app downloaded from Google Play may not modify, replace or update
its own APK binary code using any method other than Google Play's
update mechanism.
I want to publish my application to Google Play. And I been planing to load my core SWF file dynamically, so game updates could be done without the need of going to Google Play market. An alternative Java implementation can achieve the same thing by downloading remote jar file.
In both cases I will have the next limitations:
I cannot modify my Manifest file.
I cannot extend the application permissions that I asked
My external code is bounded to application sand box(Just as the rest of my application)
Notice that my external code is not part of the APK files. It will be stored in application folder or in external storage(SD-Card). Its same place where external assets is stored.
Does this violatating Google policy? I am not sure what they meant by "APK binary code".
I am not a lawyer, and I don't play one on TV...
Your best course of action is to look at the reason they included that phrase in the first place. That text now exists in the Google Play policy because Facebook did the very same thing that you are describing in their application (providing an auto-update mechanism outside the Play Store) earlier this year, and Google threatened banning the application until this "feature" was removed (which it was, shortly thereafter).
The spirit of the law in this case is that Google does not want applications updating themselves without the user's consent outside of the Play Store...period. If your application does this, you can bet Google won't care how you are doing it and will likely remove the application when and if the feature is discovered. They won't care how closely executable code in an external SWF file resembles the internal classes of the APK.
Legal language like this is is intentionally vague so companies can apply it in any situation they see fit. Don't think you're being safe by splitting hairs with the terminology.
I am not a lawyer. I see this restriction as limiting only the apk binaries. There are many apps that have dynamic behavior changes, for example Google search where the search results algorithm is determined by dynamic code on the server, or facebook which loads new images texts, layouts and more.
I think that as long as you do not do anything bad for users using the swf changes, you should be ok.
The purpose of this clause, as I understand it, is to prevent apps from loading and using code that was not tested by Google using the normal process that tests apps when published. Google want to ensure that all code is scanned/tested by their bots.
I have a great idea for an Android app, but as I'm only familiar with php/js, I'm uncertain of which approach I should choose for creating it. The app will be based on a google map with a lot of position markers. There won't be any fancy animations or other heavy resource-demanding activities.
As I see it there are three different options:
Read up on Java and program the whole thing in Java
Create the map activity in Java as a mapview and then use webviews for the other activities (which can easily be scripted as html5 webpages.)
Script everything as a webapp (not really an option, as this is not a real mobile app imho.
I'm most keen on using no. 2 as I'm quite familiar with html/php/js/mysql. Have to read up on the html5 specifics, though. Questions:
I need access to GPS and camera hardware. Is that acheivable in webviews?
How complicated is it to pass variables between js in webview activities and java in other activities?
How big a difference in performance can I expect if I use option 1 vs option 2?
Other thoughts?
Kind regards,
Anders
You can choose number 2, but as we are talking about an android phone, you might want to get really accurate coordinates for your map, and you can only achieve this by accessing your phone GPS, through webviews the best you can get is the location trought the device internet IP adress, wich doesnt lead to a very accurate geo position.
The best choice is a 100% java application in my opinion.
1) Yes it's possible, but as commented it will be less accurate and probably slow.
2) Not complicated. Painful if you need loads of interaction between a webview and native app. Using a Javascript Interface that can be set up from the native app. You can basically inject javascript in a webview's html.
3) Heterogeneity of performance depending on device. Because your implementation will be based on the device's browser you can expect to get really sluggish behavior for older devices. Anything to do with HTML events (Dragging, Tabbing...) will have a knock on most devices, from my experience.
4) As #vodich comments there are other party frameworks. My benchmarking on PhoneGap and other js-based options is that they're a waste of time if you are looking at developing a professional app. I haven't developed on Adobe AIR but find a pain the need to be installing plugins to get native functionality (access to sensors, camera, etc) Mobile is all about fast, responsive behaviour. HDI is your finger, user is fast, so app needs to be fast.
EDIT: So hell yeah! Java FTW!
Albert.
4.Other toughts?
Yes, if you really want to make a great Android app, you should be using only Android and specific Android UI components, and give it a native look and feel. And regarding 1,2 yes it is possible, I would say not so complicated to just integrate them, but I think you'll eventually get in big problems.
Learn Java and write your application natively.
Webviews might allow you to use your php skills to present something to the user, but it's entirely one-way - you'll not be able to interact with what's inside.
The Android developer site offers fantastic documentation and jumping from PHP to Java isn't greatly difficult, though you'll need to get used to strict typing and "real" OOP.
Other thoughts? Don't go down the PhoneGap/Cross platform toolkit road - it might allow you to write applications for multiple platforms and using your current skills, but in the end you get a subpar app that doesn't feel right on either platform and doesn't fair well as future versions of iOS and Android are released.
I want to develop, as a part of my project, a web application that will enable users to edit, mix and apply effects to audio. I am aware of the J2EE development pattern, but am not sure where to start from. I want Audacity like functionality (actually, sox). Is there any Java API for audio editing/mixing and applying effects? If yes, can one write new effects? This would allow me to dynamically generate effects chains, based on the users' input. I searched the web, but it's all "learn to use audacity..." there. Also, is there any way such effects can be applied in (near) real time?
I found Soundation and Myna to be good apps that already do what I want( though Myna has no real time effects support), but they've both got the same old audio editing UI.
Thanks in advance!
Maybe you can look at this:
"Movie Masher going open source after Adobe supported it thus allowing integration to your site too." Maybe your solution is here : http://www.moviemasher.com/
You should check these options below:
Web Audio API
http://www.w3.org/TR/webaudio/
And also
WebPD:
https://github.com/sebpiq/WebPd
I have downloaded the Android source code and can see the java source files for the built-in applications (e.g. com.android.contacts.ContactsListActivity). I am trying to discover how these applications re-use one another via Intents etc. I would also like to see how the UI layouts are assembled for these applications as a design for my own apps.
About using Intents and Intent Filters, if you are less experienced, it will be best for you, if you start learning from a book, then try something in your own application, and only after that dive in the pre-installed apps, IMHO.
You can debug built-in applications, just like any other application, if you have the source. If you want to install other version of a built-in app, you must use the appropriate Intent Filters and change the package name, so that it's different than the original application's.
If you are using the source code, browsing through the internal classes should be helpful, so take a look here.
If you want to examine the UI layout of the built-in apps, the hierarchyviewer in your Android /tools/ folder is your best choice (my second favorite of the bunch, after traceview).
Write back, if something is unclear or doesn't work for you.
Good luck.