Is there something like LeanEngine? - android

After a while defining, what my actual problem is, I found Lean-Engine.
It is a library for GAE, which provides afaik all possible authentification methods, supported by GAE (and some features I don't need). The only thing that makes me worried about is, that it is 3 years old.
This means to me that:
This is not the way to go
It is out of date
since I had to search a lot, I guess no one is using it, which propably has reasons.
So my question:
Is there another library (in JAVA!) (a one up to date would be good) like that?
[Edit:]
There is another lib called SimpleOauth, which is python only. Dunno, If I could combine that with my java endpoints. Still a year old... :/

LeanEngine is not developed anymore (I'm the author). Also it's focus was not authentication only, but being a simple mobile-cloud solution (aka an open-source version of mobile clouds, e.g. Parse.com).
Oauth 2.0 is a standard, but it's pretty wide and differently implemented by different vendors. See Pac4j for a cross-vendor multi-protocol authentication library. There is direct support for different vendors supporting OAuth. You can also easily add support for new vendor-specific OAuth logins.
Some time ago I added a patch to make it work on AppEngine.

Related

Can iOS Apps be developed using Java?

I'm a web developer and am thinking of digging into mobile app development. The languages I know so far are PHP, Python, SQL, Js, HTML and CSS, all of them pretty well now. Currently I'm starting to dig into Java, as it's the language to be used for native Android App Development, as far as I've learned. Interestingly, I'm coming across posts (also in this forum) saying that Java can also be used to develop iOS - compatible Apps, while other sources comment that Apple is completely against cross-devs, and that you should develop iOS apps using Swift when it comes to the native choice and optimal UX. So I was wondering about the answer in this forum; can you develop iOS apps using Java or not?
Post is a few months old now, but I figure someone with a similar question will probably find this with web search, so this reply is for them. (Disclaimer: I wrote Java professionally for about five years, and I grew up when Java was supposed to be the future.)
If the question is, "Can you write Java code and run it on iOS?" then the answer is, "Technically yes, but you almost certainly don't want to."
It requires jumping through all kinds of hoops and sleight-of-hand to make it work. The project linked in a previous answer, Codename One, is a pretty heavyweight framework and the kind of thing you'd only want to use if you were heavily committed to a Java codebase already.
There are advantages to knowing Java in 2022, but cross-platform mobile development isn't one of them.
Some reasons why you might want to learn Java:
Developing on Android. Android now supports/recommends Kotlin for new projects, but Java was the sole first-class language on the platform for 10+ years, so it's advantageous to be able to read/write/reuse Java code and libraries.
Using long-standing big-data tools (spark, hadoop, neo4j, etc.). While this domain has increasingly moved to Python over the past 5-7 years, there's still a lot of production Java code that someone needs to maintain. [Edit 3/31/22: See also the Apache http server, whose name never sat right with me because as far as I know, the people who wrote it aren't Apache.]
Stylistic similarity to C-family languages. Java can be a more intuitive introduction to C-style languages than jumping right into, say C++. These days, though, I would recommend C# over Java since it's used in more domains.
Continuity with some JS dialects. React code in particular is full of Object Oriented(tm) design conventions that are very strongly influenced by Java practices, and those design choices in turn have influenced changes in the JS spec. So being familiar with Java conventions can help make sense of that stuff. It can also help you identify which of those practices are bad ideas so you can avoid them in JS. [See footnote 1.]
As far as reasons why you won't see widespread Java usage outside of those legacy domains, I'd say there are a lot of good reasons people have moved away from Java since 2006 or so:
It's incredibly verbose, and requires a lot of esoteric knowledge about implementation details to write code that runs efficiently. This is the kind of problem that languages like Scala and Kotlin have tried to solve, while retaining compatibility with the JVM platform for ease of migration.
The JVM platform itself introduces substantial overhead, both in resource usage and integration complexity.
Changes in approach and policy since Sun's acquisition by Oracle. This is related to licensing issues (see Oracle v Google), as well as complexity/feature creep, which has given rise to compatibility issues across codebases.
Emergence of viable alternative languages in the 2000's and 2010's.
Widespread adoption of virtualization technology has yielded alternate ways to solve the compatibility issues that Java was designed to address.
It's ironic, since the motto of Java used to be "write once, run everywhere", but that's the way things go.
Footnote 1. Actually, this is kind of a trick question, since most commonly accepted Java practices are bad ideas. This can be demonstrated by the fact that in 1995, object-oriented Java applications would run in a typical web browser, whereas 27 years later Java is considered too heavyweight for that purpose.
Postscript, 3/31/22: This is my first and likely only Stack Overflow post. If you want to read more like this, check out my github: https://github.com/ubuvoid
Yes you can.
One tool used for this is Codename One.
https://www.codenameone.com/
Also for more info on this subject, feel free to consult this thread:
How can one develop iPhone apps in Java?
Yes, this is possible. https://github.com/Anuken/Mindustry is an open-source RTS game written in Java. It has an iOS port that is compiled via an open-source fork of RoboVM.
IOS works on objective C and Android works in Java and Kotlin. I don't know how much some conversion tool can help you to achieve all the functionality. So in my opinion answer is No.
Hybrid Application development can help you. You have one source code that will run in both platform. You have to develop the app again.
First: Java is used in more Domains than C#. Needed information because C# has no way to get over with ONE UI to Desktop, Mobile and Web.
By the way, the recommended Solution is CodenameOne or - if you want to implement your App with JavaFX - use Gluonmobile which is using the GraalVM, an ahead of time compiler for IOS.
In both Cases you have access to Hardware of the Device for Android and IOS because there is an abstraction which helps you with implementations for both Platforms - Android And IOS. Write in this Case one App and compile for both worlds.

multiplatform or android platform alone and desktop alone for Kotlin

i am trying to make a project that is designed for a business and a customer where the business will be on the desktop side and the customer will be on the android side.
i was wondering since both the platforms will have unique UI(tabs/services/actions... etc.) that serves their needs:
should i use Kotlin multiplatform and use as much shared code as possible or build a standalone app that works separately on each platform and then share information by servers?
are there even other ways to accomplish my goal?
so far here are the most important pros and cons of multiplatform:
+reduce time consumed
+ability to share code which reduce bugs and possible errors.
still in alpha version (experimental) which means not enough libraries in support .
to be honest the only thing that is stopping me from choosing multiplatform is the "experimental " warning sign and if i chose to make desktop app alone might as well make android/IOS app altogether( since the sharing code ability between android and IOS is very much reliable) and in that way i would have gained an extra platform for my phone app in return for the added time of development
i really need an answer from any experienced Kotlin developer and thank you in advance :)
What the KMP thought for is sharing business logic between platforms.
If you have different business logic(business/customer sides) not sure how much you’ll be able to share, but the least you can do is data objects: you can share same objects between business/client/server to make sure your json parsing is stable and doesn’t require changes in many places.
You’ll be able to share a lot of stuff if you choose to share android business logic with iOS, but note that there’re some pitfalls you need to learn, so I’d say you’ll spend 2x time for two platforms in first 1-3 month (same time as if you would do for two separate apps), and then your’ll be able to make two apps with average speed of 1.5x time.
Don’t forget that all UI part will take same time as for a separate app, so it won’t be “free”
Still if your project is big enough, it should pay off.
What’s about KMP being experimental: as for me it’s already stable enough and I’m using it in my current project for sharing code between ios/android/server.
It’s in active development phase so most of problems you face will be fixed fast, or you’ll get a workaround on the youtrack
For the JVM part you almost loose nothing: you had to use Native frameworks but if you need to using jvm dependencies in the shared module, you had to provide alternative code for an each other platform(ios, etc) using expect/actual
It has some limitations for iOS platform. The main one, I think, is that you had to work with a specific memory model: you can’t modify objects from different threads, but if you choose your architecture wisely it won’t be a big problem.
I think your decision should depend on how much logic code you need to share between different platforms, and if there's a lot - KMP is a good solution.

Local iOS-Android zeroconf ad-hoc networking

The Desired Functionality:
User A is running your app on an Android or iOS device. User A can automatically find and communicate with other nearby (< 20 meters?) users B and C (Cross-Platform), whether they're running Android or iOS, and without any of the users having an internet connection (Offline).
I believe this is a commonly desired functionality, and having a definitive answer to this question would be a great boon to the mobile development community.
Further requirements/things you'd like to have, in order of importance:
Single Codebase (or at least sharing 90+% of code) for Android and iOS, e.g. through Xamarin or something similar.
Automatically choose the best (perhaps going down a list of preference) signal to use, e.g. choosing WiFi direct or bluetooth (similar to AllJoyn, Multipeer)
Use only Free (or free for certain classes of user) libraries
The Question:
How to achieve the desired functionality?
Sub-question 1
Is it even possible?
Answer: YES. Apps like Firechat and Spaceteam do it, therefore it must be possible.
Rejected Possibilities:
Multipeer: iOS only, doesn't achieve Cross-Platform.
Alljoyn: iOS bindings are Objective-C only, doesn't achieve Single Codebase.
Mono.Zeroconf: Supposedly would require separate platform implementations, so don't achieve Single Codebase?
Open Garden SDK: Would be a great solution, except it doesn't actually exist yet.
I've been researching this topic for several days now, and I haven't been able to find a definitive answer. Part of it is probably that people use so many different terms like mesh networking, ad-hoc networking, zeroconf, DNS-SD, etc., which makes it difficult to search.
If you're interested in some of the research I did on stackoverflow and elsewhere, here are some notes and links (I'm limited in the number of links I put directly in this post).
Not sure if this is what you are looking for but I would highly recommend Xamarin with the library ZeroConf which is native and has Xamarin support.
https://github.com/onovotny/Zeroconf
It works great and that gets you close to your unified codebase with a native and uniform way of discovering other ZeroConf devices.
Edit: It looks like the ZeroConf library only supports subscribing to ZeroConf services and not publishing also and I think you will need publishing as well. But it seems other users have requested it so it seems like a feature they will be adding.

Use google-api-java-client for non-Google API purposes

I used to do all XML with XStream, but now due to deprecation I'm forced to switch to JSON for two APIs, one of which is a Google API. Since there's this google-api-java-client that should work well on Android and allows to do this in a record number of very few lines of code, I'm probably going to use this.
Yaniv's Google I/O 2011 presentation is still ringing in my ear:
This library is basically designed for any API on the Web. ... Why would you want to use a different library with one vendor, and a different library for another vendor? Ideally, you'd like a library that would work with pretty much any API and have a consistent experience.
True. So here's my question: How can I reuse parts of this library for similar but non-Google APIs and make my life easier? Does anyone have any experience with this, or code samples?
The other API uses JSON. I'm talking about very simple REST calls that anonymously get data (i.e. no API keys or OAuth). No advanced stuff. I'd be happy to build my own model classes and of course realize they'd not be available. I'm probably an intermediate level developer when it comes to REST. I'll be using two different transport methods, and two different JSON parsers, based on Android SDK level.
Edit: Yup, implementing the client for the Google API was a breeze, except for wrestling with the new quota limits.
It's hard to say which components you can reuse and how you can reuse without having seen the API :)
I'd probably start by pointing the client directly at the new API and inspecting what breaks. If after digging around with the debugger the problems do not look too bad, I'd tweak the client as necessary.
However, if you're really just reading from a simple rest API, you may not find a whole lot of benefit from attempting to reuse the Google client. An HTTP client combined with a JSON parser like Jackson may be sufficient and less complex.
~~Jenny

Do android developers commonly use 3rd-party UI/networking libraries like Three20 on iPhone?

I've done plenty of iPhone work, never anything with Android. On iPhone, it was a few months in before I discovered the Three20 library (which is awesome) and began moving my code over. I don't want to make the same mistakes moving to Android, so my question:
Do android developers commonly use 3rd-party UI/networking libraries like Three20 on iPhone, or do they take the ones out of the box? I realize that there is an effort to port Three20 to Android, but that's not my goal per se. I just want to know if the out-of-the-box UI/networking/navigation libs you get with android are considered sufficient for most android apps.
Thanks!
I never had a problem using the ones out of the box.
Perhaps, as Pentium10 mentioned on a comment, I read some open-source code and get some ideas but the final answer to your question is no.

Categories

Resources