I'm installing the code snippet found here for the AndroidManifest. And then the subsequent steps here.
I have two, possibly related, questions.
1: Necessary Libraries?
Firstly, I'm concerned that I have the necessary libraries installed. If I put a bogus path in the AndroidManifest file here, Eclipse doesn't complain at all. So to test it, I went into a java file and put:
import com.google.analytics.tracking.android.CampaignTrackingReceiver;
As it turns out, I have that installed via the segment.io library. But what about com.android.vending.INSTALL_REFERRER?
import com.android.vending.INSTALL_REFERRER;
"...cannot be resolved..."
import com.android.vending;
"...resolves to a package...". Does that mean it has the package but not that particular symbol?
import com.android.bogus;
"...cannot be resolved..."
Seems to be the case.
So, what to make of this? The reason I'm worried is that I have had a situation (Apache http libraries) where one .jar file gave the compiler awareness of the import paths, but not the implementation. I had to add another jar file to get that. Of course I find this out when the app crashes. I could just try it out, except that conveniently enough, because of the nature of this feature, this thing only gets triggered after the user has the app installed from the Play store. Yikes.
Looking around, it looks like I would have to install a separate library if I wanted com.android.vending.billing
. Not sure what that says about com.android.vending
.
2: Warning: "Exported receiver does not require permission"
Secondly, I get the warning "Exported receiver does not require permission", highlighting this line:
<receiver android:name="com.google.analytics.tracking.android.CampaignTrackingReceiver" android:exported="true">
Other stackoverflow answers for this haven't helped me yet. On this one, the best I could gather was that maybe the <intent-filter>
should have been deleted, but no.
Making external="false"
fixes it, but as I understand also makes this whole thing useless, since it's triggered from outside the app. Not really sure what to make of this. Is this a security issue?