Re: [android-developers] Re: Application permissions

2014-05-07 Thread luixal
Hi,

Just found this group, quite old, but I'll ask it anyway:

I was thinking on starting a simple open source MDM platform (server side + 
app, not a custom firmware) as I found none. For that, I would need some of 
the signature and signatureOrSystem permissions.

So... is there no way of doing it? How does comercial MDM providers 
(AirWatch or XenMobile, for example) use this permissions?

Thanks!

PS: By the way, if anyone knows an opensource MDM platform would be great 
to know about it!

On Sunday, August 29, 2010 6:41:01 PM UTC+2, Mark Murphy wrote:

 On Sun, Aug 29, 2010 at 12:18 PM, Tez earlen...@gmail.com javascript: 
 wrote:
  how do u do that?

 You either work for a device manufacturer, or you compile and sign
 your own firmware.

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
 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
--- 
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/d/optout.


Re: [android-developers] Re: Application permissions

2014-05-07 Thread Nikolay Elenkov
On Wed, May 7, 2014 at 5:44 PM, luixal lui...@gmail.com wrote:


 I was thinking on starting a simple open source MDM platform (server side +
 app, not a custom firmware) as I found none. For that, I would need some of
 the signature and signatureOrSystem permissions.

 So... is there no way of doing it? How does comercial MDM providers
 (AirWatch or XenMobile, for example) use this permissions?


Look at DevicePolicyManager:

https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html

-- 
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/d/optout.


[android-developers] In App Purchasing Amazon

2014-05-07 Thread Pinkesh Gupta
I am newbie to Amazon In-App Purchasing. Recently i am done with the Amazon
In App Purchasing With Amazon Test Client

with json containing data as below: {
com.amazon.sample.iap.consumable.orange : { itemType: CONSUMABLE,
price: 10.00, title: Orange, description: An orange } }

Means I am able to retreive data and able to purchase also with the above
json data placed in the sd card of my device with Amazon Test Client.

The client code which i used for purchasing is as follows: public class
MainActivity extends Activity implements AppPurchasingObserverListener {

// Wrapper around SharedPreferences to save request state
// and purchase receipt data
private PurchaseDataStorage purchaseDataStorage;

/**
 * Setup IAP SDK and other UI related objects specific to this sample
 * application.
 */
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setupApplicationSpecificOnCreate();

setupIAPOnCreate();
}

/**
 * Setup for IAP SDK called from onCreate. Sets up
 * {@link PurchaseDataStorage} for storing purchase receipt data,
 * {@link AppPurchasingObserver} for listening to IAP API callbacks and sets
 * up this activity as a {@link AppPurchasingObserverListener} to listen for
 * callbacks from the {@link AppPurchasingObserver}.
 */
private void setupIAPOnCreate() {
purchaseDataStorage = new PurchaseDataStorage(this);

AppPurchasingObserver purchasingObserver = new AppPurchasingObserver(
this, purchaseDataStorage);
purchasingObserver.setListener(this);

Log.i(TAG, onCreate: registering AppPurchasingObserver);
PurchasingManager.registerObserver(purchasingObserver);
}

/**
 * Calls {@link PurchasingManager#initiateGetUserIdRequest()} to get current
 * userId and {@link PurchasingManager#initiateItemDataRequest(Set)} with
 * the list of SKUs to verify the SKUs are valid in the Appstore.
 */
@Override
protected void onResume() {
super.onResume();

Log.i(TAG, onResume: call initiateGetUserIdRequest);
PurchasingManager.initiateGetUserIdRequest();

Log.i(TAG,
onResume: call initiateItemDataRequest for skus: 
+ MySKU.getAll());
PurchasingManager.initiateItemDataRequest(MySKU.getAll());
}

/**
 * Click handler called when user clicks button to buy an orange consumable.
 * This method calls
 * {@link PurchasingManager#initiatePurchaseRequest(String)} with the SKU
 * for the orange consumable.
 */
public void onBuyOrangeClick(View view) {
String requestId = PurchasingManager
.initiatePurchaseRequest(MySKU.ORANGE.getSku());
PurchaseData purchaseData = purchaseDataStorage
.newPurchaseData(requestId);
Log.i(TAG, onBuyOrangeClick: requestId ( + requestId
+ ) requestState ( + purchaseData.getRequestState() + ));
}

/**
 * Click handler called when user clicks button to eat an orange consumable.
 */
public void onEatOrangeClick(View view) {
String sku = MySKU.ORANGE.getSku();

SKUData skuData = purchaseDataStorage.getSKUData(sku);
Log.i(TAG, onEatOrangeClick: consuming 1 orange);
skuData.consume(1);
purchaseDataStorage.saveSKUData(skuData);

updateOrangesInView(skuData.getHaveQuantity(),
skuData.getConsumedQuantity());
}
/**
 * Callback for a successful get user id response
 * {@link GetUserIdResponseStatus#SUCCESSFUL}.
 *
 * In this sample app, if the user changed from the previously stored user,
 * this method updates the display based on purchase data stored for the
 * user in SharedPreferences.  The orange consumable is fulfilled
 * if a stored purchase token was found to NOT be fulfilled or if the SKU
 * should be fulfilled.
 *
 * @param userId
 *returned from {@link GetUserIdResponse#getUserId()}.
 * @param userChanged
 *- whether user changed from previously stored user.
 */
@Override
public void onGetUserIdResponseSuccessful(String userId, boolean
userChanged) {
Log.i(TAG,
onGetUserIdResponseSuccessful: update display based on current
userId);

SetString requestIds = purchaseDataStorage.getAllRequestIds();
Log.i(TAG, onGetUserIdResponseSuccessful: ( + requestIds.size()
+ ) saved requestIds);
for (String requestId : requestIds) {
PurchaseData purchaseData = purchaseDataStorage
.getPurchaseData(requestId);
if (purchaseData == null) {
Log.i(TAG,
onGetUserIdResponseSuccessful: could NOT find
purchaseData for requestId (
+ requestId + ), skipping);
continue;
}
if (purchaseDataStorage.isRequestStateSent(requestId)) {
Log.i(TAG,
onGetUserIdResponseSuccessful: have not received
purchase response for requestId still in SENT status: requestId (
+ requestId + ), skipping);
continue;
}

Log.d(TAG, onGetUserIdResponseSuccessful: requestId ( + 

Re: [android-developers] In App Purchasing Amazon

2014-05-07 Thread TreKing
On Wed, May 7, 2014 at 1:54 PM, Pinkesh Gupta pinkeshgup...@gmail.comwrote:

 Can somebody help me regarding in app purchasing on amazon on production.


I'd suggest you try Amazon's own forums to get better help.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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/d/optout.


[android-developers] the bind value at index 1 is null

2014-05-07 Thread Nathan
OK, here is a mystery exception 

I can't even tell if it is even in my code, but with 429 reports on 
Crashlytics, I should at least investigate. 

So possibly, a string argument to SQLite is null. But where?
I don't recognize com.google.kzm.*. Is it some obscured code of Google 
Analytics?

Nathan

java.lang.IllegalArgumentException: the bind value at index 1 is null
   at 
android.database.sqlite.SQLiteProgram.bindString(SQLiteProgram.java:164)
   at 
android.database.sqlite.SQLiteProgram.bindAllArgsAsStrings(SQLiteProgram.java:200)
   at 
android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:47)
   at 
android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1314)
   at 
android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1161)
   at 
android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1032)
   at 
android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1200)
   at com.google.kzm.i.a()
   at com.google.kzm.g.a()
   at com.google.kzm.g.a()
   at com.google.kzm.h.run()
   at java.lang.Thread.run(Thread.java:856)

-- 
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/d/optout.


[android-developers] Is it possible to run Android emulator inside a VM?

2014-05-07 Thread Charles


Summary: Does the Android emulator work inside a VM? Or must it be run on a 
bare metal machine?


I am trying to setup some automated tests using Jenkins using the Android 
plugin. The slave is a VM (on top) of VMWare ESXi, running Ubuntu Linux (32 bit 
x86). When the emulator tries to start the VM, it shows an error Failed to 
Initialize backend EGL display and nothing happens.


[android] Using Android SDK: /home/hudson/hudson/tools/android-sdk
[android] Creating Android AVD: 
/home/hudson/.android/avd/hudson_en-US_160_1080x1920_android-19_armeabi-v7a.avd


[android] /home/hudson/hudson/tools/android-sdk/tools/android create avd -f -a 
-s 1080x1920 -n hudson_en-US_160_1080x1920_android-19_armeabi-v7a -t android-19 
--abi x86

[android] Setting hardware properties:
hw.ramSize: 768
vm.heapSize: 64


$ /home/hudson/hudson/tools/android-sdk/platform-tools/adb start-server


$ /home/hudson/hudson/tools/android-sdk/tools/emulator -snapshot-list 
-no-window -avd hudson_en-US_160_1080x1920_android-19_x86

[android] Starting Android emulator and creating initial snapshot
$ /home/hudson/hudson/tools/android-sdk/tools/emulator -no-boot-anim -ports 
45507,44892 -prop persist.sys.language=en -prop persist.sys.country=US -avd 
hudson_en-US_160_1080x1920_android-19_x86 -no-snapshot-load -no-snapshot-save 
-wipe-data -no-window -noaudio -gpu off

* daemon not running. starting it now on port 39784 *
* daemon started successfully *

Failed to Initialize backend EGL display

...

emulator: WARNING: Could not initialize OpenglES emulation, using software 
renderer.


I tried with different abi (x86|armeabi-v7a) and options (combinations of 
-noaudio -gpu off). All failing. I also tried to login to the console and 
launch the emulator manually. All I see is a black emulator window. The 
emulator process is actively running ('top' command), but I don't see the home 
screen.


Thanks,

Charles

-- 
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/d/optout.


[android-developers] Does the Android emulator run inside a VM?

2014-05-07 Thread Charles
Summary: Does the Android emulator run inside a VM? Or must it be run on a 
bare metal machine?

I am trying to setup some automated tests using Jenkins using the Android 
plugin. The slave is a VM (on top) of VMWare ESXi, running Ubuntu Linux (32 
bit x86). When the emulator tries to start the VM, it shows an error 
Failed to Initialize backend EGL display and nothing happens.

[android] Using Android SDK: /home/hudson/hudson/tools/android-sdk

[android] Creating Android AVD: 
/home/hudson/.android/avd/hudson_en-US_160_1080x1920_android-19_x86.avd

[android] /home/hudson/hudson/tools/android-sdk/tools/android create avd -f 
-a -s 1080x1920 -n hudson_en-US_160_1080x1920_android-19_x86 -t android-19 
--abi x86
[android] Setting hardware properties:
hw.ramSize: 768
vm.heapSize: 64

$ /home/hudson/hudson/tools/android-sdk/platform-tools/adb start-server

$ /home/hudson/hudson/tools/android-sdk/tools/emulator -snapshot-list 
-no-window -avd hudson_en-US_160_1080x1920_android-19_x86
[android] Starting Android emulator and creating initial snapshot
$ /home/hudson/hudson/tools/android-sdk/tools/emulator -no-boot-anim -ports 
45507,44892 -prop persist.sys.language=en -prop persist.sys.country=US -avd 
hudson_en-US_160_1080x1920_android-19_x86 -no-snapshot-load 
-no-snapshot-save -wipe-data -no-window -noaudio -gpu off
* daemon not running. starting it now on port 39784 *
* daemon started successfully *
Failed to Initialize backend EGL display
...
emulator: WARNING: Could not initialize OpenglES emulation, using software 
renderer.

I tried with different abi (x86|x86) and options (combinations of -noaudio 
-gpu off). All failing. I also tried to login to the console and launch the 
emulator manually. All I see is a black emulator window. The emulator 
process is actively running ('top' command), but I don't see the home 
screen.

Thanks,
Charles

-- 
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/d/optout.