[android-developers] Authorization Idea
Hello all, I would like to apply authorization on my Android application. Once the user logs in I would like to be able to hide or display the actions/activities according to user's role. For instance; If the user in standard role I do not want to let her to start some activities(also hide the activities). Whereas, if the user is in admin role I do want to let her to start some activities that she is authorized to. In addition to separate activity based authorization, I would like to apply UI changes on the same activity according to the user's role. For example; if the user in standard role, she cannot see Reports button on the activity, but if the user in admin role, she can see the Reports button. I can do this via attaching code inside the real code but I want to separate the concept of authorization from the real code. Is there any attribute for methods or activities in Android that let me define authorization on method and activity level. Any help/example would be appreciated, Regards, jojo --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Extending over Apache License 2.0
Thanks, I will be looking at the about example and contacting the owner of the code. jojo On May 12, 1:55 pm, Zero zeroo...@googlemail.com wrote: the best solution would be to ask the original author of the source you're using how he/she would like to have that. you may also check out OI About,http://openintents.googlecode.com/files/AboutApp-1.0.0.apk which is a comfortable about screen for all kinds of apps and allows easy handling of stuff like that. or you just build your own about/license screen cheers, zero On May 12, 10:41 am, info+farm bilgiciftl...@gmail.com wrote: Dear all, I am going to create an application via improving an existing code which hasApacheLicense 2.0. In the license, it is implied that I need to attach Notice and License files for the previous code while distributing my new application. Where is the best place to put these files, before publishing the new version on Android Market? Regards, jojo --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Errors on Windows 7
Dear all, I installed the brand new Windows 7 RC Ultimate and tried to run Android tools on it. Unfortunately, tools(aapt, emulator ...) do not work on the new OS. aapt.exe give Error; Problem signature: Problem Event Name: APPCRASH Application Name: aapt.exe Application Version: 0.0.0.0 Application Timestamp:49ee9d70 Fault Module Name:ntdll.dll Fault Module Version: 6.1.7100.0 Fault Module Timestamp: 49eeb132 Exception Code: c008 Exception Offset: 00039fef OS Version: 6.1.7100.2.0.0.256.1 Locale ID:1033 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789 emulator.exe gives Error; Problem signature: Problem Event Name: APPCRASH Application Name: emulator.exe Application Version: 0.0.0.0 Application Timestamp:49ee9cd3 Fault Module Name:msvcrt.dll Fault Module Version: 7.0.7100.0 Fault Module Timestamp: 49eeb128 Exception Code: 8003 Exception Offset: 0006d73c OS Version: 6.1.7100.2.0.0.256.1 Locale ID:1033 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789 I just sent this post to inform users that Android tools are not working on Windows 7 RC right now. If there are people, who have the workaround for this, I will be appreciated to hear it. Best, jojo --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Extending over Apache License 2.0
Dear all, I am going to create an application via improving an existing code which has Apache License 2.0. In the license, it is implied that I need to attach Notice and License files for the previous code while distributing my new application. Where is the best place to put these files, before publishing the new version on Android Market? Regards, jojo --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Netbook with Android
Hello all, I am an Android developer and I am going to buy a new netbook for seamless portability. Once I read it is possible to install Android on netbooks as an OS, my eyes started to shine. Therefore, I would like to be able to test my or third party applications on this netbook in the future. Which netbook brand/model will be the best suited(no driver headaches- sdcard, camera...) for upcoming Android OS for netbooks? I am reading a lot of rumors on the net, but I cannot find a baseline. Any idea will be appreciated... Regards, info+farm --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: PendingIntent problem
Thank you for your detailed answer Blake B., First of all I understood that different Extras are not act as a difference on PendingIntent comparison. In the first option assigning a stub data element seems reasonable but I did not like the approach to put not only irrelevant but also not necessary data on each intent call to distinguish them. With the second approach, assigning FLAG_CANCEL_CURRENT flag to the PendingIntent worked well on button calls but did not work on notification calls. I received Sending contentIntent failed: android.app.PendingIntent$CanceledException error in logcat on each different PendingIntent start. I have seen a bug report is made about this issue(#13) on android-astrid. In the issue, it is said that although the javadoc says requestCode is not used, the real OS code consider the value specified there. Then, I used the requestCodes to distinguish the PendingIntent starts. Is it possible to get information from the API builders, what will be the purpose of the requestCode parameter on PendingIntent creation in the future? The reason is I want to be able to sure that my code won't stuck at that time of API change. Regards, info+farm On Mar 25, 5:01 pm, Blake B. bbuckle...@yahoo.com wrote: To correct my previous statement, PendingIntents are cached by the system, not Intents. The note about how to differentiate Intents still holds though, so if you need to replace a current PendingIntent with a new PI that has a new Intent that only differs by its Extras, be sure to use the flag FLAG_CANCEL_CURRENT so that the cached PI is not used. From Intent.filterEquals(o): Returns true if action, data, type, class, and categories are the same. == note does not include Extras From PendingIntents javadoc: * pA PendingIntent itself is simply a reference to a token maintained by * the system describing the original data used to retrieve it. This means * that, even if its owning application's process is killed, the * PendingIntent itself will remain usable from other processes that * have been given it. If the creating application later re-retrieves the * same kind of PendingIntent (same operation, same Intent action, data, * categories, and components, and same flags), it will receive a PendingIntent * representing the same token if that is still valid, and can thus call * {...@link #cancel} to remove it. On Mar 25, 7:48 am, Blake B. bbuckle...@yahoo.com wrote: Intents are cached by the system, and two Intents are not differentiated by their Extras. So your two intents look like the same Intent and the second one is being tossed out. You must differ Intents by their Action/Data/Category. I will sometimes use the Data field to hold a simple ID that is not really a URI to make two intents appear different. Look at the code for Intent.equals() I believe, and you will see that Extras are not considered. On Mar 24, 12:47 pm, info+farm bilgiciftl...@gmail.com wrote: Are not Google developers looking into this forum anymore? Then, I will be missing the detailed answers. Regards, info+farm On Mar 24, 3:17 pm, info+farm bilgiciftl...@gmail.com wrote: Hello Mr. Murphy, I searched for it before sending my post and looked at http://groups.google.com/group/android-developers/browse_thread/threa... andhttp://groups.google.com/group/android-developers/browse_thread/threa... But both of them could not find the answer to the problem. I am afraidPendingIntenthas different Intent initialization(start ()), from the normal startActivity(). I am a little bit confused, Regards, info+farm On Mar 23, 11:32 pm, Mark Murphy mmur...@commonsware.com wrote: info+farm wrote: Am I the only one who is having this problem? Actually, I am going to find a workaround for this problem, but I would like to know what I am doing wrong. I do not remember the answer, but I do know this was discussed on this list within the past few months. Search the list forPendingIntentand you will probably find it. -- Mark Murphy (a Commons Guy)http://commonsware.com Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: PendingIntent problem
Hello Mr. Murphy, I searched for it before sending my post and looked at http://groups.google.com/group/android-developers/browse_thread/thread/6c0d72904ab4234e/9cc2ad4d8795e9a6?lnk=gstq=PendingIntent#9cc2ad4d8795e9a6 and http://groups.google.com/group/android-developers/browse_thread/thread/547048aa824e9e46/1bc5784756209062?lnk=gstq=PendingIntent#1bc5784756209062 But both of them could not find the answer to the problem. I am afraid PendingIntent has different Intent initialization(start ()), from the normal startActivity(). I am a little bit confused, Regards, info+farm On Mar 23, 11:32 pm, Mark Murphy mmur...@commonsware.com wrote: info+farm wrote: Am I the only one who is having this problem? Actually, I am going to find a workaround for this problem, but I would like to know what I am doing wrong. I do not remember the answer, but I do know this was discussed on this list within the past few months. Search the list forPendingIntentand you will probably find it. -- Mark Murphy (a Commons Guy)http://commonsware.com Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: PendingIntent problem
Dear all, Am I the only one who is having this problem? Actually, I am going to find a workaround for this problem, but I would like to know what I am doing wrong. Any help would be appreciated. Regards, info+farm info+farm wrote: Hello all, I have more than one notification in notifications area and each of them has the same intent with different extras in it. Once I start() a pending intent from the notifications, first intent is handled correctly and the extras received successfully on the next(called) activity. Nonetheless, if I go with the other notifications with different extras, activity is resuming but rather than containing my new extras it still has the first(old) values. I played with the flags on intent but as far as I see notification is always calling the intent with FLAG_ACTIVITY_NEW_TASK flag set. If I do the same coding with Intent(rather than PendingIntent) everything goes well. Here is the code that I tried; PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(Weather.GET_WEATHER_ACTION). putExtra(package.prefix.tmp, 1).setFlags (Intent.FLAG_ACTIVITY_NEW_TASK), 0); try { contentIntent.send(); } catch (CanceledException e) { e.printStackTrace(); } PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(Weather.GET_WEATHER_ACTION). putExtra(package.prefix.tmp, 2).setFlags (Intent.FLAG_ACTIVITY_NEW_TASK), 0); try { contentIntent.send(); } catch (CanceledException e) { e.printStackTrace(); } 1 is received in first call but in the second call 1 is received again rather than 2. I think I am missing something on the life cycle of the PendingIntent, any help/idea would be appreciated. info+farm --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] PendingIntent problem
Hello all, I have more than one notification in notifications area and each of them has the same intent with different extras in it. Once I start() a pending intent from the notifications, first intent is handled correctly and the extras received successfully on the next(called) activity. Nonetheless, if I go with the other notifications with different extras, activity is resuming but rather than containing my new extras it still has the first(old) values. I played with the flags on intent but as far as I see notification is always calling the intent with FLAG_ACTIVITY_NEW_TASK flag set. If I do the same coding with Intent(rather than PendingIntent) everything goes well. Here is the code that I tried; PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(Weather.GET_WEATHER_ACTION). putExtra(package.prefix.tmp, 1).setFlags (Intent.FLAG_ACTIVITY_NEW_TASK), 0); try { contentIntent.send(); } catch (CanceledException e) { e.printStackTrace(); } PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(Weather.GET_WEATHER_ACTION). putExtra(package.prefix.tmp, 2).setFlags (Intent.FLAG_ACTIVITY_NEW_TASK), 0); try { contentIntent.send(); } catch (CanceledException e) { e.printStackTrace(); } 1 is received in first call but in the second call 1 is received again rather than 2. I think I am missing something on the life cycle of the PendingIntent, any help/idea would be appreciated. info+farm --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---