I am trying to list some items in a way very similar to Play Store, currently I am using a Webview and managed to do something similar looking, but performance wise it is very slow.
I'm wondering if Play Store also uses a Webview and gets data from a mobile website like I did, or Play Store uses some sort of widget/view/component to achieve this task, possibly natively. It seems on slow or zero internet connection, the application frames+names are still displayed, and only the images do a lazy load, possibly contributing to much smoother application performance while still capable of listing lots of apps on scrooldown. Here is the Play Store page I'm trying to emulate on my application:
There is a video that explains the theory behind the new Google Play design. No code though. But it is very interesting.
Basically they are using Cards as their main building blocks.
Cards are organized into clusters.
And everythings rests on top of a Canvas.
You can check out the presentation slides here.
Easiest to implement this kind of screen with a GridView Tutorials for using it (there are tons of others too):
http://www.mkyong.com/android/android-gridview-example/
http://www.androidhive.info/2012/02/android-gridview-layout-tutorial/
There is also a GridLayout in Android. The difference between the two components is explained clearly in this post: GridView VS GridLayout in Android Apps
Related
I am developing a mobile application using PhoneGap / Cordova, and have embedded maps in certain parts of the application to display location to the user. However, when the application is opened, all the maps on the app initialise simultaneously. This causes major performance lag on the app, as well as eats alot of data.
A button is used to open each specific part of the app, and the maps are embedded in these containers. Is there a way to restrict the maps from initialising until a button is clicked?
Your help is greatly appreciated :)
Thanks
This is a broad question, your problem is based in how your views are rendered, and the design pattern of your application. In some frameworks, the views are rendered only when they are invoqued, another save the data in cache, or all are rendered.
Maybe your problem is only in the part that you are initializing the maps, so you only have to move the initialization to the moment that you display that concrete view, but you should look at some frameworks to learn about views, memory and cache management.
I'm learning creating mobile android AIR apps using Flash Professional CS6.
I want to try and create a game where first there is a title screen, and then when you press play you go to the game screen.
But I can't figure out how to create an app where there are such multiple pages/docs/screens allowing you to navigate from one to the next.
If you create one .fla file then everything seems to be on the one page. Maybe the way is to create multiple .fla files, one for each screen and then in some way navigate between them? (No idea how.) Or should you have one .fla file and create the different pages as points in the timeline (sounds cumbersome and awful!).
My question is how would you achieve the above, and what is the recommended and simplest way of doing it?
There seem to be very little resources and tutorials about creating AIR apps.
There's a lot of ways to do that, it depends a bit on the scale of your project and your knowledge level.
In 'basic' flash you simply could jump to a new frame or scene containing your animations.
I'm not recommending this for a game project, as a lot of things normally change in the making and adusting all the gotoFrame() calls can be a a pain in the ... , ah well, you know where.
A cleaner approach would be to make your animations/ screens into separate .swf files or pack them all into an .swc, where you can instantiate them from, when you need them. Don't do any scripting in here, but use a centralized controller instead, that will coordinate loading and displaying the screens. E.g., you may add a Loader() in your root to load and add new scene contained in an .swf or instantiate a class from the .swc.
Especially when writing a (2D) game, you should definately check out the Starling Framework for Flash. It requires some basic knowledge of object oriented programming, though. A lot of resources can be found at the big G using "starling framework tutorial" as search term.
It's using Stage3D as basis and this way is a lot faster than rendering your content the normal flash way. The api is using very similar concepts as 'original' flash, but is a bit different in the detail. If you are starting to learn OOP, you could start here as well and get used to Starling right from the beginning.
The scope of this question is a bit broad to be answered in a post, though.
I'd suggest you get going, and ask more questions, when you encounter a specific problem :-)
Good luck!
I am currently developing a native android app. My app has a lot of activities. I want to develop native android app. But in some case, I want to use a webview where the entire layout is just a webview. Not linear or relative or another layout, just a webview. All of the images and other things running in HTML. All of screen will run in HTML5.
So, I can partially transfer my app into iphone app or other platforms. This is the benefit of this way to me.
But I don't know. Is this way better? What will the performance be? What is the disadvantages of converting to an HTML5 app?
Can you explain?
There is a very good presentation about this very topic.
Performance: You are adding an additional layer in between, A webkit engine cannot always match native (and sometimes hardware accelerated) rendering performance.
Disadvantages: One is that the API use is limited, you can bind a page's JavaScript to Native code, but not all functionality is available.Though you might want to have a look at capabilities of Cordova project. Another is that emulating complex widgets via JavaScript will slow down the page.
Portability: Indeed is a great advantage, that's why PhoneGap and Cordova are popular. Though many like Facebook App etc have switched to native App for better performance.
The approach you require actually depends on your requirements. This may be my personal rant but IMHO: a markup can be only twisted so far, it can't out-perform industrial grade GUI programming setups as of yet.
Cons WebView
Can't use full performance of device, Since web view form an extra layer.
Web view can't listen all user event.
You can't fully share or save data from your web view to app.
Take more time to load. Other we get all things in a simple API and can be rendered.
Changing a simple fields in page need to load full page again.
Online required, can't extend offline features.
Orientation changes and full screen make difficulties.
Pros of using Web view
One page for both android and IOS.
I think the main advantage is the ability to make changes without the need for each user to update the app on his device, because all the pages are on your server.
No wait for app store approval for updation.
Some Techniques
Native elements TOGETHER with WebView. I think it will be much better, as there are a lot of functions that can't be done with WebView only. The combination of the two is much more recommended.
Rendering from locally, Create an assets directory for HTML files – Android internally maps it to file:///android_asset/ (note singular asset). So you can feed your web view form locally even if you are offline.
I think -by using this way- your app quality will be weak and app will be hard to use because the webview object not having a lot of tools that you can make it be compatible with android. e.g you can't share or save data from your webview to app. whatever that reference on your app what need and what dosen't need, by the way i tried to develop an app with html but it was bad.
My team and I are currently working on an app (both iOS & Android) which uses a lot of the functionality of one the web apps we implemented. The web application (ASP.NET) basically renders and creates dashboards (of custom dimensions, specified by the end user). The dashboards use different libraries for the widgets (FusionCharts, GoogleCharts, standard .NET controls...)
Anyway, part of the functionality of the mobile app is to display the dashboards specific to each user. The question is: what is the best way to approach this requirements?
We've brainstormed here and came up with a couple:
One is to generate a screenshot of the dashboard on the .NET application and display that screenshot on the mobile app. However, this approach is very basic and does not provide any interactivity.
Another consists of recreating each dashboard on the mobile apps. The problem with this is that it involves recreating everything from scratch and issues related to inconsistencies between the 2 versions of dashboard (mobile version vs web version) will arise.
Loading the dashboard on the mobile app using the URL of the dashboard.
Personally, I think the 3rd approach is the most suitable, since there not much coding needed, we just load the existing dashboard using their respective URLS.
The question is, how do we handle dashboard that are too wide..(height is not a problem since the user experience of scrolling up and down is not bad, but having to scroll left and right is not a good experience imo).. As far as I know, the width on iPhones is 320px (right?) so how do we handle a situation where we have a dashboard that is 1000px wide?
Is this a good approach for this requirement? Any other possible approaches?
Any feedback would be greatly appreciated!
Thanks
Sounds like CSS Media Queries could be what you're after. Take a look at this example.
I'm looking at developing an app that could benefit from having a image recognition system. I've seen this sort of thing in iPhone and Android apps. Take a picture of a book and the app takes you to Amazon where you can find that book. I'm not looking for general image recognition, but more the ability to pick a single image out of a library of about 10k images.
Any ideas of what services are available for this sort of thing?
Google Goggles does something similar to Amazon Remembers. It uses OCR if text can be identified and they want to use it with the similar image search from Google Images. I think they generate some kind of hash for an image with the feature that if the images are similar the images are similar to.
My best guess would be try to start with the character recognition and do a text search for the title of your card. This means your user has to make a very clear image maybe even in a specific position. But for a first application this would be great already. As somebody playing magic I would buy the tool for trading and cataloging my cards.
Actually, while short of getting an actual Amazon employee to tell you there is no way to confirm this, I am fairly certain that the Amazon Remembers feature you refer to is actually the work of crowd sourcing- using lots of people combing through data to make it appear like a computer is doing it. I think they may actually be using there own Mechanical Turk system.
Edit: Also, I found this SO question that might interest you. It is specifically for playing cards, but some of the answers (such as the machine learning example) can be modified to be more helpful for what you want to do with magic cards.