Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
IAmKale
Jun 7, 2007

やらないか

Fun Shoe
Does anyone have any insight on libGDX? I'm going to try and make my first ever mobile game and it seems to be a pretty popular engine outside of things like Gamemaker. The fact that I can code in Java is nice - I don't know C++ so a lot of the other engines are out of my league.

Adbot
ADBOT LOVES YOU

Angryhead
Apr 4, 2009

Don't call my name
Don't call my name
Alejandro




LibGDX is great! I haven't done anything really resource-intensive with it but I've been using it for about a year and a half now, actually using it to build a mobile game for a work project right now.

Jo
Jan 24, 2005

:allears:
Soiled Meat

Karthe posted:

Good stuff.

Thank you both for posting. This is stupendously helpful. I'm not sure why I wasn't able to piece together how things were supposed to fit together before, and I'm sure I'll be looking back at both your replies for reference.

You guys are awesome.
:3:

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Has anyone else dealt much with the Bluetooth low energy APIs in 4.3 and 4.4? I just want someone else to share my pain with--dear god, these APIs are complete garbage. Google should be ashamed of how buggy and terrible the BTLE support is.

TheReverend
Jun 21, 2005

In my experience that's the essence of bluetooth no matter the flavor.

zeekner
Jul 14, 2007

BLE on android is a special type of terrible. I spent hours trying to get a consistent connection with both the official sample project and a TI example app, nothing worked more than once in a rare while. I had to physically reboot the phone to regain connection. That was with an N4, I've heard the N5 works better but gently caress that noise.

Jo
Jan 24, 2005

:allears:
Soiled Meat

Karthe posted:

Does anyone have any insight on libGDX? I'm going to try and make my first ever mobile game and it seems to be a pretty popular engine outside of things like Gamemaker. The fact that I can code in Java is nice - I don't know C++ so a lot of the other engines are out of my league.

I used libGDX for a few projects. It's my only exposure to Android development.

The good:

* Quite nice to be able to play your game on the PC and not have to push to an emulator or device every build.
* Reasonably flexible in terms of what you can target. I think OpenGL 2+ is disabled by default, so be sure to update the project main files if you want to use non-power-of-two textures.
* The handlers for files make it really convenient, but don't forget to refresh your directory in Eclipse if you want changes to show up.

The bad:

* There seem to be a lot of ways to accomplish the same task, and they're not all interoperable. It wasn't clear to me at the get go if I should be using a Scene2D or subclassing something.
* Pain in the rear end to set up. Their setup ui tool makes this a ton easier. You absolutely must use it. Still feels quite tired to Eclipse.

Literally Elvis
Oct 21, 2013

I've updated the simple color generation app I had mentioned earlier to have a cleaner UI and to implement some features people had suggested. Can I maybe get a code review on it? (source)

That one file is basically the entire program. I previously had a separate class file for color generation, but it was so simple, I felt like I was overcomplicating things. That said, I feel like stuff like this:

code:
private void labelsInvisible()
    {
        TextView RGBinfo = (TextView) findViewById(R.id.RGBinfo);
        TextView HexInfo = (TextView) findViewById(R.id.HexInfo);
        TextView HSVinfo = (TextView) findViewById(R.id.HSVinfo);

        RGBinfo.setVisibility(View.INVISIBLE);
        HexInfo.setVisibility(View.INVISIBLE);
        HSVinfo.setVisibility(View.INVISIBLE);
    }
is not the right way to do what I'm trying to do, and possibly overly resource intensive. So I'd like to learn how to do this stuff the right way before I develop any bad habits. (I tried declaring those initially below my other MainActivity variables, but it didn't seem to work)

Sorry in advance if this is the wrong thread to post stuff like this, I didn't see anything more relevant.

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Anyone have experience with a deferred or promise library like JDeferred? I'd like to hide a lot of the callback ugliness of BTLE code with deferred objects--i.e. something similar to JQuery and javascript style development. Curious if there's any defacto or best library out there.

kitten smoothie
Dec 29, 2001

Literally Elvis posted:

(I tried declaring those initially below my other MainActivity variables, but it didn't seem to work)

You declared them, but where did you actually initialize them? Should've worked if you declared them as instance variables and then initialized them in onCreate().

kitten smoothie
Dec 29, 2001

One more point, sorry for the double post:

I see you used some of the boilerplate from Android Studio's code generation for Activities, which sets up a Fragment for you, but then you've implemented all your logic and views in MainActivity instead. You've still got this in the onCreate(), and the generated PlaceholderFragment class is defined at the bottom.

code:
if (savedInstanceState == null) {
            getFragmentManager().beginTransaction()
                    .add(R.id.container, new PlaceholderFragment())
                    .commit();
        }
I'm actually kind of surprised it still works with this there, given your top-level RelativeLayout with all your other UI elements is the one with id "container." I would've assumed this would've caused problems.

It seems like the new party line from Google these days is that you should use Fragments for your UI and have the Activity be just dumb shells to host them, because as you start making more complicated interfaces and supporting phones and tablets it makes it easier to deal with. So it's a good idea to learn how to work with Fragments properly, but for something this simple it probably doesn't matter that much - however, you'll just want to get rid of the Fragment related code.

kitten smoothie fucked around with this message at 14:25 on Apr 2, 2014

Literally Elvis
Oct 21, 2013

kittensmoothie posted:

:words:

Thanks a bunch for your input. I'll try to properly implement Fragments and definitely look into the variable initialization thing. :)

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Anyone done much with RxJava and Android? Curious for any thoughts on using it to make async stuff a little easier to follow.

evilentity
Jun 25, 2010

Jo posted:

I used libGDX for a few projects. It's my only exposure to Android development.

The good:

* Quite nice to be able to play your game on the PC and not have to push to an emulator or device every build.
* Reasonably flexible in terms of what you can target. I think OpenGL 2+ is disabled by default, so be sure to update the project main files if you want to use non-power-of-two textures.
* The handlers for files make it really convenient, but don't forget to refresh your directory in Eclipse if you want changes to show up.

The bad:

* There seem to be a lot of ways to accomplish the same task, and they're not all interoperable. It wasn't clear to me at the get go if I should be using a Scene2D or subclassing something.
* Pain in the rear end to set up. Their setup ui tool makes this a ton easier. You absolutely must use it. Still feels quite tired to Eclipse.

LibGDX is pretty fun. Its important to understand thats its not an engine, but a framework. A lot of stuff is quite low level when compared to Unity or something.

Some recent changed include removal of OpenGL ES 1.0, 2.0 is the default. They also migrated to gradle few days ago. Setting up a project is very easy now.

GorgeOnMySyphilis
Mar 3, 2012

Anyone care to share their experiences in marketing and promoting their apps? I've been lurking for a while and am interested in what techniques people use to get the word out once projects are completed and ready for distribution.

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.
I posted this in the General Programming thread but didn't get any feedback.

I've got an opportunity to take a piece of Android/iOS contract work doing a "walking tour" app. The idea is to have the app use the phone's GPS to place the user on a map as they tour a city, show videos at specific locations, and return to the map screen after the videos play out or the people leave the area.

This seems fairly straightforward to me, but I'm really at a loss for producing an estimate or quote, since I'm new at mobile (and also at producing quotes).

Any thoughts?

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Newf posted:

I posted this in the General Programming thread but didn't get any feedback.

I've got an opportunity to take a piece of Android/iOS contract work doing a "walking tour" app. The idea is to have the app use the phone's GPS to place the user on a map as they tour a city, show videos at specific locations, and return to the map screen after the videos play out or the people leave the area.

This seems fairly straightforward to me, but I'm really at a loss for producing an estimate or quote, since I'm new at mobile (and also at producing quotes).

Any thoughts?

There's no great answer to give, because there are a lot of variables here.

- How long do you realistically expect this to take? Have you done anything like this before?
- How will you be showing the videos? Will you just be opening YouTube at the appropriate time, or is your app going to handle this? Streaming video can be surprisingly non-trivial if you want it to be robust.
- What kind of experience do you have? Do you have other applications published, that you can refer to as prior experience?
- How will you be displaying the map? As an aside, if you're going to use the Google Maps interface, it's only free as long as the app is non-commercial if I recall. If the app owner will be selling it, they'll have to negotiate a rate. You should not pay this if you are not the owner.
- How much effort are you going to actually put into this looking good? Are you going to hard-lock this to portrait and say "Eh, good enough" and test against a couple devices, or do you plan on trying to make this a good experience for all users on all form factors?

Literally Elvis
Oct 21, 2013

This is bananas: The #1 New Paid App In The Play Store Costs $4, Has Over 10,000 Downloads, A 4.7-Star Rating... And It's A Total Scam

I know it's Android Police, but still:
code:
package com.deviant.security.shield.utility;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.NotificationCompat.Builder;
import com.deviant.security.shield.R;

public class NotificationHelper {
    private int NOTIFICATION_ID;
    private Builder mBuilder;
    private PendingIntent mContentIntent;
    private CharSequence mContentTitle;
    private Context mContext;
    private Notification mNotification;
    private NotificationManager mNotificationManager;

    public NotificationHelper(Context context) {
        this.NOTIFICATION_ID = 1;
        this.mContext = context;
    }

    public void createNotification() {
        this.mNotificationManager = (NotificationManager) this.mContext.getSystemService("notification");
        this.mBuilder = new Builder(this.mContext);
        this.mBuilder.setContentTitle("Scan in progress").setContentText("Scanning for malicious content").setSmallIcon(R.drawable.shield_notification);
        this.mBuilder.setContentInfo("0%");
        this.mContentIntent = PendingIntent.getActivity(this.mContext, 0, new Intent(), 0);
        this.mBuilder.setContentIntent(this.mContentIntent);
        new Thread(new Runnable() {
            public void run() {
                int incr = 0;
                while (incr <= 100) {
                    NotificationHelper.this.mBuilder.setContentInfo(incr + "%");
                    NotificationHelper.this.mBuilder.setProgress(100, incr, false);
                    NotificationHelper.this.mNotificationManager.notify(NotificationHelper.this.NOTIFICATION_ID, NotificationHelper.this.mBuilder.build());
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    incr++;
                }
                NotificationHelper.this.mBuilder.setContentTitle("Scan complete");
                NotificationHelper.this.mBuilder.setContentText("Your device is secure");
                NotificationHelper.this.mBuilder.setProgress(0, 0, false);
                NotificationHelper.this.mNotificationManager.notify(NotificationHelper.this.NOTIFICATION_ID, NotificationHelper.this.mBuilder.build());
            }
        }).start();
    }
}

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.

Volmarias posted:

- How long do you realistically expect this to take? Have you done anything like this before?
Aiming for a launch date in July, with a 'pilot' deliverable in June. How much time / red tape should one expect for submitting an app to the Play store and the App store?

quote:

- How will you be showing the videos? Will you just be opening YouTube at the appropriate time, or is your app going to handle this? Streaming video can be surprisingly non-trivial if you want it to be robust.
Video display is intended to be in-app. Is there a reason the video files themselves can't just be part of the app install? Then they could play locally. We're talking about 12-15 videos in the range of 45-60 seconds.

quote:

- What kind of experience do you have? Do you have other applications published, that you can refer to as prior experience?
I've done 'hello world' on android, and less than that on iOS.

quote:

- How will you be displaying the map? As an aside, if you're going to use the Google Maps interface, it's only free as long as the app is non-commercial if I recall. If the app owner will be selling it, they'll have to negotiate a rate. You should not pay this if you are not the owner.
The app will be free.

quote:

- How much effort are you going to actually put into this looking good? Are you going to hard-lock this to portrait and say "Eh, good enough" and test against a couple devices, or do you plan on trying to make this a good experience for all users on all form factors?
Goal is to have it presentable from hand-helds up to tablets.


I'm really at a loss for figuring out any estimates. I don't mind making a low wage on the project (I need work, and I need ~*experience*~), but I don't want to give a quote that ends up paying me two bucks per hour.

zeekner
Jul 14, 2007

I hate to say it, but you are probably in for a world of pain.

Newf posted:

Aiming for a launch date in July, with a 'pilot' deliverable in June. How much time / red tape should one expect for submitting an app to the Play store and the App store?
No red tape for play store, 3-7 day reviews for app store.

Newf posted:

Video display is intended to be in-app. Is there a reason the video files themselves can't just be part of the app install? Then they could play locally. We're talking about 12-15 videos in the range of 45-60 seconds.
An app over 50mb is possible, but harder to recommend. If streaming is an option, I would look into that before you settle for inflating the download size. Local files are a lot easier, though.

Newf posted:

I've done 'hello world' on android, and less than that on iOS.

The app will be free.

Goal is to have it presentable from hand-helds up to tablets.
Going from a fresh newbie to a presentable project is a long and painful process. good luck

Newf posted:


I'm really at a loss for figuring out any estimates. I don't mind making a low wage on the project (I need work, and I need ~*experience*~), but I don't want to give a quote that ends up paying me two bucks per hour.
If you are quoting a flat fee and you have no idea what it will take to accomplish it, you will end up well under minimum wage. Try to negotiate hourly billing, even if you have to quote a rather low rate. It doesn't sound like you are in that great of a position to begin with.

evilentity
Jun 25, 2010
Do you have some java/programming experience?
On Android side, free app is 20$ for dev license. You can add few gigs as an extra to your app, should be fine for some videos. You probably should read the license for maps. Supporting various devices is more work on android.
As for ios side, its 100$ per year + devices and mac for dev.
Should be doable by june, at least the android part. Add all the costs, salary for few months and multiply by 3 or something.

ctz
Feb 6, 2003

mod sassinator posted:

Has anyone else dealt much with the Bluetooth low energy APIs in 4.3 and 4.4? I just want someone else to share my pain with--dear god, these APIs are complete garbage. Google should be ashamed of how buggy and terrible the BTLE support is.

The APIs are pretty close to the bluetooth HCI. But they're really far too low level to be useful. You'll want to build your own abstractions on top.

The Bluetooth drivers/firmware/whatever that LG put in the Nexus 4 and 5 seem to be complete garbage. I've had reasonable results with BLE on the Moto G and S4, though. It still sucks dramatically compared to BLE on iOS.

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.
I really appreciate this input folks.

quote:

world of pain

... the character building kind of pain?

quote:

An app over 50mb is possible, but harder to recommend. If streaming is an option, I would look into that before you settle for inflating the download size. Local files are a lot easier, though.

Why not just front load the downloading though? The premise of the app is that people will watch all of the videos within an hour or two of installing it - as they complete the tour. If not as part of the install, then maybe app just passively download all of the vids 'in order' of the sites on the tour, and then trigger the playing of the local files when the user is in the relevant location?

quote:

Do you have some java/programming experience?
On Android side, free app is 20$ for dev license. You can add few gigs as an extra to your app, should be fine for some videos. You probably should read the license for maps. Supporting various devices is more work on android.
As for ios side, its 100$ per year + devices and mac for dev.
Should be doable by june, at least the android part. Add all the costs, salary for few months and multiply by 3 or something.

Yeah, I'm pretty competent in Java and .Net/C#. Haven't touched Objective C at all, but hell, it's just another modern C style language?

Uh, ($120 in licenses, $600 for a Mac mini, $5000 for me) x 3 = $17160. That seems utterly insane to me, and I'll probably pitch something closer to 5k? That would keep me from starving to death!



Another note on google maps - I'm a reasonably competent math-guy. I don't think I'd have trouble doing some georeferencing on the map itself and getting an icon on there as long as I'm able to get some lat/long information from the phones. Is that crazy?

(Not sure if I've been clear that the map supplied for this will be an artist's rendering - it'll be roughly accurate, but not 100% to scale).

zeekner
Jul 14, 2007

Newf posted:

... the character building kind of pain?

Maybe, but painful nonetheless.

You really need to be careful committing to two completely different platforms, especially if you have little experience in either. ObjC is a reasonably modern C, but it can be pretty jarring coming from a java/c# background. Android uses pretty modern Java as well, in that you aren't hamstrung by a lot of the java 1.4 era stuff you see in other Java-based platforms. You'll probably have a much easier time with the Android app, but don't discount the fact you'll still need to learn quite a lot to get to a finished product. That price estimate might work for just Android, albeit still low, but doing both platforms for that price is really questionable.

Loading videos in the background as they go around sounds like a good compromise. If this is intended for a specific museum, then they can provide wifi to make this easier for users. It's a shame that downloads on cellular are still quite painful even in TYOOL2014.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Uncomfortable Gaze posted:

Maybe, but painful nonetheless.

You really need to be careful committing to two completely different platforms, especially if you have little experience in either. ObjC is a reasonably modern C, but it can be pretty jarring coming from a java/c# background. Android uses pretty modern Java as well, in that you aren't hamstrung by a lot of the java 1.4 era stuff you see in other Java-based platforms. You'll probably have a much easier time with the Android app, but don't discount the fact you'll still need to learn quite a lot to get to a finished product. That price estimate might work for just Android, albeit still low, but doing both platforms for that price is really questionable.

Loading videos in the background as they go around sounds like a good compromise. If this is intended for a specific museum, then they can provide wifi to make this easier for users. It's a shame that downloads on cellular are still quite painful even in TYOOL2014.

All of this. You actually probably ought to bundle the videos with the app if the expectation is that the user will view all of them, and for a short period. They can use WiFi to download the app and know the cost ahead of time in data.

Don't forget that some people still have data limits, which is why I'd recommend against streaming. The reason I suggested it in the first place is that users on older devices might have limited space available, so streaming allows them to save space.

If you're new to android, your app is going to look awful, mostly because you don't know what to watch out for. You probably aren't used to using fragments, but you'll probably only have one activity anyway so it's probably not a big deal.

I'd strongly recommend finding a video playback library that will give you a nice wrapper around the media player libraries, so that you don't waste a lot of time on that.

Agreeing that you should charge hourly if possible.

Another thing to ask: are you going to work on this full time, or do you have another job or school? If you devote all of your time to this, it might be reasonable to come from zero experience to making something decent on both platforms, but if you can't devote a lot of time you might want to commit to one platform only first. I'd recommend iOS since that's going to be easier to come to grips with multiple form factors and versions until you're used to that.

Doctor w-rw-rw-
Jun 24, 2008

Newf posted:

... the character building kind of pain?
That or you slowly go insane until you have a nervous breakdown and set your career back a couple years. Hi there!

Newf posted:

Yeah, I'm pretty competent in Java and .Net/C#. Haven't touched Objective C at all, but hell, it's just another modern C style language?
Objective-C has more in common with Java than C, but also has its fair share of idiosyncrasies. As a language, it's not hard to get used to. The APIs are always - in my experience - the most important thing to adapt to. Languages are easy. Luckily, iOS APIs are pretty decent. If you can handle Android, you can handle iOS for sure.

Newf posted:

Uh, ($120 in licenses, $600 for a Mac mini, $5000 for me) x 3 = $17160. That seems utterly insane to me, and I'll probably pitch something closer to 5k? That would keep me from starving to death!
$20k sounds pretty reasonable but definitely charge hourly because you will either produce crap, you will fail, or you'll put in so much time making it work that you'll earn that sum and more. Expect unexpected challenges.

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.

Volmarias posted:

All of this. You actually probably ought to bundle the videos with the app if the expectation is that the user will view all of them, and for a short period. They can use WiFi to download the app and know the cost ahead of time in data.

Woo. An idea I had isn't bad.

quote:

Agreeing that you should charge hourly if possible.

How can I command an hourly rate when somewhere between 1/4 and 3/4s of my time will be spent learning things that mobile professionals already know? Do I compartmentalize my 'learning' and my 'dev' time and bill for 'dev', or bill for everything at a lower rate? Honestly a flat fee makes me less nervous and I hate the idea of bookkeeping overhead. I'm not a fantastic bookkeeper.

quote:

Another thing to ask: are you going to work on this full time, or do you have another job or school? If you devote all of your time to this, it might be reasonable to come from zero experience to making something decent on both platforms, but if you can't devote a lot of time you might want to commit to one platform only first. I'd recommend iOS since that's going to be easier to come to grips with multiple form factors and versions until you're used to that.

I'm currently employed, but it's a fragile situation. If I took up this mobile project, I would ditch my current gig to concentrate on it and learn as much as I can about the field. My current gig is as likely as not to evaporate over the same time frame, so it makes sense to me to take the opportunity to diversify my skill-set and +1 my reference count.

The guy who's offering the mobile project is pretty well connected in my town, and he figures that he already knows of at least one other job that could follow this one. I'm really 'into' the prospect of building myself into a self employed contractor, and I think that this job (for this person) could be a step in that direction... ?

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
If you have to do multiplatform I would seriously, seriously consider some sort of cross-platform system like Xamarin, PhoneGap, etc. A couple months to get an app built, tested, and in the store for both platforms is really pushing it IMHO especially if you're starting from square one. The less platform specific stuff you have to write the better. I would get started as soon as possible and work on getting a complete product up for both platforms as soon as possible, then refining it by adding features. I.e. just get a tour guide with map and text working, then start adding video, location awareness, etc. You don't want to be getting one or two weeks away from the deadline and still not have an app that can run and be tested end to end.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Newf posted:

Woo. An idea I had isn't bad.


How can I command an hourly rate when somewhere between 1/4 and 3/4s of my time will be spent learning things that mobile professionals already know? Do I compartmentalize my 'learning' and my 'dev' time and bill for 'dev', or bill for everything at a lower rate? Honestly a flat fee makes me less nervous and I hate the idea of bookkeeping overhead. I'm not a fantastic bookkeeper.


I'm currently employed, but it's a fragile situation. If I took up this mobile project, I would ditch my current gig to concentrate on it and learn as much as I can about the field. My current gig is as likely as not to evaporate over the same time frame, so it makes sense to me to take the opportunity to diversify my skill-set and +1 my reference count.

The guy who's offering the mobile project is pretty well connected in my town, and he figures that he already knows of at least one other job that could follow this one. I'm really 'into' the prospect of building myself into a self employed contractor, and I think that this job (for this person) could be a step in that direction... ?

If this falls through and you don't make anything from it, let alone continued employment with this person, will you be able to survive until you get a new job?

If not, I would strongly recommend against doing this until you have more experience and are more established.

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.

mod sassinator posted:

If you have to do multiplatform I would seriously, seriously consider some sort of cross-platform system like Xamarin

This looks excellent.

Volmarias posted:

If this falls through and you don't make anything from it, let alone continued employment with this person, will you be able to survive until you get a new job?

Wounded pride, but I'll survive.

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
I haven't used it, but have heard very good things about Xamarin. You still apparently need to learn a little about each platform, since Xamarin really just wraps the native APIs. However having the ability to write everything in a language you are familiar with should help a lot.

Tunga
May 7, 2004

Grimey Drawer
I'm looking at using AccountManager with a custom AccountAuthenticator and SyncAdapter to sync some data with a fairly simple REST interface. The server doesn't support HTTPS or auth tokens so I need to send the username/password each time. Should I have #getAuthToken return the password as a kind of fake token, or should I have the SyncAdapter request the password directly (which will be allowed since it's in the same package) and have #getAuthToken throw an UnsupportedOperationException (or similar)? Both of these break the rules somewhat but I feel that the second option is probably the better of the two since it doesn't expose the user's password to other apps. Or is there a better way to handle this?

Kreeblah
May 17, 2004

INSERT QUACK TO CONTINUE


Taco Defender
Has anybody dealt with the CalendarContract API for reading existing calendar data? I'm trying to find all of a user's appointments in the next couple of days, but finding out how long each one is is a real pain in the rear end. For non-recurring events, it's easy. End time minus start time. For recurring ones, though, I'm running into a really weird issue.

Since recurring events don't have a start and end time for a particular instance, I'm making a query against the Instance table. That works fine, but I'm having trouble matching up instances to specific events. With some of them, it works fine, but with others, the event has one ID, but the associated instance's event ID is something completely different, so I can't match it up. Has anybody ever seen this?

tl;dr: I'm trying to match Events._ID to Instances.EVENT_ID, but they're different sometimes and I don't know why.

Edit: I've also checked the ORIGINAL_ID field, but it's coming back as null for this stuff.

Edit 2: Come to think of it, I should probably just be looking at instances to begin with and not worry about the events table. That'd probably be all I need.

Kreeblah fucked around with this message at 06:47 on Apr 14, 2014

Rapner
May 7, 2013


Are there any good resources for learning Android development with Android Studio yet? The closest I've found is the android official develop section, but it's very scant on explanations of a lot of stuff. Also it references ADT but doesn't correspond well at all to ADT itself, so I guess it's rather old.

I'm checking out some of the Udemy tutorials, but they seem to go to the far other end of the spectrum and describe everything in way too much detail, especially the things which are barely relevant.

Edit: This one isn't bad: http://www.raywenderlich.com/56107/make-first-android-app-part-1

Rapner fucked around with this message at 09:55 on Apr 14, 2014

baka kaba
Jul 19, 2003

PLEASE ASK ME, THE SELF-PROFESSED NO #1 PAUL CATTERMOLE FAN IN THE SOMETHING AWFUL S-CLUB 7 MEGATHREAD, TO NAME A SINGLE SONG BY HIS EXCELLENT NU-METAL SIDE PROJECT, SKUA, AND IF I CAN'T PLEASE TELL ME TO
EAT SHIT

ADT is basically Eclipse with some Android bits added in (like the SDK), all the official documentation pretty much applies to it.

Android Studio really works the same way when you have it up and running, at the end of the day it's just a way to write and manage code. I think the biggest differences between AS and ADT (when you're starting out, anyway) are the project folder organisation, which is a little bit different, and Gradle which is a mission in itself. If you can find a good resource to learn that poo poo, you'll be able to follow any dev tutorials and build and deploy your projects.

IntelliJ (which AS is built on) is really nice to use, but ADT with Eclipse is so much easier to get going with. You pretty much just write your code and hit go

Rapner
May 7, 2013


You're right and I agree for the most part, it's just when you're trying to follow a guide step by step it's a lot easier if the terms it uses are valid for the IDE you're using.

zeekner
Jul 14, 2007

Just a heads up: Google IO registration is now open. Signups are open till the 18th, and it's a random drawing instead of the first-come system they had before.

TheReverend
Jun 21, 2005

Uncomfortable Gaze posted:

Just a heads up: Google IO registration is now open. Signups are open till the 18th, and it's a random drawing instead of the first-come system they had before.

I don't see how much it is. It's usually a lot, yeah?

kitten smoothie
Dec 29, 2001

TheReverend posted:

I don't see how much it is. It's usually a lot, yeah?

$900. If you apply for a ticket and are selected, they will automatically charge your credit card.

Adbot
ADBOT LOVES YOU

TheReverend
Jun 21, 2005

kitten smoothie posted:

$900. If you apply for a ticket and are selected, they will automatically charge your credit card.

Oh that's a no brainer then. I'll let my boss know.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply