[android-developers] Is there any permission control on the sender of INSTALL_REFERRER?

2014-01-21 Thread posaidong
Hello,

My APP will use action com.android.vending.INSTALL_REFERRER for install 
referrer tracking, but seems that I can easily write an small APP to 
broadcast intent with this action. 
Intent testIntent = new 
Intent(com.android.vending.INSTALL_REFERRER);
testIntent.putExtra(referrer, 
utm_content={\TEST_BOOLEAN\:true});
sendBroadcast(testIntent);

My question is that whether Android has any permission control on 
the sender of com.android.vending.INSTALL_REFERRER?

Thanks.
Br,
posaidong


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] How will Android uninstall updates for a system app?

2012-06-29 Thread posaidong
Hello Android,

We have developed an APP and will be pre-installed as a system APP in some 
devices. So I have done a lot of tests about upgrade and downgrade, about 
how they load libraries and how they save data. Now I have a question about 
uninstall updates.
My test is based on Android 4.0 emulator and steps are:
1, Put MyApp_v1.0.apk in /system/app, put necessary libraries in 
/system/lib. Then MyApp is installed as a system APP.
2, Use command: adb install -r MyApp_v2.0.apk, to upgrade the APP. It's 
successful, and all the data in /data/data/MyApp are kept unchanged, 
further more, the new libraries in MyApp_v2.0.apk are installed in 
/data/data/MyApp/lib.
3, Go to System Setting - App - Manage Application, select MyApp, Tap 
Uninstall Updates, to downgrade it to the system APP MyApp_v1.0. It's 
suecessful.

But I find in Step 3, when I uninstall updates, the data in 
/data/data/MyApp are still there, only change is that, the 
/data/data/MyApp/lib fold gets emptied. That's a little bit of strange to 
me. My questions are:
1, I have checked different versions(2.1, 2.3.3, 4.0.1) of Android source 
code, in PackageManagerServce.java, follow the call flow of 
deleteSystemPackageLI(), the package data folder should be deleted in 
function removePackageDataLI(), mInstaller.remove(packageName, 0);
Why the test result is different as expected?

2, If the behavior - keeping the data unchanged when uninstalling updates, 
is as designed, that maybe cause some problems. Imaging I add some new 
configuration item, or change the configuration structure in the new 
version, after downgrade to old version, this new configuration will not be 
recognized by the pre-installed system APP. The result is unknown.

So can you take a look and explain? Please correct me if my understanding 
is wrong. 
Thank you.

Cruise


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Uninstall Updates functionality

2012-06-29 Thread posaidong
Hi Dianne,

I have a question about that. When uninstall updates for a pre-installed 
APP, will system remove the /data/data/package-name/  folder?

I have read a little code about the install, seems system will remove it 
and re-install the APK in /system/app. Just want to confirm. 
Thanks.

Cruise

在 2010年7月7日星期三UTC+8上午3时36分07秒,Dianne Hackborn写道:

 Yep this is to remove an update to a pre-installed app.  This has been in 
 the platform since 1.6.

 On Tue, Jul 6, 2010 at 3:23 AM, Mark Murphy mmur...@commonsware.comwrote:

 On Tue, Jul 6, 2010 at 6:15 AM, Mark Carter mjc1...@googlemail.com 
 wrote:
  I noticed that (on Froyo) when viewing Google Maps using the Market
  app (or going through Manage Applications), there is a button to
  Uninstall Updates. I haven't seen this for any other app (but I
  haven't looked that hard either).

 If I had to guess, this is because Maps comes on the firmware and can
 be updated via the Market. They label it Uninstall Updates because
 removing the Market package would result in you still having the Maps
 app, just back to the firmware edition.

  Is this functionality available to the rest of us devs?

 If you ship as part of phone firmware, presumably yes. For example,
 the device manufacturer might ship 1.0 of your app but tell you to
 push updates via the Market for 1.1, 1.1b, System 3000, Mark V, and
 1.1c of your app.

 Note, though, that this is an educated guess, based on a few
 conversations, with only a passing resemblance to absolute assurance.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _Android Programming Tutorials_ Version 2.8 Available!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 -- 
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to 
 provide private support, and so won't reply to such e-mails.  All such 
 questions should be posted on public forums, where I and others can see and 
 answer them.



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en