Can I use mapserver on Android? I want to make a standalone application with implementing tiling, zoom and pan. I need to manipulate .map file dynamically everytime. Can anyone suggest me how to take approach or how to use php mapscript to invoke mapserver?
Mapserver is server side technology, it can be consumed by android or any other OS with a reasonable browser.
You need a server that will run Apache/Mapserver/PHP look at MS4w http://www.maptools.org/ms4w/
Second that, MapServer is the GIS server side technology for you to publish your data to services. You will be able to consume the service all cross platform (most of them) via OGC standard protocal(e.g. WMS, WFS)
To invoke the service from MapServer, is as same as other services using http request. More details about how to consume services from MapServer: http://mapserver.org/ogc/wms_client.html
Related
I am looking for ways to basically manipulate data that is shown in my app by intercepting the API calls it makes and then basically manipulate the data ( positive and negative scenarios) and then observe how my App behaves. I have been manually intercepting these calls and doing it in Charles Proxy tool but I want to get rid of it and looking for a way to do this through Automation. Set up my test data intercept the API calls through a proxy and then run my functional tests on the App. I am looking to do this for both Android and IPhone Apps.
Note: I have been using Appium for Automation.
Appium is a black-box test automation tool, it has no API to manipulate with application on server side. On Android, it allows you to start Activity/Fragment with pre-defined state, but it is not equal to what you are doing.
I think the right way here is to mock your server, there are multiple libraries, one example.
Then you can make a build for Android/iOS apps to use your mocked server instead of real server. In this case you will pre-define response instead of overriding it with proxy.
You can ask your developer to log the things you want to intercept or if they are already being intercepted in logs.You just need to collect the logs from ADB and use that in your appium code.
You can get the adb logs using :
List<LogEntry> logEntries = driver.manage().logs().get("logcat").getAll();
for(LogEntry entries:logEntries){
if(entries.getMessage().contains("*Things you need from logs*")){
entry= entries.getMessage();
}
}
return entry;
How can I connect android to mvc ? For example I want to open my camera via google chrome, how can I control it ? People telling me to use json is that true ?
Your question is a mess.
It sounds like: I want to send a rocket to the mars people telling me that I need oxygen is that true?
Below I'll try to clarify what you need and what you want:
You need your own android application that can open camera by
server application request.
You need your own server side ASP.NET application.
When somebody opens a web page on your ASP.NET your server app should some how to establish a connection with an instance of your android application and tell it to start capturing of media-stream from the camera.
You want to send media stream from your android camera to a desktop browser
Answer:
You can use JSON as well as any other data-interchange format at point 3.
But keep in mind that your data should be transferred by some data transfer protocol - most probably HTTP.
At point 4 to work with media in a browser have a look to the WebRTC.
Kind of. Looks to me that you should explore the world of APIs in general as you are not too familiar with them. By the way a REST API is a good way to go, but you'll need a platform, a "server" to do it.
Then you will be able to control your device from a remote one.
I'm new to android, I'm trying to build an android app that is a front for a web portal. For example, Airbnb. They have a website, but they also have an android app that, using it's own layout, will show listings from their website.
There are many websites that teach how to or even directly convert your website to android apps. However, this will result in an app that loads too slowly and is unresponsive due to CPU usage.
Could anyone share any tutorial/guide to learn how to do this myself?
Million thanks.
To actually load data from a web server you're gonna need and API which usually delivers the proper date using JSON or XML format so that you can properly parse and display that data. Building this API is in it self a complete course on its own.
But connecting to and requesting data from the API is usually done using some networking libraries. These are some of the better know libraries for this purpose.
OkHttp: A complete library with a set of tools for handling network connections and HTTP requests.
RetroFit:Type-safe HTTP client for Android and Java by Square, Inc. which is built on top of OkHttp.
Async-Http-Client:
The Async Http Client library's purpose is to allow Java applications
to easily execute HTTP requests and asynchronously process the HTTP
responses. The library also supports the WebSocket Protocol. The Async
HTTP Client library is simple to use.
There tons of other good libraries.
its called webservices
Through android you get data in form of json from a web server and then return in custom view as you want.
Follow this link hope it will help
Step by Step Method to Access Webservice from Android
you would have to write an API/Web service or use if already exits to fetch data from web server. Basically the concept is that, the website itself must be pulling data from some database, so write an API which would fetch the data from same API and return JSON data and consume the API from your android app.
If you know PHP refere to this for the help :http://www.codeproject.com/Articles/267023/Send-and-receive-json-between-android-and-php
You can write WebService, in programming it generally refers to a web page(ex. Airbnb), that can be called from your android application which can pass in data to it, or receive data from it.
WebService is basically like a 'method' or 'function' in a normal programming language; except you're calling it over the internet.
The first thing is you have to create a Web Service. The Web Service will be your "bridge" to consume the data from other Website like airbnb or others and return the data to your android through json format for example.
You can create a Web Service using many languages like C#, Java, PHP, etc. I would like to recommend you to use the language that you know the most.
You can try to google this
Cheers
as the title said,
I'm looking for a method to handle a POST request made from my Android front end to my Drupal back end.
I've already seen a lot of documentation and reference, like this one: http://tylerfrankenstein.com/code/build-mobile-app-sell-products-with-drupal
but I can't figure it out.
Anyone can help me?
Use Services
It sounds like you need to setup an API using something like a REST service. Drupal has a great module for this called Services.
Essentially you can setup your Android app to use the POST method to push to your Drupal configured endpoint.
EG: https://www.mysite.com/api/android/
Services is extremely flexible and you can have it work through basic CRUD operations for nodes or you can use hooks and use custom logic for a particular service you want to use and write custom PHP code to do whatever you want.
How about using this library for native Android applications to communicate with Drupal web servers?
Feature list:
Synchronous and asynchronous requests
Flexible object serialization / deserialization
API can calculate object differences to perform patch requests
Simple entities request
I've been reading some info about Web Services for Android using SOAP or REST but I've never created a web service so I have many questions about this.
I'm developing an Android App where the users answer some questions and for each user an XML file is generated and saved in the device.
Here are my queries:
What I would like to do is to send these XML files from the devices to the Web Service and also sometimes to retrieve all the files to any
device.
Do I need to convert these files into Byte or just send the XML?
Are these actions possible with the Web Service or will you use Java Sockets? In case you prefer the Web Service, what would you use:
REST, SOAP.
I would appreciate some links to tutorials and piece of advise.
Use SQL Server to manage the data on your desktop and create a web-service in .NET on Visual Studio.
Then connect to the web-service in your application and set/get data from the DB, using web-services. You can use either XML or JSON to transfer your data between the phone and the server.
There is no need for the use of Java Socket API for this.
Links which might be useful :
How to make a web-service in .NET (does not include the implementation in Android) : http://srikanthtechnologies.com/blog/dotnet/wsdaljava.aspx
How to connect your service with Android :
http://seesharpgears.blogspot.in/2010/11/basic-ksoap-android-tutorial.html
http://www.codeproject.com/Articles/304302/Calling-Asp-Net-Webservice-ASMX-From-an-Android-Ap
http://adrianandroid.blogspot.in/2012/05/access-c-net-web-service-in.html
Note: I have never worked on RESTful services. My work has always been on SOAP and hence it remains my preference.
Your final choice of how, exactly, to architect your app, is going to be based on all sorts of things that you haven't included in your questions: your experience, the experience of the other developers in the project, so on and so on.
I will say this, however. REST is deep in the heart of Android. If you decide to go with REST and, possibly, JSON instead of XML (there is, almost certainly, no reason to use byte arrays), you will find that Android's architecture supports you. SOAP and such and you are on your own.