How to import only one package from google play services lib - java

like in the title :
I'm developing in eclipse an android application, and I don't want to import all the Libraries of google play services_lib.
Is there a way to import only one package that I need?, and is it legal to do like that?
(because I read that those libraries are not modifiable).

First thing please use Android studio.
Yes using these libraries individually is absolutely legal.
Here you can find them all. (Individual)

Related

How to install ffmpeg for android studio?

Hi I'm trying to do a project in video processing. I want to demux and mux the videos from an mp4 container. I did it with MediaMuxer and all but now whenever i search everyone is recommending ffmpeg will be much easier. So I want to try this library. But for the life of me I can't figure out how to use this library. I want to integrate it with my current android studio project written in java. Some examples are given on how to install it in linux and some and are android ndk. Can anyone please guide me how to use this library. How to use and everything. I have read almost all the tutorials and still i'm not clear. Please. Any help would be appreciated.
Finally i found the answer.
For those who are on the same boat and haven't figured it out,
First include this line into your build.grade module file:
implementation 'com.arthenica:mobile-ffmpeg-full:4.3.1'
Then import these methods:
import com.arthenica.mobileffmpeg.Config;
import com.arthenica.mobileffmpeg.FFmpeg;
import com.arthenica.mobileffmpeg.FFprobe;
and after this, when you are trying to execute the codes, use the commands without 'ffmpeg' on them. Reply if you still have doubts.

Android Studio Java Syntax Color Scheme

I am using the latest Android Studio version at this time (2.3.3) and I did not have much experience with Android Studio before, when I started to use it now, I feel a bit uncomfortable with the Java syntax.
I do understand that there is a way of changing each attribute colour, if you go to "Editor> Colors & Fonts> Java" I will be able to modify the Scheme myself, but I'm not too sure about how to manage it.
I've been using Eclispe and SublimeText before, and in Sublime it is much easier to understand the code and visually get around.
Android Studio Syntax:
Sublime Text Syntax:
Maybe there is a way around it, where I can import a scheme or a tutorial how to set the correct colours for a correct attributes?
For those that are trying to achieve what I wanted, there is a GitHub repo called sdvoynikov/color-themes where you can download a lot of themes from there and then import into an Android Studio.
Step 1 : Download jetbrains-monokai-sublime theme
Step 2 : Extract the zip.
Step 3 : Go to File -> import settings -> and select the Monokai-Sublime.jar where you previously extracted the zip.
and you are done
Install Java Code Styles, which is compatible with IntelliJ IDEA and Android Studio.

Eclipse Programs to Android Studio

Is there any way I can call .java files from eclipse to programs in android studio and have that code be run from android studio? I cannot have the code directly copied into android studio as it brings up multiple issues. So I am wondering if there is some way I can call the .java from Eclipse, get the result from the method within that Eclipse program, and pass that result to android studio.
Any help would be greatly appreciated!
Very simply, no you can't "just call" code from another IDE.
You could export the Eclipse code to a JAR, import as a library into Android Studio, then try to work around that, but that sounds like a lot of work.
In regards to your previous questions, plus your comment.
it was working in eclipse, but when I literally copy and paste that exact same code into android studio, I am getting network issues when I run it.
Android has a UI Thread that does not like to handle Network requests like your bare single-threaded Eclipse project.
You need a separate thread. Without any libraries, there is AsyncTask, and the Android documentation covers this.
Though, you may find OkHttp to be better documented, useful, and less confusing than AsyncTasks. Volley is another, though works fine, is not very well documented.
See more discussion at Comparison of Android networking libraries: OkHTTP, Retrofit, and Volley
No, This is not possible way to do. Android studio and eclipse are different Applications and you cannot pass the Result to each other.
You can import the project or copy the files for a new Project.

how can i get a class called MessagingService in java

i'm watching a tutorial about developing a chat Application in android and i have faced a problem in importing a class called 'MessagingService.java',
this class developed by google Inc, i searched many times and i couldn't find it.
You need to get the project source from git.
Read the section titled Import Samples from GitHub. That will tell you how to get a local copy of a sample project into Android Studio that you can play around with.
There is also a download link in the upper right hand corner of the page you referenced that will download the project to your machine.

PushPlugin source issue in Android -- attempting PhoneGap push notifications

I'm trying to plug the PushPlugin plugin (http://goo.gl/xn8z4) in to my Android PhoneGap application.
I'm getting stuck at this point here http://goo.gl/b03fs. I'm 80-93% confident that I have the Java source in the right place.
Java's trying to import org.apache.cordova.example.R but can't seem to find it. I'm suspicious that as soon as it starts importing it, I'm golden.
I'm working with the Cordova 2.2 jar/classes.
Here's where I'm seeing the package import failure: http://goo.gl/U3VlI
This is where the code is trying to talk to the object from the package that's failing to load http://goo.gl/LJbLb
It feels like this is a simple solution, but again, my skull appears to be excessively thick this afternoon.
Thanks for taking a look.
Boy, how I wish I had attempted this earlier: the solution to this one was to update the Cordova(PhoneGap) library to v 2.3.
There's a bloody spot on my head and nearby wall that I hope this post can help someone else sidestep.

Categories