Currently, I have a use case of returning to my application from google maps when the user reaches to the destination.
Having read some articles, it is known that performing this functionality in IOS may not be possible. However, on reading this article, i tried using
comgooglemapsurl://maps.google.com/maps?f=d&daddr=Tokyo+Tower,+Tokyo,+Japan&sll=35.6586,139.7454&sspn=0.2,0.1&nav=1
&x-source=nameOfMyApp
&x-success=urlOfMyApp://?resume=true
which does not trigger the callback. Is there any other settings that is to be made that I am missing?
Also, what would be the approach for the same in android?
Related
It is common to have multiple environments doing dev, staging and production. Forge App creation page also instruction that this is possible. However, no matter how I fill in the field, I always get a rejection. Please instruct how this field can be filled in with more than one callback URL.
Currently it is only possible to specify a single callback URL. You can however change it whenever needed, by clicking the EDIT button in your Forge application page.
Btw. we are already working on adding support to multiple callback URLs but don't have an ETA on when it's going to be available to the public.
From my app I'm calling Google Maps app using Intent and everything works well.
My question is:
how do I get back from Google Maps app to my app?
If I use the device "back" button then I need to press it 4-5 times!
Does anybody have a better solution?
Android does not give you control to the activities you launch. And since it mentioned nothing in the official documentation, it possibility means you can not.
One thing might help is it seems your application can check whether if the navigation is currently running. Look at this post for more information on that: Android application to detect when Google maps direction is finished
My solution is to create an AlarmManager right before you start the Maps Activity, save any variables in sharedPreferences and then let the Map Intent do what it has to do. After x time has passed(You decide how much time needs to pass before returning to your app) in the BroadcastReceiver open up your app in the activity that you want. Then load any needed variables that you stored in the sharedPreferences and done!
In essence it works like an alarm clock, you set the time and after x time you notify the user. I followed this tutorial(I used only the part I needed):
http://stacktips.com/tutorials/android/repeat-alarm-example-in-android
Checking my understanding of Google maps:
I am developing a web page that displays a number of different types of information for my employer's facilities. I have been using a multiview, and activating the proper view depending on user input (button toolbar). When I add a view to be a map to the selected building, I run into problems. I can make the map appear when the user navigates to the building map view. But when the user navigates away from that view, the maps api gives me the error
0x800a138f - JavaScript runtime error: Unable to get property 'offsetWidth' of undefined or null reference
As I understand it, this is because when another view becomes active, the view that contains the map is no longer rendered. The api is trying to access an object that no longer exists.
I could try to clean off the object - remove all listeners, delete the object, even delete the div that contains it. But I have just read through the related question on how to destroy a map instance and listened to Chris Broadfoot and Luke Mahe's discussion on the topic.
From this, my understanding is that the google maps api was not designed for this kind of handling. So, it is really not designed to be compatible with something like multi-views.
Is this right? If not, what am I missing? If so, any suggestions for a web app newbie on what to use instead of multiviews (I am thinking panels and hide/show as needed)?
Update and kind of an answer...
I switched to using multiple panels and hiding all the panels, except the one with the information the user chooses to use. The map then displayed blank unless I did one of two things: set the map to be created as an endRequest...
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(myInitMap);
If I understand that correctly, it means my handler (myInitMap) gets executed (map recreated) after every postback. Also, this seems to be a bit unstable - sometimes IE would give me errors, and I could not figure out a pattern or reason. Chrome would work ok every time.
The other way that worked was to not call the map creation on any particular event, but rather to register my map init script from the code-behind page_load event. My panels and my multi-view had been encased in an Update Panel, and I needed to register the script under that Update Panel...
ScriptManager.RegisterStartupScript(DataUpdatePanel, DataUpdatePanel.GetType(), "ShowGoogleMap", "myInitMap();", true);
This is because what is causing problems, I think, is that my panels (and my multi-view in the earlier version) were inside that UpdatePanel. The map creation script and API calls were not happening in the right sequence with everything else as the UpdatePanel performed a partial page update. Registering the map init scrip with the Script Manager basically told it to put it in the right place (at the end?) of that partial page update.
Also, I could not figure out how to update the map. The script is basically regenerating the map every time. I tried keeping a var pointer to the map so that I could test if that had already been created, and then just update it, but that did not work. The UpdatePanel partial page update is, I presume, working much like a whole page refresh, but for only what is contained in the UpdatePanel. So when the partial update happens, the previous contents are disposed of and recreated, so the map has to be recreated as well.
If anyone understands this differently, I would love some redirection.
I am new to writing scripts in Google Apps. I am trying to script various actions in Google Docs which previously I would have done through the main user interface. Is there a way of "recording" such actions as they are carried out, analogous to recording a Macro in Excel?
For example, I am creating a Form in Google Docs. Using the main interface, I can add an Image item and upload an image from another source (Google Drive, my desktop, etc.), but I can't work out the script code that would perform this same action. Is there any way to output the script that would have carried out the same action that I have just performed?
Many thanks.
Currently, you cannot 'record' a macro.
There is an issue in the Issue tracker (issue 650) where Google have mentioned that it is not feasible at the moment (Jul 2010). You may star the issue to register your interest to the enhancement request.
I think the real issue is that the GApps scripting functions are manipulations of the underlying object model of the document. The UI also manipulates the underlying object model, but no one has yet created the functions to emulate the UI in GApps script form. Recording the actions would then be a separate step and converting the recorded actions into GApps functions would be yet another step.
So you need to be clear: is your goal to be able to record and play back UI actions, or is your goal to be able to upload an image into a GDoc? You asked about recording and that's the answer you got. Maybe if you asked about how to use GApps to add an image to a GDoc, you would get a more useful answer.
My own personal question would be:
I haven't figured out how to use the GApps documentation very
efficiently yet. I do a lot of fruitless hunting. How do I find in the
docs how to add an image to a GDoc?
I hope this helps.
I have a web app that data is submitted from a Ui embedded in a Google Site and saved in a spreadsheet. I am thinking about switching to scriptDB instead, but I am unsure about querying and displaying data dynamically. The last time I checked it was not possible to refresh a sites page from within a script, so as a work around I wrote a .html page with javascript that accesses the spreadsheet via the key and uses the Visualization DataTables to produce a quick and nicely formatted query. I would like to retain this functionality if possible. Could anyone make some possible suggestions?
Regards,
Shawn
This is doable today via UiApp (see the Charts api, and note that you can add a Chart to a UiApp).
To auto refresh:
You can use CheckBox.setValue(value, fireEvents) - but you may hit quota issues (there is an example somewhere around). If you hit quota issues, then I suspect HTML service is your best option. It also gives you better control.
Here is an open item requesting expanded Charts service integration with Gviz.
Although, there is limited integration at present, it needs to be expanded to group variables in tables to facilitate basic count and sum operations.
I suggest you “star” the issue to vote for it and to be notified of new developments.