Where can I find a good google task api tutorial? - android

i am new on this issue so please let me down easy :)
I am trying to develop a android application and i am trying to work with Google Tasks Api.
When i created the project (in eclipse) i chose the Google Api, but im not sure if that means i have access to other libraries like Tasks or only android related classes. Just in case i downloaded the Tasks Api jar file ad import it into my project.
Now my issue is how to i make a http call to get back some json/data from this api, or any other google api, i believe they should be similar.
i believe the steps i need to take is:
1. import the Google Tasks Api into a java class
2. grab permissions from user to access the api
3. make a http request and get the data back
4. style the data
So, with these in mind i need a small crash course to at least point me in the right direction, because at the end of the day i need to know what i don't know to get more informed :)
Thanks.

This looks like a good tutorial - http://code.google.com/apis/tasks/articles/oauth-and-tasks-on-android.html
Here is some more example code - http://code.google.com/p/google-api-java-client/source/browse/tasks-android-sample/src/main/java/com/google/api/services/samples/tasks/android/TasksSample.java?repo=samples

Related

How To Access Native Android Date Picker And Time Picker From Unity

I have been trying to find a way for ages to access Android's Native Date Picker and Time Picker in Unity via script. Most of the method's need a plugin or add-ons that cost money. I am looking for a way to do this without pluug-ins but would not be against the idea of using one.
You may try with this package which i have not used. But hope it would work. Please try with demo included on that package.
Android Native Dialogs and Functions Plugin
It may be possible using AndroidJavaObject and AndroidJavaClass, but i assume you have already tried that route.
I just crossed this bridge myself, i needed background audio and the only way to make that happen was with a native Foreground Service and using Native Media API's.
I have successfully wrapped up with that side of the project now and moved over to accomplishing the same functionality with apple (much harder so far..)
I highly recommend that you just bite the bullet and write your own plugin man, as i had to. it was well worth it. its also completely free. the time invested is really worth the functionality it opens up for your current and future projects
This was by far the best YouTube tutorial to get your started (just install Android Studio First) -> https://www.youtube.com/watch?v=bmNMugkOQBI
Followed by : https://www.youtube.com/watch?v=eNKSXzWOnlI
Once you have your plugin created, it should just be a matter of adding one java method that 'Sends' a string back to a given C# method
it took me a solid week to figure it all out. but if you have any questions i can answer them in the comments :) just ask

Is there an API for bbPress?

I'm searching for an API for bbPress.
I've searched here on SO but the posts I'm seeing are quite old.
So is there an api for bbPress. If yes, please how do I access it?
If no, is there anyway I can implement user registration and login via an Android app?
Also, check this repository: https://github.com/buddypress/BP-REST
In general, BuddyPress REST API is in development. Current focus will be on members management and their profile fields.
You can also check https://bpdevel.wordpress.com site, that's a development blog, where Boone is taking care of all the REST things (see latest posts).
User registration and log in can be implemented independently from BuddyPress, using default WordPress endpoints, that were shipped with the latest WordPress 4.7.
All BuddyPress offers for API Documentation is the Codex: https://codex.buddypress.org/
If you want to know if there is a function that does x, then just look in the respective file and that should give you the information for the hooks you need, for example if it’s something to do with activity, then look at bp-activity.php I know this isn't perfect but it should give you what you are looking for. All the function names are very descriptive, so it shouldn’t take more than a few seconds to find a function that fits your needs.
Database classes can be found in these files:
bp-{component name}/bp-{component name}-classes-php
Template functions can be found here:
bp-{component name}/bp-{component name}-templatetags-php
Once you realize how files and functions within files are organized it should be pretty easy to find what you are looking for exactly. Hope this helps!
Alternatively, you could do something like webview around the login/registration page. Not ideal I know but is an option if you don't want to go through the hassle.
There is a bbPress API, which leverages WP JSON API v1.0:
https://github.com/thenbrent/BB-API
But you should consider upgrading it to v2.0 of an API, as it's much better.

Android API versus Java API for Google+ Search

tl;dr: How do you do a Google+ keyword search using the com.google.android.gms library? Can you use the OAuth token, or do you need an API key? (Yes, I know that token is overkill for the application.)
I'm attempting to write an app that will search Google+ for a particular word, and then display results. I followed the Android-specific quickstart. That works fine, but it's only signing in...which maybe isn't even required. I don't care about user profiles or anything. I just want to search and show results. But whatever. It's working. Let's call that part A.
Part B is the actual search. I found another sample code for that, but it's for Java, not necessarily Android. Here's where the problem is. I'm getting a 403 when I try to search, and I could show you the results of that, but it's the same as you'll find all over - "Access Not Configured"...which I did configure. I spent a lot of time regenerating keys, and it seems like a dead end in a way.
But my question, that I'm finally getting to the point of, is about the two samples, and how they differ. Part A, which is Android specific, has a package of com.google.android.gms, but part B, which is plain Java, has a package of com.google.api. So, I can log in through the Android library and it works, but that package doesn't seem to include anything to allow searching, and the plain Java package gives me that access error, which is nonsense because I already have the OAuth token...in a seemingly incompatible API.
Why are there separate packages? Should I ditch the Android one completely? I'm considering ditching native Android code entirely and just using HTTP, which seems a lot simpler.

Create Android app using API that reference JAXBContext

I am a Computer Science undergraduate student and I am creating an Android app that using an API to interact with an execution server.
The server takes a xml file and do various stuff with it(get data, process data etc.)and then gives back data as output. Both input and output are exchanged via this API.
The problem is that the API references code from javax.xml.bind, for example, JAXBContext while android doesn't have javax.xml.bind package in its core. (a well known issue)
Feasible solutions on the internet seems to be repackaging the code I need, but I don't know exactly what suppose to be.
Since the API reference classes in javax.xml.bind and javax.net, I guess I have to extract code from these 2 packages and make them part of the API (I have access to API source) and then repackage the API. However, I guess classes inside javax.xml.bind might have dependencies on other classes that not supported by Android, so does javax.net. (Please forgive me if this is stupid thought...)
So anyone know : whether there are classes, which codes in javax.xml.bind and javax.net depends on, not supported by android ?
Bit of tricky question really..
I will be really appreciated if you can provide a work around that enable a Android app to call an API that reference codes inside javax.xml.bind.
Try JiBX (http://jibx.sourceforge.net/), it's a small and fast footprint, Android compatible, XML binding framework.
I ended up with repacking those package which exists in standard Java library but not in Android. Basically, just get source code of all those missing packages and then put them into the API source and rename them into a name that is different from the original one and then change corresponding code in API that reference these methods as well (you have to use a different name, otherwise code reference methods in these package will still looking for methods in the core Library (i.e Android API)
Anyway, hope it helps. If you have the same problem.
If you have any better suggestion. Please share it!

Invoking a class from one project in another project?

I am very new to eclipse and android developing in general and need help with the following. I have built two android projects in Eclipse with the android SDK:
"ORF401 Project" - targets Android 2.2 platform
"Map Project" - targets Google APIs 2.2 platform
I have followed the steps as specified by the standard Hello World Google Maps for android tutorial and have gotten the Google map to display on the emulator when I run the second project.
I have a menu set up in the 1st project for which one of the options is to load the map. However, I'm not sure how to load the map within this project since only one build target can be specified for each project, and so I cannot specify the Google Maps API as a (additional) build target. Is there a way to call the main .java class from the second project within the first project? I see where a reference can be made to the 2nd project under the project properties, but I'm not sure how to make use of this. One possible solution I found on the web was to add the following code under the switch case in the first project:
Intent intent = new Intent(this, {googleMap}.class);
startActivity(intent);
I presume this would require an additional googleMap.java class in the first project and also another activity, but I can't get it to work. Can anyone make a suggestion as to how I can accomplish this?
If the code for either or both projects would help, I'll be happy to post it. Thanks
The main idea with projects is to have one project per application that does some thing.
I assume your application needs to do something with maps, as well as something else. There is no need to split those ideas. Keep them in one project, because they make up one single application that you develop.
First thing I would suggest - read carefully about activities and intents. Head to http://developer.android.com - everything's clearly explained.
With that all cleared up you will see the point in making some button, which, being tapped, opens a new screen with the map feature that you've developed. And then let's you go back or do something else, like open a new screen, a browser, etc.
And give up trying to call the other project from a different one :) It's not the way I think you want to do stuff.
Just to make sure I'm not misunderstood - of course you might want to have two projects. But those will most probably result in two separate applications. Luckily, applications may also interact by intents, or content providers, or a couple more. Just see how Contacts app takes you to GMail app if you want to send a mail. If that's what you want to achieve - still need to read about intents.
edit:
Here's the link I mentioned about in the comments:
http://android-developers.blogspot.com/2010/07/how-to-have-your-cupcake-and-eat-it-too.html
It explains how to achieve the 'additional target' that you would like to have.
There are ways to call a class from one project in another project, but there are bigger problems here. The first project can run on any Android device. The second, however, requires Google Maps APIs. You won't be able to invoke it anyway, because it can't be installed unless you're in an environment that supports Google APIs. There really is no benefit to doing this, unless you have additional functionality in project 1 such that it can exist without project 2.
I would suggest using the Intent method rather than trying to hack something together that allows you to access another class. Regardless, though coupling these two together like this seems overly complicated and error prone. I would suggest simply embedding the mapping functionality in project 1 and requiring Google APIs. Most mainstream device support them anyway.
If you're married to the idea of having two separate projects with different build targets, I would suggest looking into using BroadcastReceivers with a custom intent that you broadcast from application 1. I don't believe startActivity will work across application boundaries because of class loader issues, but I could be wrong about that.

Categories

Resources