I'm trying to create an app using MIT's App Inventor. I'd need to get a history of the pages a user visits using a WebViewer block or, at least, count the number of pages visited. Note that I want to include the pages opened by links internal to the WebViewer.
I've been trying, but it looks like there is no possibility to detect any clicked link within the WebViewer. Maybe there is some way to detect and count URL changes?
Is there any way to achieve this? Thank you.
You will have to use a clock component and a list.
Inside the clock.timer event check, if the current url is already stored in the list. If yes: do nothing else store the current url in the list
Related
Recently was given the opportunity to create an Android app for my college group. But I was not satisfied with the event page. I wanted to create a dynamic page in which admin can update the upcoming events. On using URI the images were a bit off. Can anyone help me?
If you want to create Event Page which can be changed dynamically, you should design a page such that, you give a provision of adding Events, displaying it and
refreshing the UI.
I would suggest before start implementing an App, you should gather requirements, define the features of the App, Design the App and then go after implementing.
You can use Firebase storage and Real-time database to store data and images. Also, create an admin application for changing the image.
You can have provision to add an event, persist the event details by using either database or webservice, and updating the event.
The create event page can be made dynamic by having provisions to add/subtract event detail items from the screen. For example: Use can have a section saying Number of day(s) and a + button besides it to add details about each added day.
If you want only admin user to be able to add, update, and delete the event you can use role based login (for login again, you can use either database or webservice).
These are just rough ideas, but its necessary that you freeze the requirements before jumping into designing the app.
I was wondering if there is a best practice in Android about WebView/Browsers. I want to open an url in my app to show a web page but I do not have anything to retrieve from that page so I do not need to show it in a webview inside my app. Should I show that page in a browser or in a webview ?
If you should open an URL in WebView or Browser that totally depends upon your requirements. Still I am adding some points that you can consider:
Browser:
If you have some data like Privacy Policy of your organization, that just for user information. You do not require any inputs from user.
WebView:
If you want to,
Customize content of URL
Get some input from User
Send some information to Server
Thank You!
Quick Answer:
From your context, it looks going the Browser way is good enough.
Details:
When you don't have user inputs to process and it is not part of the user-flow in your app, go about showing it in the Browser. It's easier that way, because you don't have to manage anything explicitly.
When you have something to process or that this window is some part of your in-app flow, you should go the WebView way. It gives you the power to manage things and you really need to code of situations like user pressing "back button", and the like. I mean, you're the owner of the life-cycle management of the WebView and see how it seamlessly fits in your user flow while (s)he is at it.
I'm trying to find a way to figure out how to retrieve clickthrough information to figure out which ad / link was clicked to direct a person to download it.
Say we have the following situation:
User sees an ad for the app.
They click it
It directs them to the app store, and they download it from there.
They run the app
Is there any way at all to figure out the source of the click in step 2? This is for advertising analytics - we want to know where our clicks are coming from.
I know that the site visited in step 1 can theoretically retrieve device data and link it up to device data retrieved by the app. However, we're looking for a more direct approach.
I've had a great deal of difficulty locating information on this, so any assistance would be appreciated.
We're using the Flurry API on IOS and Android.
Thanks!
May be you can check the touchEvent point location, when the ad bannber frame rect contains the touchpoint , we can treat that as a click ad event.
I have an Android and an iPhone mobile app into which I need to put a Facebook like button for marketing purposes.
The problem is that I am not sure what is really being liked when a user likes something from inside a mobile app. I have a website for the two apps (Android and iPhone) so it seems that this website should be liked when a user likes something from a mobile app.
Is that possible to do?
From my experience and what i know, Facebook doesn't leave you the possibility to use a likeButton into a mobil Application, they don't want the users to be spammed by those in every apps.
From my point of view, there is two solutions, but neither are perfect :
You use Facebook OpenGraph and create a like action for a Website Object, you can find more informations about Facebook OpenGraph on facebook documentation, OpenGraph web tutorial and the last one examples that are more specific to iOS. But if i remember right, you won't be able to create an action called "Like", i think facebook will prevent it so there is no confusion for the users, but as i'm not sure at all, it's still worth a try.
the second solution is to make a simple UIButton, and when you click on it you just show a webview of the facebook page you want the user to like. If you want to know if the user liked your page, you can always make a request for his likes and try to find your facebook page id in it, whenever the user did exit the webview.
I hope i answered your question.
And if ever you find a way to make a real facebook like (not an opengraph), directly in a native mobile application, i would be very interested in knowing the howto.
EDIT:
Actually, only the second solution would work if it's to like a facebook fanpage, as for OpenGraph you need to be able to modify the metadata sent by the page so it fits the properties of your object.
The Opengraph solution would work only to make a fake "like" on a webpage of your own.
Use this code. You should be logged in to Facebook, before using this code. Check whether the Facebook session is valid and then use this code.
WebView foll_fb = (WebView) findViewById(R.id.btn_foll_fb);
String url = "http://www.facebook.com/plugins/like.php?layout=standard&show_faces=true&width=80&height=50&action=like&colorscheme=light&href=YOUR_URL_TO_LIKE";
foll_fb.loadUrl(url);
foll_fb.getSettings().setJavaScriptEnabled(true);
foll_fb.requestFocus(View.FOCUS_DOWN);
foll_fb.setWebViewClient(new LikeWebviewClient());
Correct. If you click a like button inside a mobile app, most users expect that they have liked the corresponding page. If you have a page for both the android and the iOS app, then it should like the corresponding one.
In case you wanted to know how to do this, I can give you the main idea. Simply place a button, that on tap, runs whatever is necessary to like something. Since I personally haven't done that, I'm not sure what needs to be run.
Hope that helps, but someone else probably has a better answer than I do. Meaning the actual code to that.
I'm working on a mobile webapplication which consists of multiple pages (with different urls)
/index.html
/products/1.html
/products/2.html
{...}
Now if the user is on one on the subpages and selects "put on homescreen", I'd like to put the startpage (i.e. /index.html) on the homescreen, so he goes to the home page when clicking on the icon instead of some subpage.
Is there any way to tell the mobile OS (iOS and Android in my case) which URL to choose for putting on the homescreen?
Unfortunately iOS chooses the current URL and does not provide a meta tag option to set this. As for Android I don't know whether there is a possibility to do this but I don't believe there is one. It makes sense for security reasons.
But maybe there is a workaround for this. I thought about the following (untested, just brainstorming):
Create a session for the user and measure last interaction time. If the last interaction happened e.g. 10 minutes ago, redirect the user to the starting page. So if your user doesn't use the App for a while and calls it via the homescreen, he will be redirected to the first page.
Another method would be to use anchors for all the navigation and a script that disallows to directly browse to anchors without previous user interaction. So even if your user is at /index.html#products/2 he has to start at index.html