possibilities to combine two Android App's - java

I would like to know what's the best possibility to combine two Android Apps together?
I am working on a Loginpage for my Project.
My friend is working on a Dataviewpage for the same Project.
I would like to know what are our options to combine these two Apps (both just in local eclipse), when we finished the seperate project's.
Our current Idea, would be to copy one part in the Eclipse and build it into the other one.
I am aware of, that this is the worst idea but I have no idea to do it an other way.
Hopefully you guys can help me out.
Thanks in advance.

One Solution can be from what i understood you problem is you want both of you should work on same App and even can do your work individual and test it.
Solution can be:
Suppose you have Login Activity & he has DataViewpage activity. Both work on same project just
Add this in the manifest file in both Activity Login and dataview
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
So This will make 2 icons and both of you can work on same code base and also can test individual pages also..
And Put your code base in github.. so can work from anywhere..
Hope this will help you

Related

Why can't I open my app on Play Store?

I have a basic random number generator app that I created using Android Studio. When I run my app using my test device (plugging my phone in) the app runs perfectly fine. I then uploaded this app to the Google Play Store to show my friends and family. When you download the application it says the app was successfully downloaded, but the app wasn't showing up at all.
In trying to open the app I looked on the Google Play Store and instead of seeing the play app button and uninstall button, it only showed the uninstall button.
Image of Play Store
What is wrong with my app that I made?
What file would do this and how could I fix this? (I can post files if needed)
This my first app that I have made and first stackoverflow post. Please give me feedback on how I can solve my problem and how I can better ask for help on this platform. Thanks for your time,
PiNet.
Thank you everybody for helping me solve my issue! Figuring out that playing the app on Android Studio didn't work properly really narrowed down the results from my search and I eventually landed on another stackoverflow post on the same issue.
I currently can't find the post so I will just give you the answer that I found.
In the androidManifest.xml, in my activity. I had all the actions and categories under the same intent filter. After separating them into two intent filters, my issue was solved!
<activity android:name="com.example.random.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>//I only had this intent filter before with the actions & categories above in it
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.VIEW" />
<data android:scheme="android-app" />
</intent-filter>
</activity>
Once again, thank you for your help and your time,
PiNet

One of the more overlooked and commonly caused reason for FATAL EXCEPTION ClassNotFoundException

So after getting this error I checked my classPaths, tried to run Android JUnit test, and was stuck for hours before I realized that the problem was staring right at me in the face:
One of the more overlooked causes for this error are because you had another activity listed as the main activity and then deleted that file on import, causing java to not find the original class, hence ClassNotFoundException. I explain the solution who face this particular problem in my answer below.
Simply change the default activity for your app by going into the AndroidManifest.xml and getting these lines:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
And making sure they are in the activity tag of the activity you want to be the default one. Another thing you can do is replace the activity label
android:name="com.example.testdatabaseactivity.<deletedActivity>"
with
android:name="com.example.testdatabaseactivity.<newDefaultActivity>"
I felt REALLY good when my code finally ran on whichever platform I wanted it to run on and just wanted to share the knowledge! :)

is adding actions, data, and category information to android manifest necessary

I was going over some of the Android resources and found something interesting. It says to add intent filters with the different data, category, and actions capable of the Activity to the Android manifest. However i've been able to get my app working without adding those things. Can any one explain if it is required and what adding those intent filters actually does?
It's required that you have one Activity with the following intent-filter IF you want your application to show up on the launcher:
<activity android:name=".YourMainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
This let's the OS know which Activity to show when your application is started. NOTE: You don't need the above intent-filter if you don't want your application to show up on the launcher (if your application is a widget, for example) (Thanks to Justin Breitfeller).
If you'd like more information on Intent-Filters, check out the developer docs. A common use is allowing other applications to call your application if it can handle certain operations (such as sending an email, launching the camera, etc). If you declare these operations in your AndroidManifest, then your application can be called via Implicit Intents (see the above link).

Creating a Main Activity which DOES NOT appear in the launcher list

I'm looking for a way to have my app launch an activity when opened directly from the Android market, yet not maintain an activity in the launcher menu. I thought that by using the following settings, I would be able to achieve this:
<activity android:name="com.package.test.MyActivity" android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
However, it appears that with these settings the Activity seemingly doesn't even exist in the app - it cannot be opened from the market and doesn't appear in the launcher menu. However, by simply adding:
<category android:name="android.intent.category.LAUNCHER" />
the app does both. The problem is I do want the activity to run from the Market, but I don't want it in the launcher menu.
Can anyone enlighten me as to how this can be achieved?
Instead of LAUNCHER, use android.intent.category.INFO. Know that this is not used often, but an example is an add-on package like the Beautiful Widgets animations, where an informational screen beyond the Market listing is useful after the app is installed, but no harm will be done if the user never discovers this activity.
(See also this question.)

Android: get all the notifications by code

I am using some home replacement that allow me to hide the notification Bar and that's something I really like.
All the informations can be replaced by some widgets, but I would like to display the notifications too.
As I already developed some applications, I would like to know if there is a command line that allow an application to get all the notifications. I plan to add this to a widget or a toast.
Thank a lot for any clue or help.
Since Android API Level 18 (Android 4.3) there is a class NotificationListenerService.
You must set the Permission BIND_NOTIFICATION_LISTENER_SERVICE and use a intent-filter with the action NotificationListenerService.
<service android:name=".NotificationListener"
android:label="#string/service_name"
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
<intent-filter>
<action android:name="android.service.notification.NotificationListenerService" />
</intent-filter>
</service>
Source: http://developer.android.com/reference/android/service/notification/NotificationListenerService.html#getActiveNotifications()
I will answer my question because I found something on an other forum.
Seem that you can access them declaring your application as an (sorry for the french term, I couldn't find an english translation) "gestionnaire d'accessibilité" that you may translate as "accessibility manager"
More information here: https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html
That may be dangerous and has a lot of negative point, but an other dev that is also working on a custom Home assure me that this feature work and he was able to create his own notification bar.

Categories