Crossplatform product and information showing application - java

Want to create a simple app that runs locally whatever on PC or mobile devices, which shows various products information which would be loaded from local file system (documents, videos, htmls and so on). Furthermore it's able to configured later on.(change source directories, change button label.)
Please suggest what framework is well suited for developing this kind of application. Thanks.

Related

Getting user behavior on the Android Phone (App History, Browse History etc)

Is it possible to get the user behavior on the phone (for example Alpesh has an Android phone and he uses multiple apps, browser YouTube etc). Whatever he is doing on the phone I want to get all those things from behind (which apps he has installed, which app he opens and what he search on the phone, All these data I want to get programmatically so what all can be get in android).
For now I am aware that installed apps list can be get easily but I want to get usage history and what he do all on mobile.
This is not a code solution, but an answer to your question, so you can get start some where.
In my opinion your question title are asking about two things.
(part 1) Getting User Behavior on the Android Phone (part 2)(App History, Browse
History etc)
1- First part Getting User Behavior on the Android Phone:
There is a concept called context awareness. Short described; it is about gathering different information from the phone, like light sensor, motion sensor, sound, location or even user behavior etc. and depending on your app requirement and the gathered information:
You could send these information over cloud data store for statically usage
You could make your phone doing (behavior) different things depending on location, motion or what ever.
etc.
For context awareness it is an open area for pervasive computing research. And it is not just few lines of code to write, it is typically a complete solution depending on requirement. Example I have built a context awareness application to gather noise collected by phones from different locations for research purpose inspired from this framework, but I am pretty sure you can find other frameworks or even build your own, as I did in my case.
The mentioned framework has some examples.
2- The second part is about App History, Browse History etc.:
This is possible, but you still need to build a peace of software (App) to collect all these information (logs) from the phone. Hereafter you can make phone act on different conditions and/or again send it over a RESTful API over cloud service data store, there is no limit for it.
The problem is, there is no thing out of the box for your requirement. Even if you find frameworks you still need to research it and further work on it.
You can find different examples for your requirement, like to collect browser history, you can find SO question here:
Get browser history and search result in android
Or get list of installed application:
How to get a list of installed android applications and pick one to run
My point here is you need to solve small goals at a time and put your knowledge together at the end.
Both 1 and 2 can also be related to each other, depending on your achievement.
Conclusion
Make a goal to your project.
Define the main requirements and tasks of your project.
Research your options (Technology, Cost, Target Audience, What data I can or I should not collect, what is possible to collect, what is the limits, Privacy issues etc.).
Split your project in small assets and try to solve small problems/goals.
Finally you would be able to put the puzzles together and build your final application
but i want to get usage history and what he do all on mobile
This is not possible and shouldn't ever be possible. Each app is sandboxed by Android so apps cannot inspect what other apps are doing. Think about it, you wouldn't want apps to be able to intercept private information such as banking details.
Every app is isolated from the other ones. Unless you develop a system signed app, you will not be able to gather all that data.
What you could do is to develop your own Android Rom where you then develop your data collection the exact way you want. Then you need to distribute your rom, which is another story...

Same Sencha app for web and mobile

Query is : I have a current web application in place to provide me data in a list which is built using java and ui is built using jsp. I want to design a mobile app in Sencha to perform the same task and simultaneously want it in desktop using Sencha/ExtJs.
Now I am confused in following manner :
Do I need to create separate applications for web app and mobile app?
For the web app I need to load a separate set of files whereas for the mobile app it is different. If the application is one then can I do this?
Also, all the java files which I am using for the getting the list data, should be in same code base or separate?
Thanks in advance.
Sencha is a mobile app development framework based on HTML5 and query. So the controls and views are basically designed for mobile screens. But it does not stop you to display the same content on normal desktop browsers. Although what looks great on mobile may not look that good on a browser and vice versa.
Do I need to create separate applications for web app and mobile app?
Not really, everything can be same, views middleware and even backend. If you can design a UI that may look both on mobile and desktop then you are good.
For the web app I need to load a separate set of files whereas for the
mobile app it is different. If the application is one then can I do
this?
As I said above, except UI nothing should be a concern. If you want different look and feel for web and mobile then just create different HTML files for the said purposes. But you can use the same backend logic.
Also, all the java files which I am using for the getting the list
data, should be in same code base or separate?
Generally dynamic web applications fetches the data from backend servers using ajax/http service calls. You may manage the code in a single project or can divide it in logically smaller projects for better management. Maven should be a good choice to manage your projects.

Android Policy: External application files

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.

How do I connect my Desktop Java Application to an Existing GAE Datastore?

Currently I have a very basic desktop Java application in Eclipse that is meant to add entities to an existing project's datastore on Google App Engine. I have it all setup right now but since I am new to working with Google App Engine, I have no clue on how to get the application to send the Entities into the datastore of my existing project.
I tried looking this up online but most of what I found was for making java web apps. My goal is to have the application running as its own application, not through a browser.
So, what do I have to do to make the application connect to my GAE datastore? Is there some code I need to type, or perhaps some xml file I need to have within the project? I am just using the Java Eclipse plugin for Google App Engine.
Thanks for the help!
Based on the language of your question, I think you really need a big-picture sort of answer, rather than any specific code. Therefore:
You have a desktop application. This runs on some desktop computer.
You have a Google App Engine application with its data store. This runs in Google's data centers.
These are not the same computer. Therefore, they must communicate over the network in some fashion — that is the missing piece you're looking for.
Since GAE is designed around doing web applications, I recommend you think of this as a “web service” situation — that is, your desktop application makes HTTP requests to your GAE application. (The situation is simplified over the general case because you are writing both the client and the server.)
I recommend you read about designing simple web services and do whatever seems to fit your application.
One important warning: Unless your GAE application only ever has one user, you must not simply write a bridge that gives access to the data store over HTTP, because then anyone can make arbitrary changes to other people's data. As it is said for multiplayer game design: don't trust the client — that is, only accept network requests that make sense according to the rules of your application, and do not expect the client to enforce those rules. This is because anyone can make requests to your GAE application using something other than your desktop application, so you must assume you could receive arbitrary requests. This is the fundamental nature of the Internet.
For example, in the simple case of a multi-user application whose users do not interact with each other using the application, this means that every request that, say, updates a record, should only update a record which belongs to the logged-in user, not one of any other user.
For anyone that gets this problem in the future, I got an answer to it. I just tried experimenting around with the project settings and found it. So as it turns out, after you have installed the GAE Eclipse Plugin, you can just right click your project folder in the Package Explorer, go the Google sub menu, then click on App Engine Settings... .
From there, you need to check the Use Google App Engine checkbox, then in the deployment section, just fill in your project's Application ID. Your project's application ID can be found under the Application Settings tab of your project's online Google app engine dashboard. It is listed there as your Application Identifier.
Turns out that for me, I will need to find a different solution as you cannot integrate GAE with a desktop application that uses the Java Swing library. Bummer :/

File host for android App

I am trying to put the last couple of pieces of the puzzle together for this project for my mobile apps class, and have hit a bit of a wall. Basically this is an application for a fictional restaurant. The restaurant can put things into a menu stored on the web(currently on dropbox) and those items in the file will show up on the mobile app. The customer can then order items from the menu and the restaurant can view these in another file.
I have already finished the desktop application, and the majority of the mobile app. All I have left to do is to download the file from dropbox and use that info to update the variables. The problem is I am having trouble finding a way to download the file to the mobile app without having to log into dropbox every time.
I am new to having to use outside hosting like this, but I do know java pretty well. Any help would be greatly appreciated. Feel free to ask questions as well.

Categories

Resources